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

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

Issue 2119033002: [Material][Mac] Implement Omnibox Verbose State Chips (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 3 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
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 36a6f0f39f22f0d5586fd7df7ac8e149284e5c85..dbc6c5b50c3c3088b47edb3d1abc3fc91202f017 100644
--- a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
@@ -24,12 +24,8 @@ CGFloat BubblePadding() {
return ui::MaterialDesignController::IsModeMaterial() ? 8.0 : 3.0;
}
-// Additional padding between the divider between the omnibox text and the
-// 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() ? 2.0 : 0.0;
-}
+// Additional padding between the divider and the label.
+const CGFloat kDividerPadding = 2.0;
// Padding between the icon and label.
CGFloat kIconLabelPadding = 4.0;
@@ -48,6 +44,10 @@ BubbleDecoration::BubbleDecoration() : retina_baseline_offset_(0) {
BubbleDecoration::~BubbleDecoration() {
}
+CGFloat BubbleDecoration::DividerPadding() const {
+ return ui::MaterialDesignController::IsModeMaterial() ? kDividerPadding : 0.0;
+}
+
CGFloat BubbleDecoration::GetWidthForImageAndLabel(NSImage* image,
NSString* label) {
if (!image && !label)
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/bubble_decoration.h ('k') | chrome/browser/ui/cocoa/location_bar/ev_bubble_decoration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698