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

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

Issue 2541583002: [Mac] Don't flip window controls in RTL for macOS < 10.12 (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/profiles/profile_chooser_controller.mm
diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
index 6229156584b2c58a9571b3c1405cf6bc781bc8d0..988e555dac87432cecc0621c08ea2fd3a2f32f33 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -43,6 +43,7 @@
#include "chrome/browser/ui/cocoa/chrome_style.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
+#include "chrome/browser/ui/cocoa/l10n_util.h"
#include "chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.h"
#import "chrome/browser/ui/cocoa/profiles/user_manager_mac.h"
#include "chrome/browser/ui/profile_chooser_constants.h"
@@ -1367,7 +1368,10 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME)
forAttribute:NSAccessibilityHelpAttribute];
- [[self bubble] setAlignment:info_bubble::kAlignTrailingEdgeToAnchorEdge];
+ [[self bubble]
+ setAlignment:cocoa_l10n_util::ShouldFlipWindowControlsInRTL()
+ ? info_bubble::kAlignTrailingEdgeToAnchorEdge
+ : info_bubble::kAlignLeadingEdgeToAnchorEdge];
[[self bubble] setArrowLocation:info_bubble::kNoArrow];
[[self bubble] setBackgroundColor:GetDialogBackgroundColor()];
[self initMenuContentsWithView:viewMode_];
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/avatar_base_controller.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