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

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

Issue 1410023012: Fix broken logic for search chip icon spacing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename Created 5 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 80c3c6a3f54f17cd109a331208671b79f64ef7a6..3331425aa198acba98ac154106d97e7fbe914074 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
@@ -104,11 +104,11 @@ void IconLabelBubbleView::Layout() {
// In MD mode, both extension icons and Chrome-provided icons are 16px,
// so it's not necessary to handle them differently. TODO(estade): clean
// this up when MD is on by default.
- bool icon_needs_extra_padding =
- !is_extension_icon_ && !ui::MaterialDesignController::IsModeMaterial();
+ bool icon_has_enough_padding =
+ !is_extension_icon_ || ui::MaterialDesignController::IsModeMaterial();
const int image_width = image()->GetPreferredSize().width();
image_->SetBounds(std::min((width() - image_width) / 2,
- GetBubbleOuterPadding(icon_needs_extra_padding)),
+ GetBubbleOuterPadding(icon_has_enough_padding)),
0, image_->GetPreferredSize().width(), height());
const int padding = GetLayoutConstant(ICON_LABEL_VIEW_INTERNAL_PADDING);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698