-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Remove font height restriction from Button #60867
The head ref may contain hidden characters: "\u03BCtext"
Conversation
How does this behave when the button is within a Container with no custom minimum size set? |
It shrinks to the stylebox size (the same as show in the GIF). This change only affects buttons without text, so it doesn't break anything in majority of the cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me. However, we have to keep in mind that this has an effect on the editor UI (vertical shrinking), which might require some adjustments. For example, the OptionButton arrow isn't centered anymore in some cases and a few controls which had the same height before now have different heights. Both observable here:
Before:
After:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a bad idea. Could be useful for icon-only buttons where the font height is taller than the icon.
@Geometror OptionButton will be handled by #59303, other buttons don't really have this problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe bruvzg's suggestion makes sense actually... EDIT: |
The shrinking is still present (at least in color theme overrides section) but I agree with what @YuriSizov said, this could be fixed by adjusting the ColorPickerButton style/minsize (in this or a subsequent PR). |
So from the above discussion it sounds like there are still pending issues to solve before merging this? |
There are some tweaks that need to be done to buttons that don't have any text, but it could be left for a subsequent PR. Not sure what's preferred; it's not directly related to the changes here. |
I think this can be merged. The tweaks needed for the editor UI can be done separately. |
Thanks! |
Possible fix #35005
The button height is determined by the text buffer, so additinally using font height is not necessary.