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

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

Issue 2313723004: cocoa: flip window controls and profile switcher for RTL (Closed)
Patch Set: 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
Index: chrome/browser/ui/cocoa/framed_browser_window.mm
diff --git a/chrome/browser/ui/cocoa/framed_browser_window.mm b/chrome/browser/ui/cocoa/framed_browser_window.mm
index 8896803a6a594263263a2edc2ec746a74c8b23d8..5b3be052e2a41def45f302c30f32cb6e2d69d9ea 100644
--- a/chrome/browser/ui/cocoa/framed_browser_window.mm
+++ b/chrome/browser/ui/cocoa/framed_browser_window.mm
@@ -6,6 +6,7 @@
#include <stddef.h>
+#include "base/i18n/rtl.h"
#include "base/logging.h"
#include "base/mac/sdk_forward_declarations.h"
#include "chrome/browser/global_keyboard_shortcuts_mac.h"
@@ -160,6 +161,11 @@ - (void)adjustButton:(NSButton*)button
break;
}
+ if (base::i18n::IsRTL()) {
+ buttonFrame.origin.x = NSWidth([self frame]) - buttonFrame.origin.x -
+ NSWidth([button frame]);
+ }
+
BOOL didPost = [button postsBoundsChangedNotifications];
[button setPostsFrameChangedNotifications:NO];
[button setFrame:buttonFrame];

Powered by Google App Engine
This is Rietveld 408576698