Wenyu Zhang
|
8c407c22c4
|
[Dialogs] Layout MDC Dialogs correctly for tall fonts. (#7126)
Closes https://github.com/material-components/material-components-ios/issues/7062
Reference: cl/241537224
Layout MDC Dialogs correctly for tall fonts
The MDC Dialog layout code had some hard coded assumptions about the amount of vertical space to allocate for action buttons that were violated when using taller fonts such as Urdu with large Dynamic Type sizes.
There was also a related bug where vertical vs. horizontal action button layout was calculated in two different places.
Snapshot test before change:
<img width="569" alt="snapshot_test_goldens_goldens_64_MDCAlertControllerLocalizationSnapshotTests_testPreferredContentSizeWithNotoNastaliqUrdu_11_2@2x_Before_01dd7fb1a36bc24b27e05c1079c6420994c9f904" src="https://user-images.githubusercontent.com/8836258/56166158-dc7c8700-5fa2-11e9-8fa1-ed4dbfdc947b.png">
Snapshot test result after change:
<img width="569" alt="snapshot_test_goldens_goldens_64_MDCAlertControllerLocalizationSnapshotTests_testPreferredContentSizeWithNotoNastaliqUrdu_11_2@2x_After_78d3fd9172a202641400c0536a9c2e3a33b0455b" src="https://user-images.githubusercontent.com/8836258/56166182-e7371c00-5fa2-11e9-976e-4f9c93efc98f.png">
Example screenshot before change:

Example screenshot after change:

|
2019-04-15 19:26:55 -04:00 |
|