Commit 80d10624 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Disables Dynamic type for ConfirmInfobarView on iOS13.

Used the size and weight from:
https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/typography/

Bug: 989761
Change-Id: Ife83bf55ab112ec61fccab329be5c908d83df3c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1884363Reviewed-by: default avatarPeter Lee <pkl@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710040}
parent ce36e7f7
......@@ -86,19 +86,35 @@ enum InfoBarButtonPosition { ON_FIRST_LINE, CENTER, LEFT, RIGHT };
// Returns the font for the Infobar's main body text.
UIFont* InfoBarLabelFont() {
// Due to https://crbug.com/989761, disable dynamic type. Once migration to
// Messages is complete, this class will be deleted.
if (@available(iOS 13, *)) {
return [UIFont systemFontOfSize:17];
} else {
return [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
}
}
// Returns the font for the Infobar's toggle switch's (if one exists) body text.
// This text label is usually of a slightly smaller font size relative to
// InfoBarLabelFont().
UIFont* InfoBarSwitchLabelFont() {
// Due to https://crbug.com/989761, disable dynamic type. Once migration to
// Messages is complete, this class will be deleted.
if (@available(iOS 13, *)) {
return [UIFont systemFontOfSize:17];
} else {
return [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
}
}
// Returns the font for the label on Infobar's action buttons.
UIFont* InfoBarButtonLabelFont() {
// Due to https://crbug.com/989761, disable dynamic type. Once migration to
// Messages is complete, this class will be deleted.
if (@available(iOS 13, *)) {
return [UIFont systemFontOfSize:17 weight:UIFontWeightSemibold];
} else {
return [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];
}
}
UIImage* InfoBarCloseImage() {
......
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