X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions editor/animation/animation_player_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,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");
Expand Down
6 changes: 0 additions & 6 deletions editor/import/3d/scene_import_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions editor/scene/editor_scene_tabs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 0 additions & 16 deletions editor/themes/theme_classic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,22 +418,6 @@ void ThemeClassic::populate_standard_styles(const Ref<EditorTheme> &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);
Expand Down
10 changes: 0 additions & 10 deletions editor/themes/theme_modern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,16 +488,6 @@ void ThemeModern::populate_standard_styles(const Ref<EditorTheme> &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);
Expand Down
4 changes: 4 additions & 0 deletions scene/gui/color_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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."));
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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));
Expand Down
X Tutup