[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

@ -187,6 +187,8 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_constant("h_separation", "Button", Math::round(4 * scale));
theme->set_constant("icon_max_width", "Button", 0);
theme->set_constant("align_to_largest_stylebox", "Button", 0); // Disabled.
// MenuBar
theme->set_stylebox(CoreStringName(normal), "MenuBar", button_normal);
theme->set_stylebox("hover", "MenuBar", button_hover);