mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 11:56:49 +01:00
PopupMenu: Update margins on visibility change
Fixes #96149. Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
This commit is contained in:
parent
08f4960b23
commit
bcd989020e
@ -674,6 +674,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_theme_stylebox("panel");
|
||||
margin_container->add_theme_constant_override("margin_top", panel_style->get_margin(Margin::MARGIN_TOP));
|
||||
|
Loading…
Reference in New Issue
Block a user