Commit 0651b89f authored by Nohemi Fernandez's avatar Nohemi Fernandez Committed by Commit Bot

[iOS] Only change action button axis on Sign-in with accessible font.

Updates the requirements for changing the layout axis to display on
a vertical axis when the user turns on "Larger Accessibility Sizes".

Bug: 1110243
Change-Id: Ib4eb3c915298a8cae3606e41c0ea63a2ff1ae062
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2390913Reviewed-by: default avatarJavier Ernesto Flores Robles <javierrobles@chromium.org>
Commit-Queue: Nohemi Fernandez <fernandex@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804395}
parent dd12689c
......@@ -286,15 +286,22 @@ enum AuthenticationButtonType {
[NSLayoutConstraint deactivateConstraints:self.compactSizeClassConstraints];
[NSLayoutConstraint activateConstraints:self.regularSizeClassConstraints];
fontStyle = UIFontTextStyleTitle2;
self.actionButtonsView.axis = UILayoutConstraintAxisHorizontal;
} else {
[NSLayoutConstraint deactivateConstraints:self.regularSizeClassConstraints];
[NSLayoutConstraint activateConstraints:self.compactSizeClassConstraints];
fontStyle = UIFontTextStyleSubheadline;
self.actionButtonsView.axis = UILayoutConstraintAxisVertical;
}
[self applyDefaultSizeWithButton:self.confirmationButton fontStyle:fontStyle];
[self applyDefaultSizeWithButton:self.skipSigninButton fontStyle:fontStyle];
// For larger texts update the layout to display buttons centered on the
// vertical axis.
if (UIContentSizeCategoryIsAccessibilityCategory(
self.traitCollection.preferredContentSizeCategory)) {
self.actionButtonsView.axis = UILayoutConstraintAxisVertical;
} else {
self.actionButtonsView.axis = UILayoutConstraintAxisHorizontal;
}
}
#pragma mark - Properties
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment