diff options
author | Hendrik Brucker <hendrik.brucker@mail.de> | 2021-10-31 02:10:45 +0200 |
---|---|---|
committer | Hendrik Brucker <hendrik.brucker@mail.de> | 2021-10-31 02:10:45 +0200 |
commit | 231285b6fb321d4d7e37ee18038e9137acf010eb (patch) | |
tree | 929c640ae8b4f1105b618497622ad27c907e6978 /scene | |
parent | 727c51f35d29e36d199aedafb7b2c683a55bf44d (diff) |
Fix CheckButton and CheckBox font hover pressed color
Co-authored-by: Kjetil Fosse <kjetil.fosse@outlook.com>
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/button.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 9818c8f0cc..48dbbc35bc 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -126,7 +126,8 @@ void Button::_notification(int p_what) { } } break; case DRAW_HOVER_PRESSED: { - if (has_theme_stylebox(SNAME("hover_pressed")) && has_theme_stylebox_override("hover_pressed")) { + // Edge case for CheckButton and CheckBox. + if (has_theme_stylebox("hover_pressed")) { if (rtl && has_theme_stylebox(SNAME("hover_pressed_mirrored"))) { style = get_theme_stylebox(SNAME("hover_pressed_mirrored")); } else { @@ -138,8 +139,6 @@ void Button::_notification(int p_what) { } if (has_theme_color(SNAME("font_hover_pressed_color"))) { color = get_theme_color(SNAME("font_hover_pressed_color")); - } else { - color = get_theme_color(SNAME("font_color")); } if (has_theme_color(SNAME("icon_hover_pressed_color"))) { color_icon = get_theme_color(SNAME("icon_hover_pressed_color")); |