Răsfoiți Sursa

Fix Button not listing `hover_pressed` stylebox

Haoyu Qiu 10 luni în urmă
părinte
comite
cc11089786
2 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 3 0
      doc/classes/Button.xml
  2. 1 0
      scene/resources/default_theme/default_theme.cpp

+ 3 - 0
doc/classes/Button.xml

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

+ 1 - 0
scene/resources/default_theme/default_theme.cpp

@@ -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("normal", "Button", sb_button_normal);
 	theme->set_stylebox("pressed", "Button", sb_button_pressed);
 	theme->set_stylebox("pressed", "Button", sb_button_pressed);
 	theme->set_stylebox("hover", "Button", sb_button_hover);
 	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("disabled", "Button", sb_button_disabled);
 	theme->set_stylebox("focus", "Button", sb_button_focus);
 	theme->set_stylebox("focus", "Button", sb_button_focus);