summaryrefslogtreecommitdiffstats
path: root/editor/window_wrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/window_wrapper.cpp')
-rw-r--r--editor/window_wrapper.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/editor/window_wrapper.cpp b/editor/window_wrapper.cpp
index 9496ba016c..3256680416 100644
--- a/editor/window_wrapper.cpp
+++ b/editor/window_wrapper.cpp
@@ -390,8 +390,7 @@ void ScreenSelect::_notification(int p_what) {
connect(SceneStringName(gui_input), callable_mp(this, &ScreenSelect::_handle_mouse_shortcut));
} 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)));
+ set_button_icon(get_editor_theme_icon("MakeFloating"));
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);