From e42a091db42238f9ae98cfda940d421613e54096 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Fri, 25 Oct 2024 12:30:08 +0800 Subject: [PATCH] Fix Button not listing `hover_pressed` stylebox --- doc/classes/Button.xml | 3 +++ scene/resources/default_theme/default_theme.cpp | 1 + 2 files changed, 4 insertions(+) diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index d5b24b241..62649b277 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -113,6 +113,9 @@ [StyleBox] used when the [Button] is being hovered. + + [StyleBox] used when the [Button] is being hovered and pressed. + Default [StyleBox] for the [Button]. diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index 23cee45fa..beb8b5177 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -231,6 +231,7 @@ void fill_default_theme(Ref &theme, const Ref &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);