This commit is contained in:
Spartan322
2024-10-24 18:01:23 -04:00
79 changed files with 868 additions and 315 deletions

View File

@@ -393,7 +393,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));
@@ -456,14 +455,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);