From 2bff914512936b2c2eaf4670dbf5ddb2d8fcd690 Mon Sep 17 00:00:00 2001 From: toger5 Date: Wed, 26 Jul 2017 14:08:42 +0200 Subject: [PATCH] border settings doesn't remove necessary borders anymore --- editor/editor_themes.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 6b985c7b4bc..a2d18b1e8e7 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -143,7 +143,7 @@ Ref create_editor_theme() { Color light_color_1 = base_color.linear_interpolate(Color(1, 1, 1, 1), contrast); Color light_color_2 = base_color.linear_interpolate(Color(1, 1, 1, 1), contrast * 1.5); - const int border_width = (border_size % 3) * EDSCALE; + const int border_width = MIN(border_size, 3) * EDSCALE; Color title_color_hl = base_color; if (highlight_tabs) @@ -280,12 +280,12 @@ Ref create_editor_theme() { // PopupMenu Ref style_popup_menu = make_flat_stylebox(dark_color_1, 8, 8, 8, 8); - style_popup_menu->set_border_size(border_width); + style_popup_menu->set_border_size(MAX(EDSCALE, border_width)); style_popup_menu->set_light_color(light_color_1); style_popup_menu->set_dark_color(light_color_1); style_popup_menu->set_border_blend(false); theme->set_stylebox("panel", "PopupMenu", style_popup_menu); - theme->set_stylebox("separator", "PopupMenu", make_line_stylebox(separator_color, border_width, 8 - border_width)); + theme->set_stylebox("separator", "PopupMenu", make_line_stylebox(separator_color, MAX(EDSCALE, border_width), 8 - MAX(EDSCALE, border_width))); // Tree & ItemList background Ref style_tree_bg = make_flat_stylebox(dark_color_1, 2, 4, 2, 4); @@ -424,7 +424,7 @@ Ref create_editor_theme() { // WindowDialog Ref style_window = make_flat_stylebox(dark_color_2, 4, 4, 4, 4); - style_window->set_border_size(border_width); + style_window->set_border_size(MAX(EDSCALE, border_width)); style_window->set_border_blend(false); style_window->set_light_color(title_color_hl); style_window->set_dark_color(title_color_hl); @@ -471,6 +471,9 @@ Ref create_editor_theme() { theme->set_icon("grabber", "VSlider", theme->get_icon("GuiSliderGrabber", "EditorIcons")); theme->set_icon("grabber_highlight", "VSlider", theme->get_icon("GuiSliderGrabberHl", "EditorIcons")); + //RichTextLabel + theme->set_stylebox("focus", "RichTextLabel", make_empty_stylebox()); + // Panel theme->set_stylebox("panel", "Panel", style_panel);