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

Unified Diff: chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm

Issue 2346783002: mac rtl: pin profile switcher to left edge in 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/profiles/avatar_button_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
index 6163f015f1daf352ec8af7f7bcdc90c51664d6d1..34550ea1612a57bd3f008c66bdb3b5e9ddd10892 100644
--- a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm
@@ -16,6 +16,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
+#include "chrome/browser/ui/cocoa/l10n_util.h"
#import "chrome/browser/ui/cocoa/profiles/avatar_button.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
@@ -219,7 +220,10 @@ - (id)initWithBrowser:(Browser*)browser {
[[avatarButton cell] setHighlightsBy:NSNoCellMask];
[avatarButton setBordered:YES];
- [avatarButton setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin];
+ if (cocoa_l10n_util::ExperimentalMacRTLIsEnabled())
+ [avatarButton setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin];
+ else
+ [avatarButton setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin];
[avatarButton setTarget:self];
[avatarButton setAction:@selector(buttonClicked:)];
[avatarButton setRightAction:@selector(buttonRightClicked:)];

Powered by Google App Engine
This is Rietveld 408576698