Skip to content

Commit cb618e4

Browse files
authored
Merge pull request godotengine#97335 from SlienCode/master
Fix `font_hover_pressed_color` and `icon_hover_pressed_color` not working for no stylebox use on `Button`
2 parents f83a273 + 6d4d5f9 commit cb618e4

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

scene/gui/button.cpp

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -296,19 +296,12 @@ void Button::_notification(int p_what) {
296296
}
297297
} break;
298298
case DRAW_HOVER_PRESSED: {
299-
// Edge case for CheckButton and CheckBox.
300-
if (has_theme_stylebox("hover_pressed")) {
301-
if (has_theme_color(SNAME("font_hover_pressed_color"))) {
302-
font_color = theme_cache.font_hover_pressed_color;
303-
}
304-
if (has_theme_color(SNAME("icon_hover_pressed_color"))) {
305-
icon_modulate_color = theme_cache.icon_hover_pressed_color;
306-
}
307-
308-
break;
299+
font_color = theme_cache.font_hover_pressed_color;
300+
if (has_theme_color(SNAME("icon_hover_pressed_color"))) {
301+
icon_modulate_color = theme_cache.icon_hover_pressed_color;
309302
}
310-
}
311-
[[fallthrough]];
303+
304+
} break;
312305
case DRAW_PRESSED: {
313306
if (has_theme_color(SNAME("font_pressed_color"))) {
314307
font_color = theme_cache.font_pressed_color;

0 commit comments

Comments
 (0)