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

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

Issue 2546753002: [Mac] Fix avatar bubble alignment logic (Closed)
Patch Set: Rebase Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 988e555dac87432cecc0621c08ea2fd3a2f32f33..c6f5b449cac641c6bc23e0fe581307aaaf836061 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -1367,11 +1367,13 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
[window accessibilitySetOverrideValue:
l10n_util::GetNSString(IDS_PROFILES_NEW_AVATAR_MENU_ACCESSIBLE_NAME)
forAttribute:NSAccessibilityHelpAttribute];
-
+ BOOL shouldUseLeadingEdgeForBubble =
+ cocoa_l10n_util::ShouldDoExperimentalRTLLayout() &&
+ !cocoa_l10n_util::ShouldFlipWindowControlsInRTL();
[[self bubble]
- setAlignment:cocoa_l10n_util::ShouldFlipWindowControlsInRTL()
- ? info_bubble::kAlignTrailingEdgeToAnchorEdge
- : info_bubble::kAlignLeadingEdgeToAnchorEdge];
+ setAlignment:shouldUseLeadingEdgeForBubble
+ ? info_bubble::kAlignLeadingEdgeToAnchorEdge
+ : info_bubble::kAlignTrailingEdgeToAnchorEdge];
[[self bubble] setArrowLocation:info_bubble::kNoArrow];
[[self bubble] setBackgroundColor:GetDialogBackgroundColor()];
[self initMenuContentsWithView:viewMode_];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698