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

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

Issue 2313723004: cocoa: flip window controls and profile switcher for RTL (Closed)
Patch Set: add ExperimentalMacRTL feature Created 4 years, 3 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 | chrome/browser/ui/cocoa/framed_browser_window.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 84a1c83ef8fd429487f83e44748458b6baa1c08d..e784a4682a164288d25d48c5d5db6d855285f378 100644
--- a/chrome/browser/ui/cocoa/browser_window_layout.mm
+++ b/chrome/browser/ui/cocoa/browser_window_layout.mm
@@ -7,8 +7,10 @@
#include <math.h>
#include <string.h>
+#include "base/i18n/rtl.h"
#include "base/logging.h"
#include "base/mac/mac_util.h"
+#include "chrome/browser/ui/cocoa/l10n_util.h"
#import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
namespace chrome {
@@ -248,6 +250,12 @@ - (void)computeTabStripLayout {
}
layout.rightIndent = width - maxX;
+ if (cocoa_l10n_util::ExperimentalMacRTLIsEnabled() && base::i18n::IsRTL()) {
+ std::swap(layout.leftIndent, layout.rightIndent);
+ layout.avatarFrame.origin.x =
+ width - parameters_.avatarSize.width - layout.avatarFrame.origin.x;
+ }
+
output_.tabStripLayout = layout;
}
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/framed_browser_window.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698