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

Unified Diff: chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm

Issue 2002103003: [Material][Mac] Adjustments to the Omnibox decorations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/cocoa/location_bar/content_setting_decoration.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698