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

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

Issue 516163003: Fix UI glitches in the new avatar bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | 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 3cecab24012d903501d002ad5f5abeb516fac227..b6e95a882aad208009535bc4549cfcdc32be4bbf 100644
--- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
+++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
@@ -94,7 +94,7 @@ const CGFloat kFixedGaiaViewHeight = 440;
const CGFloat kFixedAccountRemovalViewWidth = 280;
// Fixed size for the switch user view.
-const int kFixedSwitchUserViewWidth = 280;
+const int kFixedSwitchUserViewWidth = 320;
// The tag number for the primary account.
const int kPrimaryProfileTag = -1;
@@ -230,7 +230,7 @@ NSView* BuildTitleCard(NSRect frame_rect,
[container addSubview:button];
[container addSubview:title_label];
CGFloat height = std::max(NSMaxY([title_label frame]),
- NSMaxY([button frame])) + kSmallVerticalSpacing;
+ NSMaxY([button frame])) + kVerticalSpacing;
[container setFrameSize:NSMakeSize(NSWidth([container frame]), height)];
return container.autorelease();
@@ -1878,7 +1878,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
NSBox* separator = [self horizontalSeparatorWithFrame:
NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0)];
[container addSubview:separator];
- yOffset = NSMaxY([separator frame]) + kSmallVerticalSpacing;
+ yOffset = NSMaxY([separator frame]) + kVerticalSpacing;
NSView* titleView = BuildTitleCard(
NSMakeRect(0, yOffset, kFixedGaiaViewWidth, 0),
@@ -1950,7 +1950,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
NSBox* separator = [self horizontalSeparatorWithFrame:
NSMakeRect(0, yOffset, kFixedAccountRemovalViewWidth, 0)];
[container addSubview:separator];
- yOffset = NSMaxY([separator frame]) + kSmallVerticalSpacing;
+ yOffset = NSMaxY([separator frame]) + kVerticalSpacing;
NSView* titleView = BuildTitleCard(
NSMakeRect(0, yOffset, kFixedAccountRemovalViewWidth,0),
@@ -1990,7 +1990,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
yOffset = NSMaxY([disconnectButton frame]);
NSBox* separator = [self horizontalSeparatorWithFrame:
- NSMakeRect(0, yOffset, kFixedMenuWidth, 0)];
+ NSMakeRect(0, yOffset, kFixedSwitchUserViewWidth, 0)];
[container addSubview:separator];
yOffset = NSMaxY([separator frame]);
@@ -2006,7 +2006,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
yOffset = NSMaxY([addPersonButton frame]);
separator = [self horizontalSeparatorWithFrame:
- NSMakeRect(0, yOffset, kFixedMenuWidth, 0)];
+ NSMakeRect(0, yOffset, kFixedSwitchUserViewWidth, 0)];
[container addSubview:separator];
yOffset = NSMaxY([separator frame]);
@@ -2026,7 +2026,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
separator = [self horizontalSeparatorWithFrame:
NSMakeRect(0, yOffset, kFixedSwitchUserViewWidth, 0)];
[container addSubview:separator];
- yOffset = NSMaxY([separator frame]) + kSmallVerticalSpacing;
+ yOffset = NSMaxY([separator frame]) + kVerticalSpacing;
NSView* titleView = BuildTitleCard(
NSMakeRect(0, yOffset, kFixedSwitchUserViewWidth,0),
@@ -2036,7 +2036,7 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
[container addSubview:titleView];
yOffset = NSMaxY([titleView frame]);
- [container setFrameSize:NSMakeSize(kFixedAccountRemovalViewWidth, yOffset)];
+ [container setFrameSize:NSMakeSize(kFixedSwitchUserViewWidth, yOffset)];
return container.autorelease();
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698