summaryrefslogtreecommitdiff
path: root/scene/gui/button.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-07-08 08:02:09 +0200
committerGitHub <noreply@github.com>2022-07-08 08:02:09 +0200
commit2b6dadd46b9a2bb68c6814989360e02f064a47b1 (patch)
tree63377c3e527e56c40d345b35d276a506afa0c819 /scene/gui/button.cpp
parent6892df6b78a9816ff871e8a0009aa6636094f082 (diff)
parent8f6c4956ca8d2689879dca97586e3deda53dae25 (diff)
Merge pull request #62829 from bruvzg/font_fix_2
Fix regressions from Font refactor (2)
Diffstat (limited to 'scene/gui/button.cpp')
-rw-r--r--scene/gui/button.cpp6
1 files changed, 5 insertions, 1 deletions
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;
}