| Index: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
|
| index 5d8df94028728e71101f9ef22d563b3c37de2f90..e4f3efcce20ccf012bb95a82341012aefe1dd50b 100644
|
| --- a/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm
|
| @@ -39,8 +39,14 @@ using base::UserMetricsAction;
|
|
|
| namespace {
|
|
|
| +// Distance between permission icon and permission label.
|
| +const CGFloat kHorizontalIconPadding = 8.0f;
|
| +
|
| +// Distance between two permission labels.
|
| +const CGFloat kVerticalPermissionPadding = 2.0f;
|
| +
|
| const CGFloat kHorizontalPadding = 13.0f;
|
| -const CGFloat kVerticalPadding = 13.0f;
|
| +const CGFloat kVerticalPadding = 15.0f;
|
| const CGFloat kBetweenButtonsPadding = 10.0f;
|
| const CGFloat kButtonRightEdgePadding = 17.0f;
|
| const CGFloat kTitlePaddingX = 50.0f;
|
| @@ -296,12 +302,13 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
|
| permissionMenus.reset([[NSMutableArray alloc] init]);
|
|
|
| CGFloat maxPermissionLineWidth = 0;
|
| + CGFloat verticalPadding = 0.0f;
|
| for (auto it = requests.begin(); it != requests.end(); it++) {
|
| base::scoped_nsobject<NSView> permissionView(
|
| [[self labelForRequest:(*it)] retain]);
|
| NSPoint origin = [permissionView frame].origin;
|
| origin.x += kHorizontalPadding;
|
| - origin.y += yOffset;
|
| + origin.y += yOffset + verticalPadding;
|
| [permissionView setFrameOrigin:origin];
|
| [contentView addSubview:permissionView];
|
|
|
| @@ -321,6 +328,9 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
|
| maxPermissionLineWidth = std::max(
|
| maxPermissionLineWidth, NSMaxX([permissionView frame]));
|
| yOffset += NSHeight([permissionView frame]);
|
| +
|
| + // Add extra padding for all but first permission.
|
| + verticalPadding = kVerticalPermissionPadding;
|
| }
|
|
|
| base::scoped_nsobject<NSView> titleView(
|
| @@ -446,7 +456,7 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate {
|
| [permissionLabel setStringValue:base::SysUTF16ToNSString(label)];
|
| [permissionLabel sizeToFit];
|
| [permissionLabel setFrameOrigin:
|
| - NSMakePoint(NSWidth([permissionIcon frame]), 0)];
|
| + NSMakePoint(NSWidth([permissionIcon frame]) + kHorizontalIconPadding, 0)];
|
| [permissionView addSubview:permissionLabel];
|
|
|
| // Match the horizontal centers of the two subviews. Note that the label's
|
|
|