Fix font_hover_pressed_color
and icon_hover_pressed_color
not working for no stylebox use on Button
You now don't need to have a `hover_pressed` stylebox to make use of `font_hover_pressed_color` and `icon_hover_pressed_color`.
This commit is contained in:
parent
e4e024ab88
commit
6d4d5f9272
1 changed files with 5 additions and 12 deletions
|
@ -298,19 +298,12 @@ void Button::_notification(int p_what) {
|
|||
}
|
||||
} break;
|
||||
case DRAW_HOVER_PRESSED: {
|
||||
// Edge case for CheckButton and CheckBox.
|
||||
if (has_theme_stylebox("hover_pressed")) {
|
||||
if (has_theme_color(SNAME("font_hover_pressed_color"))) {
|
||||
font_color = theme_cache.font_hover_pressed_color;
|
||||
}
|
||||
if (has_theme_color(SNAME("icon_hover_pressed_color"))) {
|
||||
icon_modulate_color = theme_cache.icon_hover_pressed_color;
|
||||
}
|
||||
|
||||
break;
|
||||
font_color = theme_cache.font_hover_pressed_color;
|
||||
if (has_theme_color(SNAME("icon_hover_pressed_color"))) {
|
||||
icon_modulate_color = theme_cache.icon_hover_pressed_color;
|
||||
}
|
||||
}
|
||||
[[fallthrough]];
|
||||
|
||||
} break;
|
||||
case DRAW_PRESSED: {
|
||||
if (has_theme_color(SNAME("font_pressed_color"))) {
|
||||
font_color = theme_cache.font_pressed_color;
|
||||
|
|
Loading…
Reference in a new issue