Skip to content

Commit

Permalink
Merge pull request #97335 from SlienCode/master
Browse files Browse the repository at this point in the history
Fix `font_hover_pressed_color` and `icon_hover_pressed_color` not working for no stylebox use on `Button`
  • Loading branch information
clayjohn authored Oct 25, 2024
2 parents f83a273 + 6d4d5f9 commit cb618e4
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions scene/gui/button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,19 +296,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;
Expand Down

0 comments on commit cb618e4

Please sign in to comment.