-
Notifications
You must be signed in to change notification settings - Fork 28.8k
Dropdown height large scale text fix #107201
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
Conversation
…r dropdown button
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
@gspencergoog I have already accepted the CLA, thanks |
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.
|
Validations Fail. |
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.
RSLGTM
Manually merging as discussed in the Flutter rollers chat. |
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…large for dropdown button (flutter/flutter#107201)
…r dropdown button (flutter#107201)
…159975) ## Description This PR fixes `DropdownButtonFormField` text being clipped when using a large text scale. Before:  After:  This extend the fix from #107201 which does not work properly with Material 3 (because of TextStyle.height being set for M3 default text styles). ## Related Issue Fixes [DropdownButtonFormField clips text when large text scale is used and useMaterial3 is true](#159971) ## Tests Adds 1 test. Updates 1 test.
…lutter#159975) ## Description This PR fixes `DropdownButtonFormField` text being clipped when using a large text scale. Before:  After:  This extend the fix from flutter#107201 which does not work properly with Material 3 (because of TextStyle.height being set for M3 default text styles). ## Related Issue Fixes [DropdownButtonFormField clips text when large text scale is used and useMaterial3 is true](flutter#159971) ## Tests Adds 1 test. Updates 1 test.
This PR fixes the problem where large scale text gets cut off in the dropdown button. The current calculation of height of the button only uses fontSize, which does not reflect the actual size of the text when a text scale factor of more than 1.0 is specified.
To fix this problem, I scaled the fontSize according to text scale, before using this new text size to calculate the button height.
Fixes #106359