diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-07-08 08:27:18 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-07-08 08:27:18 +0300 |
commit | 8f6c4956ca8d2689879dca97586e3deda53dae25 (patch) | |
tree | f22062731841ea1e1a2608846f8639ef5d8f0ba9 | |
parent | 5268efdcd9b8e07ed8363f6f32a343392ab4acdf (diff) |
Fix regressions from Font refactor
Remove unnecessary font override
Fixes button outline draw when it should not, causing button colors to be slightly off
-rw-r--r-- | editor/code_editor.cpp | 1 | ||||
-rw-r--r-- | scene/gui/button.cpp | 6 |
2 files changed, 5 insertions, 2 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index a1979c7619..50abe8bc36 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1895,7 +1895,6 @@ CodeTextEditor::CodeTextEditor() { } break; } } - text_editor->add_theme_font_override("font", fc); text_editor->set_draw_line_numbers(true); text_editor->set_highlight_matching_braces_enabled(true); 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; } |