mastodon-ios icon indicating copy to clipboard operation
mastodon-ios copied to clipboard

[Welcome] Allow buttons to grow with Dynamic Type.

Open jverkoey opened this issue 1 year ago • 1 comments

The buttons now have a minimum height rather than a constant height. Note that this primarily affects larger Dynamic Type modes. Smaller modes than "Large" will not change the button's size; this ensures that the buttons have a reasonable tap target in all Dynamic Type configurations.

Also made a couple minor improvements / bug fixes:

  • Both buttons now react to Dynamic Type settings changes (enabled adjustsFontForContentSizeCategory).
  • A layout pass is now enforced in traitCollectionDidChange to ensure that setupButtonShadowView is using the right bounds. This also fixes a landscape layout shadow bug.
  • signUpButtonShadowView now uses signUpButton's bounds.
  • The buttons are now configured with contentEdgeInsets so that there's always adequate padding, even at the largest Dynamic Type configurations.

Part of https://github.com/mastodon/mastodon-ios/issues/191

Dynamic Type Before After
AX5: buttons are larger The Mastodon welcome screen in AX5 mode. The button titles are partially clipped The Mastodon welcome screen in AX5 mode. The buttons are slightly larger, affording more space for the button titles
Large: no changes The Mastodon welcome screen at the default size The Mastodon welcome screen in the default size. There are no visual changes from before

jverkoey avatar Nov 12 '22 21:11 jverkoey

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 12 '22 21:11 CLAassistant