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

Unified Diff: chrome/browser/ui/cocoa/browser_window_layout.mm

Issue 2489373002: [Mac] (More) RTL support for tab strip (Closed)
Patch Set: Created 4 years, 1 month 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
Index: chrome/browser/ui/cocoa/browser_window_layout.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_layout.mm b/chrome/browser/ui/cocoa/browser_window_layout.mm
index b9dc6328d96078f6ed13db66fb3950db546c4192..05165b3b4d50204ecbe23f51762d67b4a63ae1b5 100644
--- a/chrome/browser/ui/cocoa/browser_window_layout.mm
+++ b/chrome/browser/ui/cocoa/browser_window_layout.mm
@@ -210,7 +210,7 @@ const CGFloat kLocationBarRightOffset = 35;
// Set left indentation based on fullscreen mode status.
if (!parameters_.inAnyFullscreen || layout.addCustomWindowControls)
- layout.leftIndent = [TabStripController defaultLeftIndentForControls];
+ layout.leadingIndent = [TabStripController defaultLeadingIndentForControls];
// Lay out the icognito/avatar badge because calculating the indentation on
// the right depends on it.
@@ -257,10 +257,9 @@ const CGFloat kLocationBarRightOffset = 35;
if (parameters_.shouldShowAvatar) {
maxX = std::min(maxX, NSMinX(layout.avatarFrame));
}
- layout.rightIndent = width - maxX;
+ layout.trailingIndent = width - maxX;
if (cocoa_l10n_util::ShouldDoExperimentalRTLLayout()) {
- std::swap(layout.leftIndent, layout.rightIndent);
layout.avatarFrame.origin.x =
width - parameters_.avatarSize.width - layout.avatarFrame.origin.x;
}
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_layout.h ('k') | chrome/browser/ui/cocoa/browser_window_layout_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698