summaryrefslogtreecommitdiffstats
path: root/scene/gui/popup_menu.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-10-20 15:12:11 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-10-20 15:12:11 +0200
commit68a183a2d91709537fe5cab3ed989f97a590845c (patch)
treefeb3978a5c4444a01bc5b3d5f72b8eda2c140cf6 /scene/gui/popup_menu.cpp
parent55fc347efd50d297de3b92a5bfc141e52e57c90f (diff)
parent215e036600809fd588ec67b8d39efe12ae1ff4c5 (diff)
downloadredot-engine-68a183a2d91709537fe5cab3ed989f97a590845c.tar.gz
Merge pull request #83626 from YuriSizov/control-less-is-more-as-in-less-excessive-notifications-is-more-performance
Add bulk change guards to successive theme overrides in Editor and GUI
Diffstat (limited to 'scene/gui/popup_menu.cpp')
-rw-r--r--scene/gui/popup_menu.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 28f5ed7dfd..dfaf7d88b7 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -1108,10 +1108,12 @@ void PopupMenu::_notification(int p_what) {
}
// Set margin on the margin container
+ margin_container->begin_bulk_theme_override();
margin_container->add_theme_constant_override("margin_left", theme_cache.panel_style->get_margin(Side::SIDE_LEFT));
margin_container->add_theme_constant_override("margin_top", theme_cache.panel_style->get_margin(Side::SIDE_TOP));
margin_container->add_theme_constant_override("margin_right", theme_cache.panel_style->get_margin(Side::SIDE_RIGHT));
margin_container->add_theme_constant_override("margin_bottom", theme_cache.panel_style->get_margin(Side::SIDE_BOTTOM));
+ margin_container->end_bulk_theme_override();
}
} break;
}