Commit 21422bfb authored by sczs's avatar sczs Committed by Commit Bot

[ios] Limits InfobarBanner button font to 45 pts.

Bug: 963604
Change-Id: I0756aadcc3573eeb917e1ab097d2a16e64f2c584
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1621077Reviewed-by: default avatarPeter Lee <pkl@chromium.org>
Reviewed-by: default avatarChris Lu <thegreenfrog@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661731}
parent 582606e2
......@@ -42,6 +42,7 @@ const int kSubTitleLabelColor = 0x7F868C;
const CGFloat kButtonWidth = 100.0;
const CGFloat kButtonSeparatorWidth = 1.0;
const int kButtonSeparatorColor = 0xF1F3F4;
const CGFloat kButtonMaxFontSize = 45;
// Container Stack constants.
const CGFloat kContainerStackSpacing = 18.0;
......@@ -152,8 +153,10 @@ const CGFloat kLongPressTimeDurationInSeconds = 0.4;
// Button setup.
self.infobarButton = [UIButton buttonWithType:UIButtonTypeSystem];
[self.infobarButton setTitle:self.buttonText forState:UIControlStateNormal];
self.infobarButton.titleLabel.font =
[UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];
self.infobarButton.titleLabel.font = [[UIFontMetrics defaultMetrics]
scaledFontForFont:[UIFont
preferredFontForTextStyle:UIFontTextStyleHeadline]
maximumPointSize:kButtonMaxFontSize];
[self.infobarButton addTarget:self
action:@selector(bannerInfobarButtonWasPressed:)
forControlEvents:UIControlEventTouchUpInside];
......
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