Skip to content

Conversation

@YeldhamDev
Copy link
Member

Fixes #112244.

@YeldhamDev YeldhamDev added this to the 4.6 milestone Oct 31, 2025
@YeldhamDev YeldhamDev added the bug label Oct 31, 2025
@YeldhamDev YeldhamDev requested a review from a team as a code owner October 31, 2025 22:07
@KoBeWi
Copy link
Member

KoBeWi commented Oct 31, 2025

This should already happen automatically:

godot/scene/gui/control.cpp

Lines 3940 to 3947 in 0870525

case NOTIFICATION_THEME_CHANGED: {
emit_signal(SceneStringName(theme_changed));
_invalidate_theme_cache();
_update_theme_item_cache();
queue_redraw();
update_minimum_size();

Why is it needed here?

@YeldhamDev
Copy link
Member Author

The Control.NOTIFICATION_THEME_CHANGED happens first, then the class one. And is there where the theme is initialized, so the minimum size is out of date.

@akien-mga akien-mga merged commit 4ca3a90 into godotengine:master Nov 1, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@YeldhamDev YeldhamDev deleted the inspector_category_size_fix branch November 1, 2025 18:16
@KoBeWi
Copy link
Member

KoBeWi commented Nov 1, 2025

Now the size is updated multiple times.
The update in Control should be deferred or something.

@YeldhamDev
Copy link
Member Author

Couldn't that potentially create problems elsewhere?

@KoBeWi
Copy link
Member

KoBeWi commented Nov 1, 2025

Yeah, it needs some deeper investigation.

@YeldhamDev
Copy link
Member Author

Alright, I found a better solution: make the theme code be ran by the theme_changed signal instead, as that fires before the minimum size update. Will open a PR.

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.

Switching between classic and modern theme results in different layout

3 participants