Skip to content

ax::ui::Button: Is there a method to resize the title text automatically? #2519

Closed Answered by rh101
aismann asked this question in Q&A
Discussion options

You must be logged in to vote

There is no method in the ui::Button API to set the internal label to Overflow::SHRINK. At the moment the only way to set it is via Label::getTitleRenderer(), but that may not be enough either, depending on what kind of graphic is used. So, that means the label dimensions would also need to be set.

A clear example of this is the screenshot in your post, where the button dimensions cannot be used for the label, since it should fit in the blue area, and not all the way to the grey edges.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by aismann
Comment options

aismann
May 1, 2025
Collaborator Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants