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

Unified Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm

Issue 2714193004: [Mac RTL] Fix the RTLness of the website settings bubble header. (Closed)
Patch Set: Created 3 years, 10 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: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
index 31b9d3c240e563cc295f4abb0f0d254758d22be0..7b3c59a2a6a4bacb1426a9c57d17ce2fc89f8e95 100644
--- a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
@@ -346,13 +346,17 @@ bool IsInternalURL(const GURL& url) {
resetDecisionsField_ = nil;
resetDecisionsButton_ = nil;
- NSString* connectionHelpButtonText =
- l10n_util::GetNSString(IDS_LEARN_MORE);
+ NSString* connectionHelpButtonText = l10n_util::GetNSString(IDS_LEARN_MORE);
connectionHelpButton_ = [self addLinkButtonWithText:connectionHelpButtonText
- toView:securitySectionView];
+ toView:securitySectionView];
[connectionHelpButton_ setTarget:self];
[connectionHelpButton_ setAction:@selector(openConnectionHelp:)];
+ if (base::i18n::IsRTL()) {
+ securitySummaryField_.alignment = NSRightTextAlignment;
+ securityDetailsField_.alignment = NSRightTextAlignment;
lgrey 2017/02/24 22:11:56 Would an unconditional NSNaturalTextAlignment work
Avi (use Gerrit) 2017/02/27 16:51:42 No; when I try it out it keeps left aligning the t
+ }
+
return securitySectionView.get();
}
@@ -507,10 +511,13 @@ bool IsInternalURL(const GURL& url) {
yPos = [self setYPositionOfView:securityDetailsField_
to:yPos + kSecurityParagraphSpacing];
- [connectionHelpButton_
- setFrameOrigin:NSMakePoint(
- kSectionHorizontalPadding - kLinkButtonXAdjustment,
- yPos)];
+ NSPoint helpOrigin =
+ NSMakePoint(kSectionHorizontalPadding - kLinkButtonXAdjustment, yPos);
+ if (base::i18n::IsRTL()) {
+ helpOrigin.x = NSWidth([contentView_ frame]) - helpOrigin.x -
+ NSWidth(connectionHelpButton_.frame);
+ }
+ [connectionHelpButton_ setFrameOrigin:helpOrigin];
yPos = NSMaxY([connectionHelpButton_ frame]);
if (resetDecisionsButton_) {
« 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