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

Fix OptionButton minimum size when "Fit Longest Item" is enabled #80366

Merged

Conversation

timothyqiu
Copy link
Member

OptionButton's minimum size is wrong when "Fit Longest Item" is enabled and there is no item.

Before After
ksnip_20230807-172654 ksnip_20230807-172656

_refresh_size_cache() is moved away from the constructor because it needs to access theme_cache.normal which is not available until NOTIFICATION_POSTINITIALIZE.

@timothyqiu timothyqiu added bug topic:gui cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release labels Aug 7, 2023
@timothyqiu timothyqiu added this to the 4.2 milestone Aug 7, 2023
@timothyqiu timothyqiu requested a review from a team as a code owner August 7, 2023 09:33
Copy link
Contributor

@YuriSizov YuriSizov left a comment

Choose a reason for hiding this comment

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

Makes sense, good catch!

@akien-mga akien-mga merged commit b49478a into godotengine:master Aug 8, 2023
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@timothyqiu timothyqiu deleted the option-button-lean-and-mean branch August 8, 2023 15:08
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.1.3.

@YuriSizov YuriSizov removed the cherrypick:4.1 Considered for cherry-picking into a future 4.1.x release label Oct 19, 2023
@YuriSizov YuriSizov changed the title Fix OptionButton min size when fit longest item is enabled Fix OptionButton minimum size when "Fit Longest Item" is enabled Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants