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

Unified Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc

Issue 2075443002: Remove IconLabelView layout constants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment, fix compile Created 4 years, 6 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/views/location_bar/icon_label_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
index fb37a29ded5b0e86c70f417f7847342b9f9c5f02..c530f6ff306c8431e5a5a63784c22691546da0c2 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
@@ -269,17 +269,17 @@ void IconLabelBubbleView::SetLabelBackgroundColor(
int IconLabelBubbleView::GetOuterPadding(bool leading) const {
if (ui::MaterialDesignController::IsModeMaterial())
- return GetLayoutConstant(ICON_LABEL_VIEW_TRAILING_PADDING);
+ return GetLayoutConstant(LOCATION_BAR_HORIZONTAL_PADDING);
return GetLayoutConstant(LOCATION_BAR_HORIZONTAL_PADDING) -
GetLayoutConstant(LOCATION_BAR_BUBBLE_HORIZONTAL_PADDING) +
- (leading ? 0 : GetLayoutConstant(ICON_LABEL_VIEW_TRAILING_PADDING));
+ (leading ? 0 : kTrailingPaddingPreMd);
}
int IconLabelBubbleView::GetInternalSpacing() const {
return image_->GetPreferredSize().IsEmpty()
? 0
- : GetLayoutConstant(ICON_LABEL_VIEW_INTERNAL_SPACING);
+ : GetLayoutConstant(LOCATION_BAR_HORIZONTAL_PADDING);
}
const char* IconLabelBubbleView::GetClassName() const {
@@ -307,7 +307,7 @@ void IconLabelBubbleView::OnPaint(gfx::Canvas* canvas) {
GetLayoutConstant(LOCATION_BAR_HORIZONTAL_PADDING);
// Amount of space to leave after the separator (dp).
const int kPostSeparatorSpacing =
- (GetLayoutConstant(ICON_LABEL_VIEW_TRAILING_PADDING) +
+ (GetLayoutConstant(LOCATION_BAR_HORIZONTAL_PADDING) +
kExtraTrailingPadding + post_chip_spacing) /
2 -
post_chip_spacing;

Powered by Google App Engine
This is Rietveld 408576698