-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LabelSettings resource for quick Label theme property override. #62139
Conversation
How does this work with theme overrides? I thought similar functionality was already possible with #50169? |
4a68d88
to
285ad1d
Compare
285ad1d
to
5240871
Compare
@AaronRecord This entirely overrides the theme, its used in cases where you don't care about using themes (simple UIs or Label3D) |
Rebased to match latest |
e6bd505
to
6886648
Compare
@bruvzg Needs a rebase, and also we've decided that this shouldn't be added to Button. Otherwise, can merge! Regarding better interoperability with themes, we've discussed it at length and decided that it can be solved at a later point. |
When that is done, will |
6886648
to
f63d541
Compare
The two options mentioned in the meeting were to either extend FontVariation to include colors and what not, or to incorporate LabelSettings into the theme. In either case, I guess not removed, no. In my own opinion, a proper solution would require some significant changes to theming, so it is unlikely we'll get there with the upcoming versions. I imagine we'd need to split theme properties into states so each state can have its own configuration of fonts and styles. Then those would probably need to be able to partially override each other (the need for this already exists for styleboxes). So for the foreseeable future we're "stuck" with LabelSettings and maybe some smaller changes to FontVariation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving to indicate the consensus of the review meeting
I personally agree with nathanfranke, to me this just feels like adding a new system that does the exact same thing as theme overrides and theme types. The only use case I see that this adds that doesn't already exist is having a resource based source for theme overrides, but that only exists for labels. Maybe theme overrides could be made into a resource? Although couldn't you already do something similar by just creating a custom scene with a label as its only node where you set the theme override settings appropriately? The biggest issue I see with the current system is theme overrides are a little less convenient and probably less intuitive for beginners, but I think this could be solved with something like what aaronfranke said. The people that are vouching for this change are a lot more experienced than I am, so maybe this is a good idea, I'm just struggling to understand why this change is useful, and if it is I just want to understand why. |
@AaronRecord I think you mean @nathanfranke |
@AaronRecord We've discussed this in the meeting, with the same arguments being brought up. Ultimately, this PR a) gives better usability for people who want simple things and don't want to deal with themes, and b) it supports non-themeable nodes like Label3D. I would really want this kind of customization to be available as a part of the theme as well, as it's more convenient and more organized, but we decided to postpone resolving that part. |
FYI a) is invalid because I've already proposed an alternative. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this again in a maintainers meeting and agreed to go with this approach for now.
As others here I'm personally not fully happy with the redundancy this introduces with Theme and theme override properties, but we agreed that solving this problem is quite complex and would require rethinking Theme in a way that's not feasible for 4.0 in a timely manner. So we go with this for now and we'll see if/how to improve things further later on.
Thanks! |
Opened discussion: godotengine/godot-proposals#4919 |
Depends on #62108Adds
LabelSettings
resource, to quickly override text properties of theLabel
.