[Button] Adds theme option to align button text and icon to either largest or current stylebox.

This commit is contained in:
bruvzg
2024-06-02 22:53:17 +03:00
parent 5241d30bfa
commit 721a663aa3
5 changed files with 43 additions and 10 deletions

View File

@@ -118,6 +118,9 @@
<theme_item name="icon_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
Icon modulate [Color] used when the [Button] is being pressed.
</theme_item>
<theme_item name="align_to_largest_stylebox" data_type="constant" type="int" default="0">
This constant acts as a boolean. If [code]true[/code], text and icon are always aligned to the largest stylebox margins, otherwise it's aligned to the current button state stylebox margins.
</theme_item>
<theme_item name="h_separation" data_type="constant" type="int" default="4">
The horizontal space between [Button]'s icon and text. Negative values will be treated as [code]0[/code] when used.
</theme_item>