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

[v8] Fix: Fancy Button Content Fitting #152

Merged
merged 9 commits into from
Apr 15, 2024
Merged

Conversation

bbazukun123
Copy link
Collaborator

  • Reset text/icon view scaling back to the default scale before doing the fitToView call to prevent the persistent of scale < 1 from the initial fitting.
    eg. if the button default view texture has a width of 150 and the content text has a width of 200, it will apply 0.75 scaling to the text view to fit it within the button (assuming that the padding is 0). Then if the button width is then set to 250, the text will still remain at 0.75 despite that it no longer needed to be scaled down to fit within the button.
  • A ignoreRefitting is provided in case the persistent scaling behaviour from before is preferred.
  • Add the ability to pass in the base scale for text and icon at instantiation. This will be prioritise over the automatic extraction from the new text or icon views.
  • Add the ability to disable uniform scaling on the fitToView function to allow the child to maintain its aspect ratio from before the fitting.

@Zyie Zyie merged commit 2f52b66 into dev Apr 15, 2024
3 checks passed
@Zyie Zyie deleted the fix/fancy-button-content-fitting-v8 branch April 15, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants