diff --git a/editor/animation/animation_player_editor_plugin.cpp b/editor/animation/animation_player_editor_plugin.cpp index 5b8b5cf42f..3c7ed4ac15 100644 --- a/editor/animation/animation_player_editor_plugin.cpp +++ b/editor/animation/animation_player_editor_plugin.cpp @@ -199,9 +199,6 @@ void AnimationPlayerEditor::_notification(int p_what) { pin->set_button_icon(get_editor_theme_icon(SNAME("Pin"))); - tool_anim->add_theme_style_override(CoreStringName(normal), get_theme_stylebox(CoreStringName(normal), SNAME("Button"))); - track_editor->get_edit_menu()->add_theme_style_override(CoreStringName(normal), get_theme_stylebox(CoreStringName(normal), SNAME("Button"))); - #define ITEM_ICON(m_item, m_icon) tool_anim->get_popup()->set_item_icon(tool_anim->get_popup()->get_item_index(m_item), get_editor_theme_icon(SNAME(m_icon))) ITEM_ICON(TOOL_NEW_ANIM, "New"); diff --git a/editor/import/3d/scene_import_settings.cpp b/editor/import/3d/scene_import_settings.cpp index b50a01bb37..1e3f95300e 100644 --- a/editor/import/3d/scene_import_settings.cpp +++ b/editor/import/3d/scene_import_settings.cpp @@ -1375,12 +1375,6 @@ void SceneImportSettingsDialog::_notification(int p_what) { } break; case NOTIFICATION_THEME_CHANGED: { - action_menu->begin_bulk_theme_override(); - action_menu->add_theme_style_override(CoreStringName(normal), get_theme_stylebox(CoreStringName(normal), "Button")); - action_menu->add_theme_style_override(SceneStringName(hover), get_theme_stylebox(SceneStringName(hover), "Button")); - action_menu->add_theme_style_override(SceneStringName(pressed), get_theme_stylebox(SceneStringName(pressed), "Button")); - action_menu->end_bulk_theme_override(); - if (animation_player != nullptr && animation_player->is_playing()) { animation_play_button->set_button_icon(get_editor_theme_icon(SNAME("Pause"))); } else { diff --git a/editor/scene/editor_scene_tabs.cpp b/editor/scene/editor_scene_tabs.cpp index 97f909bda6..ff55d30ae4 100644 --- a/editor/scene/editor_scene_tabs.cpp +++ b/editor/scene/editor_scene_tabs.cpp @@ -471,6 +471,7 @@ EditorSceneTabs::EditorSceneTabs() { scene_list = memnew(MenuButton); scene_list->set_flat(false); + scene_list->set_theme_type_variation("FlatMenuButton"); scene_list->set_accessibility_name(TTRC("Show Opened Scenes List")); scene_list->set_shortcut(ED_SHORTCUT("editor/show_opened_scenes_list", TTRC("Show Opened Scenes List"), KeyModifierMask::ALT | Key::T)); scene_list->get_popup()->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED); diff --git a/editor/themes/theme_classic.cpp b/editor/themes/theme_classic.cpp index 15a202d6d6..a67ac64953 100644 --- a/editor/themes/theme_classic.cpp +++ b/editor/themes/theme_classic.cpp @@ -418,22 +418,6 @@ void ThemeClassic::populate_standard_styles(const Ref &p_theme, Edi p_theme->set_constant("align_to_largest_stylebox", "Button", 1); // Enabled. - // MenuButton. - - p_theme->set_stylebox(CoreStringName(normal), "MenuButton", p_config.panel_container_style); - p_theme->set_stylebox(SceneStringName(hover), "MenuButton", p_config.button_style_hover); - p_theme->set_stylebox(SceneStringName(pressed), "MenuButton", p_config.panel_container_style); - p_theme->set_stylebox("focus", "MenuButton", p_config.panel_container_style); - p_theme->set_stylebox("disabled", "MenuButton", p_config.panel_container_style); - - p_theme->set_color(SceneStringName(font_color), "MenuButton", p_config.font_color); - p_theme->set_color("font_hover_color", "MenuButton", p_config.font_hover_color); - p_theme->set_color("font_hover_pressed_color", "MenuButton", p_config.font_hover_pressed_color); - p_theme->set_color("font_focus_color", "MenuButton", p_config.font_focus_color); - p_theme->set_color("font_outline_color", "MenuButton", p_config.font_outline_color); - - p_theme->set_constant("outline_size", "MenuButton", 0); - // MenuBar. p_theme->set_stylebox(CoreStringName(normal), "MenuBar", p_config.button_style); diff --git a/editor/themes/theme_modern.cpp b/editor/themes/theme_modern.cpp index d74eb6b767..cfb8e65f35 100644 --- a/editor/themes/theme_modern.cpp +++ b/editor/themes/theme_modern.cpp @@ -488,16 +488,6 @@ void ThemeModern::populate_standard_styles(const Ref &p_theme, Edit p_theme->set_constant("outline_size", "Button", 0); p_theme->set_constant("align_to_largest_stylebox", "Button", 1); // Enabled. - // MenuButton. - - p_theme->set_stylebox(CoreStringName(normal), "MenuButton", p_config.base_empty_wide_style); - p_theme->set_stylebox(SceneStringName(hover), "MenuButton", p_config.flat_button_hover); - p_theme->set_stylebox(SceneStringName(pressed), "MenuButton", p_config.flat_button_pressed); - p_theme->set_stylebox("focus", "MenuButton", p_config.focus_style); - p_theme->set_stylebox("disabled", "MenuButton", p_config.base_empty_wide_style); - - p_theme->set_constant("outline_size", "MenuButton", 0); - // MenuBar. p_theme->set_stylebox(CoreStringName(normal), "MenuBar", p_config.button_style); diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 045c8c498c..c040f94bf6 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -2092,6 +2092,7 @@ ColorPicker::ColorPicker() { btn_shape = memnew(MenuButton); btn_shape->set_flat(false); + btn_shape->set_theme_type_variation("FlatMenuButton"); sample_hbc->add_child(btn_shape); btn_shape->set_toggle_mode(true); btn_shape->set_tooltip_text(ETR("Select a picker shape.")); @@ -2142,10 +2143,12 @@ ColorPicker::ColorPicker() { btn_mode = memnew(MenuButton); btn_mode->set_flat(false); + btn_mode->set_theme_type_variation("FlatMenuButton"); mode_hbc->add_child(btn_mode); btn_mode->set_toggle_mode(true); btn_mode->set_accessibility_name(ETR("Select a picker mode.")); btn_mode->set_tooltip_text(ETR("Select a picker mode.")); + btn_mode->set_icon_alignment(HORIZONTAL_ALIGNMENT_CENTER); btn_mode->set_focus_mode(FOCUS_ALL); mode_popup = btn_mode->get_popup(); @@ -2247,6 +2250,7 @@ ColorPicker::ColorPicker() { menu_btn = memnew(MenuButton); menu_btn->set_flat(false); + menu_btn->set_theme_type_variation("FlatMenuButton"); menu_btn->set_focus_mode(FOCUS_ALL); menu_btn->set_tooltip_text(ETR("Show all options available.")); menu_btn->connect("about_to_popup", callable_mp(this, &ColorPicker::_update_menu_items));