Merge pull request #38559 from Chaosus/button_icon_styles
Reveals Button "icon_color" style properties to the user
This commit is contained in:
commit
e330b945b7
2 changed files with 21 additions and 0 deletions
|
@ -139,6 +139,21 @@
|
|||
<theme_item name="hseparation" type="int" default="2">
|
||||
The horizontal space between [Button]'s icon and text.
|
||||
</theme_item>
|
||||
<theme_item name="icon_disabled_color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Icon modulate [Color] used when the [Button] is disabled.
|
||||
</theme_item>
|
||||
<theme_item name="icon_hover_color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Icon modulate [Color] used when the [Button] is being hovered.
|
||||
</theme_item>
|
||||
<theme_item name="icon_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Icon modulate [Color] used when the [Button] is being hovered and pressed.
|
||||
</theme_item>
|
||||
<theme_item name="icon_normal_color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Default icon [Color] of the [Button].
|
||||
</theme_item>
|
||||
<theme_item name="icon_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )">
|
||||
Icon modulate [Color] used when the [Button] is being pressed.
|
||||
</theme_item>
|
||||
<theme_item name="normal" type="StyleBox">
|
||||
Default [StyleBox] for the [Button].
|
||||
</theme_item>
|
||||
|
|
|
@ -191,6 +191,12 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
|
|||
theme->set_color("font_disabled_color", "Button", control_font_disabled_color);
|
||||
theme->set_color("font_outline_color", "Button", Color(1, 1, 1));
|
||||
|
||||
theme->set_color("icon_normal_color", "Button", Color(1, 1, 1, 1));
|
||||
theme->set_color("icon_pressed_color", "Button", Color(1, 1, 1, 1));
|
||||
theme->set_color("icon_hover_color", "Button", Color(1, 1, 1, 1));
|
||||
theme->set_color("icon_hover_pressed_color", "Button", Color(1, 1, 1, 1));
|
||||
theme->set_color("icon_disabled_color", "Button", Color(1, 1, 1, 1));
|
||||
|
||||
theme->set_constant("hseparation", "Button", 2 * scale);
|
||||
|
||||
// LinkButton
|
||||
|
|
Loading…
Reference in a new issue