Merge pull request #98511 from timothyqiu/button-hover-pressed

[3.x] Fix `Button` not listing `hover_pressed` stylebox
This commit is contained in:
lawnjelly 2024-10-28 06:51:00 +00:00 committed by GitHub
commit c31800bcde
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,9 @@
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is being hovered.
</theme_item>
<theme_item name="hover_pressed" data_type="style" type="StyleBox">
[StyleBox] used when the [Button] is being hovered and pressed.
</theme_item>
<theme_item name="normal" data_type="style" type="StyleBox">
Default [StyleBox] for the [Button].
</theme_item>

View File

@ -230,6 +230,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_stylebox("normal", "Button", sb_button_normal);
theme->set_stylebox("pressed", "Button", sb_button_pressed);
theme->set_stylebox("hover", "Button", sb_button_hover);
theme->set_stylebox("hover_pressed", "Button", sb_button_hover);
theme->set_stylebox("disabled", "Button", sb_button_disabled);
theme->set_stylebox("focus", "Button", sb_button_focus);