Skip to content

Fix MenuBar min size not updating after child rename#106815

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
timothyqiu:menu-bar-min-size
May 26, 2025
Merged

Fix MenuBar min size not updating after child rename#106815
Repiteo merged 1 commit into
godotengine:masterfrom
timothyqiu:menu-bar-min-size

Conversation

@timothyqiu
Copy link
Copy Markdown
Member

To reproduce the issue:

  1. Create a MenuBar.
  2. Add a PopupMenu child for it.
  3. Rename the PopupMenu node so the button text is shorter on the menu bar.
  4. Try to resize the menu bar: you can't make it narrower than its original width.
  5. Switch to another scene and then back: now you can shrink the menu bar.

@timothyqiu timothyqiu requested a review from a team as a code owner May 26, 2025 06:20
Copy link
Copy Markdown
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

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

Both queue_redraw and update_minimum_size probably should be called after the loop, and can be wrapped in if (!is_global) { ... } since neither is relevant for macOS global menu.

@bruvzg bruvzg added this to the 4.5 milestone May 26, 2025
@timothyqiu timothyqiu force-pushed the menu-bar-min-size branch from bef0c91 to b2d4735 Compare May 26, 2025 06:38
@Repiteo Repiteo merged commit 04af103 into godotengine:master May 26, 2025
20 checks passed
@Repiteo
Copy link
Copy Markdown
Contributor

Repiteo commented May 26, 2025

Thanks!

@timothyqiu timothyqiu deleted the menu-bar-min-size branch May 26, 2025 23:24
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.

3 participants