From d0c610d9ba5736eef309503221a15a8caa2febc2 Mon Sep 17 00:00:00 2001 From: toger5 Date: Mon, 21 Aug 2017 23:07:38 +0200 Subject: removed additional border function. (not needed with new styleboxes) --- editor/editor_themes.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 11150371d2..6e1b72e6f2 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -84,19 +84,6 @@ static Ref change_border_color(Ref p_style, Color p_ return style; } -static Ref add_additional_border(Ref p_style, int p_left, int p_top, int p_right, int p_bottom) { - Ref style = p_style->duplicate(); - style->set_border_width(MARGIN_LEFT, p_left * EDSCALE + style->get_border_width(MARGIN_LEFT)); - style->set_border_width(MARGIN_RIGHT, p_right * EDSCALE + style->get_border_width(MARGIN_RIGHT)); - style->set_border_width(MARGIN_TOP, p_top * EDSCALE + style->get_border_width(MARGIN_TOP)); - style->set_border_width(MARGIN_BOTTOM, p_bottom * EDSCALE + style->get_border_width(MARGIN_BOTTOM)); - style->set_expand_margin_size(MARGIN_LEFT, p_left * EDSCALE); - style->set_expand_margin_size(MARGIN_RIGHT, p_right * EDSCALE); - style->set_expand_margin_size(MARGIN_TOP, p_top * EDSCALE); - style->set_expand_margin_size(MARGIN_BOTTOM, p_bottom * EDSCALE); - return style; -} - #define HIGHLIGHT_COLOR_LIGHT highlight_color.linear_interpolate(Color(1, 1, 1, 1), 0.3) #define HIGHLIGHT_COLOR_DARK highlight_color.linear_interpolate(Color(0, 0, 0, 1), 0.5) @@ -491,7 +478,8 @@ Ref create_editor_theme() { // PopupPanel Ref style_dock_select = make_flat_stylebox(base_color); style_dock_select->set_border_color_all(light_color_1); - style_dock_select = add_additional_border(style_dock_select, 2, 2, 2, 2); + style_dock_select->set_expand_margin_size_all(2); + style_dock_select->set_border_width_all(2); theme->set_stylebox("panel", "PopupPanel", style_dock_select); // SpinBox -- cgit v1.2.3