summaryrefslogtreecommitdiffstats
path: root/editor/window_wrapper.cpp
diff options
context:
space:
mode:
authorGiganzo <158825920+Giganzo@users.noreply.github.com>2024-09-01 23:53:15 +0200
committerkobewi <kobewi4e@gmail.com>2024-10-20 13:26:45 +0200
commit549bffdcbc4cd43e03b1f6300f087e6d5816397c (patch)
treea1fdd808261fee924e7e05f885133d5b27d9f75c /editor/window_wrapper.cpp
parent61598c5c88d95b96811d386cb20d714c35f4c6d7 (diff)
downloadredot-engine-549bffdcbc4cd43e03b1f6300f087e6d5816397c.tar.gz
Fix PopupPanel menu style
Diffstat (limited to 'editor/window_wrapper.cpp')
-rw-r--r--editor/window_wrapper.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/editor/window_wrapper.cpp b/editor/window_wrapper.cpp
index 9496ba016c..7f61623980 100644
--- a/editor/window_wrapper.cpp
+++ b/editor/window_wrapper.cpp
@@ -391,7 +391,6 @@ void ScreenSelect::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
set_icon(get_editor_theme_icon("MakeFloating"));
- popup_background->add_theme_style_override(SceneStringName(panel), get_theme_stylebox("PanelForeground", EditorStringName(EditorStyles)));
const real_t popup_height = real_t(get_theme_font_size(SceneStringName(font_size))) * 2.0;
popup->set_min_size(Size2(0, popup_height * 3));
@@ -454,14 +453,10 @@ ScreenSelect::ScreenSelect() {
// Create the popup.
const Size2 borders = Size2(4, 4) * EDSCALE;
- popup = memnew(Popup);
+ popup = memnew(PopupPanel);
popup->connect("popup_hide", callable_mp(static_cast<BaseButton *>(this), &ScreenSelect::set_pressed).bind(false));
add_child(popup);
- popup_background = memnew(Panel);
- popup_background->set_anchors_and_offsets_preset(PRESET_FULL_RECT);
- popup->add_child(popup_background);
-
MarginContainer *popup_root = memnew(MarginContainer);
popup_root->add_theme_constant_override("margin_right", borders.width);
popup_root->add_theme_constant_override("margin_top", borders.height);