Skip to content
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

Fix theme propagation for children of top level controls and windows #61587

Merged

Conversation

YuriSizov
Copy link
Contributor

@YuriSizov YuriSizov commented Jun 1, 2022

Fixes #36103 for master. The issue was in the logic that assigned theme owner. For some reason, probably in error, theme owner was never assigned if the direct parent was a control that was marked as top level. Not entirely sure, why this only affected editor plugins (at least in 3.x), but not running projects.

A further regression witnessed by @KoBeWi in the comments was because Window was missing this logic entirely.

I've also cleaned up related code a bit, since we don't need a node reference anymore. I'm not very happy with the theme owner / theme owner window logic that we have, and the duplication that we have. It's too convoluted for such a simple system. But I decided to focus on fixing the issue, and didn't do any refactoring.

A slightly modified repro for master:
bug-theme-dialogs-4.0.zip

Copy link
Member

@reduz reduz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I guess not much we can do that code gets complicated with windows, but it does what it has to do.

@akien-mga akien-mga merged commit 82a56e5 into godotengine:master Jun 27, 2022
@akien-mga
Copy link
Member

Thanks!

@YuriSizov YuriSizov deleted the control-fix-theme-owner-toplevel branch June 27, 2022 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor Theme items not accessible by nodes inside Popups unless root node has any theme
3 participants