Chromium Code Reviews| Index: chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm |
| diff --git a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm |
| index 66fcdd40fc6a92c5ce417ac0197a4827396d6438..1a7e09a3ef6328c4f5b0d3b2b3c5a30e4b295c57 100644 |
| --- a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm |
| +++ b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm |
| @@ -27,11 +27,13 @@ CGFloat BubblePadding() { |
| // divider. The desired value is 8px. We get 3px by subtracting the existing |
| // padding in location_bar_view from 8px. |
| CGFloat DividerPadding() { |
| - return ui::MaterialDesignController::IsModeMaterial() ? 3.0 : 0.0; |
| + return ui::MaterialDesignController::IsModeMaterial() ? 2.0 : 0.0; |
| } |
| // Padding between the icon and label. |
| -const CGFloat kIconLabelPadding = 4.0; |
| +CGFloat IconLabelPadding() { |
| + return ui::MaterialDesignController::IsModeMaterial() ? 3.0 : 4.0; |
|
shrike
2016/05/24 01:13:26
Actually, the 4pt of padding was fine. It's just t
spqchan
2016/05/24 21:05:24
I made the pixel pushes with the new icon. Let me
|
| +} |
| // Inset for the background. |
| const CGFloat kBackgroundYInset = 4.0; |
| @@ -61,7 +63,7 @@ CGFloat BubbleDecoration::GetWidthForImageAndLabel(NSImage* image, |
| // underestimate, so floor() seems to work better. |
| const CGFloat label_width = |
| std::floor([label sizeWithAttributes:attributes_].width); |
| - return BubblePadding() + image_width + kIconLabelPadding + label_width + |
| + return BubblePadding() + image_width + IconLabelPadding() + label_width + |
| DividerPadding(); |
| } |
| @@ -105,7 +107,7 @@ void BubbleDecoration::DrawInFrame(NSRect frame, NSView* control_view) { |
| fraction:1.0 |
| respectFlipped:YES |
| hints:nil]; |
| - textOffset = NSMaxX(imageRect) + kIconLabelPadding; |
| + textOffset = NSMaxX(imageRect) + IconLabelPadding(); |
| } |
| // Draw the divider and set the text color. |