From 8f6c4956ca8d2689879dca97586e3deda53dae25 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Fri, 8 Jul 2022 08:27:18 +0300 Subject: Fix regressions from Font refactor Remove unnecessary font override Fixes button outline draw when it should not, causing button colors to be slightly off --- scene/gui/button.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scene/gui/button.cpp') diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index d23a4fff43..d8de22d27c 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -342,7 +342,11 @@ void Button::_notification(int p_what) { } break; } - text_buf->draw_outline(ci, text_ofs, get_theme_constant(SNAME("outline_size")), get_theme_color(SNAME("font_outline_color"))); + Color font_outline_color = get_theme_color(SNAME("font_outline_color")); + int outline_size = get_theme_constant(SNAME("outline_size")); + if (outline_size > 0 && font_outline_color.a > 0) { + text_buf->draw_outline(ci, text_ofs, outline_size, font_outline_color); + } text_buf->draw(ci, text_ofs, color); } break; } -- cgit v1.2.3