diff options
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 728801d90b..1a7ee0e970 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -237,8 +237,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { Color dark_color_2 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 1.5); Color dark_color_3 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 2); - Color contrast_color_1 = base_color.linear_interpolate((dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1)), 0.3); - Color contrast_color_2 = base_color.linear_interpolate((dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1)), 0.5); + Color contrast_color_1 = base_color.linear_interpolate((dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1)), MAX(contrast, default_contrast)); + Color contrast_color_2 = base_color.linear_interpolate((dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1)), MAX(contrast * 1.5, default_contrast * 1.5)); Color font_color = dark_theme ? Color(1, 1, 1) : Color(0, 0, 0); Color font_color_disabled = dark_theme ? Color(0.6, 0.6, 0.6) : Color(0.45, 0.45, 0.45); @@ -303,12 +303,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { Ref<StyleBoxFlat> style_menu_hover_bg = make_flat_stylebox(dark_color_2, 4, 4, 4, 4); style_menu_hover_border->set_draw_center(false); - style_menu_hover_border->set_border_width(MARGIN_BOTTOM, border_width); + style_menu_hover_border->set_border_width(MARGIN_BOTTOM, 2 * EDSCALE); style_menu_hover_border->set_border_color_all(highlight_color); - style_menu_hover_border->set_expand_margin_size(MARGIN_BOTTOM, border_width); theme->set_stylebox("normal", "MenuButton", style_menu); - theme->set_stylebox("hover", "MenuButton", style_menu_hover_border); + theme->set_stylebox("hover", "MenuButton", style_menu); theme->set_stylebox("pressed", "MenuButton", style_menu); theme->set_stylebox("focus", "MenuButton", style_menu); theme->set_stylebox("disabled", "MenuButton", style_menu); @@ -358,6 +357,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("pressed", "Button", change_border_color(style_button_type, highlight_color)); theme->set_stylebox("focus", "Button", change_border_color(style_button_type, highlight_color)); theme->set_stylebox("disabled", "Button", style_button_type_disabled); + theme->set_color("font_color", "Button", button_font_color); theme->set_color("font_color_hover", "Button", HIGHLIGHT_COLOR_FONT); theme->set_color("font_color_pressed", "Button", highlight_color); @@ -367,13 +367,12 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_color("icon_color_pressed", "Button", Color(highlight_color.r * 1.15, highlight_color.g * 1.15, highlight_color.b * 1.15, highlight_color.a)); // OptionButton - Ref<StyleBoxFlat> style_option_button = make_flat_stylebox(dark_color_1, 4, 4, 4, 4); - style_option_button->set_border_width_all(border_width); + theme->set_stylebox("normal", "OptionButton", style_button_type); theme->set_stylebox("hover", "OptionButton", change_border_color(style_button_type, contrast_color_1)); theme->set_stylebox("pressed", "OptionButton", change_border_color(style_button_type, HIGHLIGHT_COLOR_FONT)); theme->set_stylebox("focus", "OptionButton", change_border_color(style_button_type, highlight_color)); theme->set_stylebox("disabled", "OptionButton", style_button_type_disabled); - theme->set_stylebox("normal", "OptionButton", style_button_type); + theme->set_color("font_color", "OptionButton", button_font_color); theme->set_color("font_color_hover", "OptionButton", HIGHLIGHT_COLOR_FONT); theme->set_color("font_color_pressed", "OptionButton", highlight_color); @@ -386,6 +385,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { // CheckButton theme->set_icon("on", "CheckButton", theme->get_icon("GuiToggleOn", "EditorIcons")); theme->set_icon("off", "CheckButton", theme->get_icon("GuiToggleOff", "EditorIcons")); + theme->set_color("font_color", "CheckButton", button_font_color); theme->set_color("font_color_hover", "CheckButton", HIGHLIGHT_COLOR_FONT); theme->set_color("font_color_pressed", "CheckButton", highlight_color); @@ -436,7 +436,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("custom_button_pressed", "Tree", make_empty_stylebox()); theme->set_stylebox("custom_button_hover", "Tree", style_button_type); theme->set_color("custom_button_font_highlight", "Tree", HIGHLIGHT_COLOR_FONT); - theme->set_color("font_color", "Tree", font_color_disabled); + theme->set_color("font_color", "Tree", font_color); theme->set_color("font_color_selected", "Tree", font_color); Ref<StyleBox> style_tree_btn = make_flat_stylebox(contrast_color_1, 2, 4, 2, 4); @@ -526,6 +526,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { // LineEdit Ref<StyleBoxFlat> style_line_edit = make_flat_stylebox(dark_color_1, 6, 4, 6, 4); + style_line_edit->set_border_width_all(border_width); style_line_edit = change_border_color(style_line_edit, contrast_color_1); Ref<StyleBoxFlat> style_line_edit_disabled = change_border_color(style_line_edit, dark_color_1); style_line_edit_disabled->set_bg_color(Color(0, 0, 0, .1)); |