Skip to content

Commit

Permalink
Merge pull request godotengine#96557 from akien-mga/3.x-PopupMenu-upd…
Browse files Browse the repository at this point in the history
…ate-margins-on-visibility-change

[3.x] PopupMenu: Update margins on visibility change
  • Loading branch information
lawnjelly authored Sep 4, 2024
2 parents 67d4b73 + c84cf04 commit 1b05262
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scene/gui/popup_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,8 @@ void PopupMenu::_notification(int p_what) {
case NOTIFICATION_POST_POPUP: {
initial_button_mask = Input::get_singleton()->get_mouse_button_mask();
during_grabbed_click = (bool)initial_button_mask;
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
// Set margin on the margin container
Ref<StyleBox> panel_style = get_stylebox("panel");
margin_container->add_constant_override("margin_top", panel_style->get_margin(Margin::MARGIN_TOP));
Expand Down

0 comments on commit 1b05262

Please sign in to comment.