diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 6ac20e67196..b203ca8bc01 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -587,24 +587,11 @@ Ref create_editor_theme(const Ref p_theme) { theme->set_color("icon_color_pressed", "Button", icon_color_pressed); // OptionButton - Ref style_option_button_normal = style_widget->duplicate(); - Ref style_option_button_hover = style_widget_hover->duplicate(); - Ref style_option_button_pressed = style_widget_pressed->duplicate(); - Ref style_option_button_focus = style_widget_focus->duplicate(); - Ref style_option_button_disabled = style_widget_disabled->duplicate(); - - int option_button_arrow_margin = theme->get_icon("GuiOptionArrow", "EditorIcons")->get_size().width + (default_margin_size + 4) * EDSCALE; - style_option_button_normal->set_default_margin(MARGIN_RIGHT, option_button_arrow_margin); - style_option_button_hover->set_default_margin(MARGIN_RIGHT, option_button_arrow_margin); - style_option_button_pressed->set_default_margin(MARGIN_RIGHT, option_button_arrow_margin); - style_option_button_focus->set_default_margin(MARGIN_RIGHT, option_button_arrow_margin); - style_option_button_disabled->set_default_margin(MARGIN_RIGHT, option_button_arrow_margin); - - theme->set_stylebox("normal", "OptionButton", style_option_button_normal); - theme->set_stylebox("hover", "OptionButton", style_option_button_hover); - theme->set_stylebox("pressed", "OptionButton", style_option_button_pressed); - theme->set_stylebox("focus", "OptionButton", style_option_button_focus); - theme->set_stylebox("disabled", "OptionButton", style_option_button_disabled); + theme->set_stylebox("normal", "OptionButton", style_widget); + theme->set_stylebox("hover", "OptionButton", style_widget_hover); + theme->set_stylebox("pressed", "OptionButton", style_widget_pressed); + theme->set_stylebox("focus", "OptionButton", style_widget_focus); + theme->set_stylebox("disabled", "OptionButton", style_widget_disabled); theme->set_color("font_color", "OptionButton", font_color); theme->set_color("font_color_hover", "OptionButton", font_color_hl); diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index c67e5a928c7..7bbe2a7d09c 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -266,10 +266,10 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const // OptionButton - Ref sb_optbutton_normal = sb_expand(make_stylebox(option_button_normal_png, 4, 4, 21, 4, 6, 3, 21, 3), 2, 2, 2, 2); - Ref sb_optbutton_pressed = sb_expand(make_stylebox(option_button_pressed_png, 4, 4, 21, 4, 6, 3, 21, 3), 2, 2, 2, 2); - Ref sb_optbutton_hover = sb_expand(make_stylebox(option_button_hover_png, 4, 4, 21, 4, 6, 2, 21, 2), 2, 2, 2, 2); - Ref sb_optbutton_disabled = sb_expand(make_stylebox(option_button_disabled_png, 4, 4, 21, 4, 6, 2, 21, 2), 2, 2, 2, 2); + Ref sb_optbutton_normal = sb_expand(make_stylebox(option_button_normal_png, 4, 4, 21, 4, 6, 3, 9, 3), 2, 2, 2, 2); + Ref sb_optbutton_pressed = sb_expand(make_stylebox(option_button_pressed_png, 4, 4, 21, 4, 6, 3, 9, 3), 2, 2, 2, 2); + Ref sb_optbutton_hover = sb_expand(make_stylebox(option_button_hover_png, 4, 4, 21, 4, 6, 2, 9, 2), 2, 2, 2, 2); + Ref sb_optbutton_disabled = sb_expand(make_stylebox(option_button_disabled_png, 4, 4, 21, 4, 6, 2, 9, 2), 2, 2, 2, 2); Ref sb_optbutton_focus = sb_expand(make_stylebox(button_focus_png, 4, 4, 4, 4, 6, 2, 6, 2), 2, 2, 2, 2); theme->set_stylebox("normal", "OptionButton", sb_optbutton_normal);