Fix theme propagation for children of top level controls and windows #61587
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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