summaryrefslogtreecommitdiffstats
path: root/ui/app_list
diff options
context:
space:
mode:
authortapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 01:19:14 +0000
committertapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 01:19:14 +0000
commit731a894ef76c1a6d9353106c6179de4a34bc1b47 (patch)
treea0494d4305279fefd8f25105c9c698873f819836 /ui/app_list
parent42c94c7c60a6edac354da55f3c00166e68904629 (diff)
downloadchromium_src-731a894ef76c1a6d9353106c6179de4a34bc1b47.zip
chromium_src-731a894ef76c1a6d9353106c6179de4a34bc1b47.tar.gz
chromium_src-731a894ef76c1a6d9353106c6179de4a34bc1b47.tar.bz2
Update separator padding for the signed-in menu item in the OSX App Lanucher.
Padding in the app list tools menu should match padding in the hotdog menu. BUG=271798 TEST=Visual Review URL: https://chromiumcodereview.appspot.com/22796003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/app_list')
-rw-r--r--ui/app_list/cocoa/current_user_menu_item_view.mm9
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/app_list/cocoa/current_user_menu_item_view.mm b/ui/app_list/cocoa/current_user_menu_item_view.mm
index 6aac34c6..94ac0dd 100644
--- a/ui/app_list/cocoa/current_user_menu_item_view.mm
+++ b/ui/app_list/cocoa/current_user_menu_item_view.mm
@@ -16,6 +16,9 @@ namespace {
// Padding on the left of the indicator icon.
const CGFloat kMenuLeftMargin = 3;
+// Padding on the top and bottom of the menu item.
+const CGFloat kMenuTopBottomPadding = 2;
+
}
@interface CurrentUserMenuItemView ()
@@ -33,14 +36,14 @@ const CGFloat kMenuLeftMargin = 3;
if ((self = [super initWithFrame:NSZeroRect])) {
NSImage* userImage = ui::ResourceBundle::GetSharedInstance().
GetNativeImageNamed(IDR_APP_LIST_USER_INDICATOR).AsNSImage();
- NSRect imageRect = NSMakeRect(kMenuLeftMargin, 0, 0, 0);
+ NSRect imageRect = NSMakeRect(kMenuLeftMargin, kMenuTopBottomPadding, 0, 0);
imageRect.size = [userImage size];
base::scoped_nsobject<NSImageView> userImageView(
[[NSImageView alloc] initWithFrame:imageRect]);
[userImageView setImage:userImage];
[self addSubview:userImageView];
- NSPoint labelOrigin = NSMakePoint(NSMaxX(imageRect), 0);
+ NSPoint labelOrigin = NSMakePoint(NSMaxX(imageRect), kMenuTopBottomPadding);
NSTextField* userField =
[self addLabelWithFrame:labelOrigin
labelText:delegate->GetCurrentUserName()];
@@ -57,7 +60,7 @@ const CGFloat kMenuLeftMargin = 3;
labelFrame.size.width = NSWidth([userField frame]);
[self setFrameSize:NSMakeSize(
NSMaxX(labelFrame) + NSMaxX(imageRect),
- NSMaxY(labelFrame))];
+ NSMaxY(labelFrame) + kMenuTopBottomPadding)];
}
return self;
}