Skip to content

Commit

Permalink
[ios] Fix font for ClearBrowsingDataTableView Button
Browse files Browse the repository at this point in the history
UIButton's don't handle dynamic types well. So we'll keep it fixed at a bold 17px.

Screenshots: https://drive.google.com/file/d/1befS0btYrluxxdfjZ-RJJ4aUnluyylX8/view?usp=sharing
https://drive.google.com/file/d/1tQSYQrDqmWuWhNVmJkYxjHy9Yp75OZ9L/view?usp=sharing

Bug: 865008

Change-Id: Ic76e8264123b647cfe19e580e1abdd98b9e6a229
Reviewed-on: https://chromium-review.googlesource.com/1145227
Commit-Queue: Chris Lu <[email protected]>
Reviewed-by: Sergio Collazos <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#576929}(cherry picked from commit 2a982a1)
Reviewed-on: https://chromium-review.googlesource.com/1148614
Cr-Commit-Position: refs/branch-heads/3497@{#56}
Cr-Branched-From: 271eaf5-refs/heads/master@{#576753}
  • Loading branch information
Chris Lu authored and Sergio Collazos committed Jul 24, 2018
1 parent 8d916fa commit 4c7997d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
const CGFloat buttonTitleVerticalContentInset = 8.0;
// Button corner radius.
const CGFloat buttonCornerRadius = 8;
// Font Size for Button Title Label.
const CGFloat buttonTitleFontSize = 17.0;
} // namespace

@implementation TableViewTextButtonItem
Expand Down Expand Up @@ -83,7 +85,7 @@ - (instancetype)initWithStyle:(UITableViewCellStyle)style
forState:UIControlStateNormal];
self.button.translatesAutoresizingMaskIntoConstraints = NO;
[self.button.titleLabel
setFont:[UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]];
setFont:[UIFont boldSystemFontOfSize:buttonTitleFontSize]];
self.button.layer.cornerRadius = buttonCornerRadius;
self.button.clipsToBounds = YES;
self.button.contentEdgeInsets = UIEdgeInsetsMake(
Expand Down

0 comments on commit 4c7997d

Please sign in to comment.