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

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: ExperimentalMacRTLIsEnabled -> ShouldDoExperimentalRTLLayout 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 | « chrome/browser/ui/cocoa/new_tab_button.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f2237984e14f7fbfdb8c307a7810b1f42610161c 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::ShouldDoExperimentalRTLLayout())
+ [avatarButton setAutoresizingMask:NSViewMaxXMargin | NSViewMinYMargin];
+ else
+ [avatarButton setAutoresizingMask:NSViewMinXMargin | NSViewMinYMargin];
[avatarButton setTarget:self];
[avatarButton setAction:@selector(buttonClicked:)];
[avatarButton setRightAction:@selector(buttonRightClicked:)];
« no previous file with comments | « chrome/browser/ui/cocoa/new_tab_button.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698