Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jun 2, 2024

Alternative to #92625

Adds new theme option (disabled for default theme and enabled for the editor theme) to control whether button elements are aligned to largest or current stylebox.

Fixes button issues cause by #92009 without reintroducing #92009 (comment)

Fixes #92602
Fixes #92466

@bruvzg bruvzg added this to the 4.3 milestone Jun 2, 2024
@bruvzg bruvzg requested review from a team as code owners June 2, 2024 19:57
scene/gui/button.h Outdated Show resolved Hide resolved
@passivestar
Copy link
Contributor

Tested, hover-pressed buttons look fine, including icons, but this doesn't seem to fix #92466:

image

@bruvzg
Copy link
Member Author

bruvzg commented Jun 4, 2024

Tested, hover-pressed buttons look fine, including icons, but this doesn't seem to fix #92466:

Updated, should fix it as well.

@passivestar
Copy link
Contributor

Updated, should fix it as well.

Works 🙏

@akien-mga akien-mga requested a review from KoBeWi June 7, 2024 21:05
@bruvzg bruvzg mentioned this pull request Jun 8, 2024
scene/gui/button.cpp Outdated Show resolved Hide resolved
@@ -828,6 +850,8 @@ void Button::_bind_methods() {

BIND_THEME_ITEM(Theme::DATA_TYPE_CONSTANT, Button, h_separation);
BIND_THEME_ITEM(Theme::DATA_TYPE_CONSTANT, Button, icon_max_width);

Copy link
Member

@KoBeWi KoBeWi Jun 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Although the types aren't really sorted/grouped properly anway.

@akien-mga akien-mga merged commit 1415684 into godotengine:master Jun 11, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants