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

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

Issue 1829353002: Fix padding in location bar bubbles to match specs on bug. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hide_background_later
Patch Set: Rebase Created 4 years, 9 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.h
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
index ccf44490d3f7724605dd310449134ec4d614b3b1..38c2d0ad36d8a260c6c4cab82e459b5f7fc84688 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.h
@@ -74,10 +74,6 @@ class IconLabelBubbleView : public views::InkDropHostView {
// Returns true when animation is in progress and is shrinking.
virtual bool IsShrinking() const;
- // Returns the amount of horizontal space needed to draw the image and its
- // padding before the label.
- virtual int GetImageAndPaddingWidth() const;
-
// views::View:
gfx::Size GetPreferredSize() const override;
void Layout() override;
@@ -121,6 +117,14 @@ class IconLabelBubbleView : public views::InkDropHostView {
views::ImageView* image_;
views::Label* label_;
+ // How much horizontal padding (fully-transparent columns) is inside the
+ // image. These are subtracted from the desired padding values when
+ // calculating the padding around the image, so that the image always appears
+ // to have the same visible padding no matter what its composition is. Only
+ // used in MD.
+ int builtin_leading_padding_;
+ int builtin_trailing_padding_;
+
bool is_extension_icon_;
// This is only used in pre-MD. In MD, the background color is derived from

Powered by Google App Engine
This is Rietveld 408576698