Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: ios/chrome/browser/ui/reading_list/reading_list_toolbar.mm

Issue 2616933004: Align the text in ReadingList buttons at center (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/reading_list/reading_list_toolbar.mm
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_toolbar.mm b/ios/chrome/browser/ui/reading_list/reading_list_toolbar.mm
index 1827e261c78012b90a8c6d5bc40631362fbadd3f..838ccc552947b321bab6fba69223c273c46d2c6e 100644
--- a/ios/chrome/browser/ui/reading_list/reading_list_toolbar.mm
+++ b/ios/chrome/browser/ui/reading_list/reading_list_toolbar.mm
@@ -250,38 +250,32 @@ typedef NS_ENUM(NSInteger, ButtonPositioning) { Leading, Centered, Trailing };
[[button titleLabel]
setFont:[[MDCTypography fontLoader] regularFontOfSize:14]];
- NSTextAlignment textAlignement;
UIControlContentHorizontalAlignment horizontalAlignement;
switch (position) {
case Leading:
if (UseRTLLayout()) {
horizontalAlignement = UIControlContentHorizontalAlignmentRight;
- textAlignement = NSTextAlignmentRight;
} else {
horizontalAlignement = UIControlContentHorizontalAlignmentLeft;
- textAlignement = NSTextAlignmentLeft;
}
break;
case Centered:
horizontalAlignement = UIControlContentHorizontalAlignmentCenter;
- textAlignement = NSTextAlignmentCenter;
break;
case Trailing:
if (UseRTLLayout()) {
horizontalAlignement = UIControlContentHorizontalAlignmentLeft;
- textAlignement = NSTextAlignmentLeft;
} else {
horizontalAlignement = UIControlContentHorizontalAlignmentRight;
- textAlignement = NSTextAlignmentRight;
}
break;
}
button.contentHorizontalAlignment = horizontalAlignement;
- button.titleLabel.textAlignment = textAlignement;
+ button.titleLabel.textAlignment = NSTextAlignmentCenter;
return button;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698