From 701fb55a108bd83d9a1e6c6bc4bfe61539df333d Mon Sep 17 00:00:00 2001 From: toger5 Date: Tue, 8 Aug 2017 16:14:47 +0200 Subject: [PATCH] styleBoxFlat removed light, dark color entirely --- scene/resources/style_box.cpp | 48 ++++------------------------------- scene/resources/style_box.h | 7 +---- scene/resources/theme.cpp | 4 +-- 3 files changed, 8 insertions(+), 51 deletions(-) diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 68dba9a98a0..6729d9d7628 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -291,29 +291,6 @@ Color StyleBoxFlat::get_bg_color() const { return bg_color; } -void StyleBoxFlat::set_light_color(const Color &p_color) { - - set_border_color(MARGIN_LEFT, p_color); - set_border_color(MARGIN_TOP, p_color); - set_border_color(MARGIN_RIGHT, p_color); - emit_changed(); -} - -Color StyleBoxFlat::get_light_color() const { - - return get_border_color(MARGIN_TOP); -} - -void StyleBoxFlat::set_dark_color(const Color &p_color) { - set_border_color(MARGIN_BOTTOM, p_color); - emit_changed(); -} - -Color StyleBoxFlat::get_dark_color() const { - - return get_border_color(MARGIN_BOTTOM); -} - void StyleBoxFlat::set_border_color_all(const Color &p_color) { for (int i = 0; i < 4; i++) { @@ -321,6 +298,10 @@ void StyleBoxFlat::set_border_color_all(const Color &p_color) { } emit_changed(); } +Color StyleBoxFlat::get_border_color_all() const { + + return border_color[MARGIN_TOP]; +} void StyleBoxFlat::set_border_color(Margin p_border, const Color &p_color) { border_color.write()[p_border] = p_color; @@ -497,7 +478,6 @@ inline void draw_ring(Vector &verts, Vector &indices, Vectorset_dark_color(dark); - sbflat->set_light_color(bright); + sbflat->set_border_color_all(bright); + // sbflat->set_dark_color(dark); sbflat->set_bg_color(normal); if (params.size() == ccodes + 5) {