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

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

Issue 2642893002: Adjust positioning of location bar icons. (Closed)
Patch Set: nits Created 3 years, 11 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/content_setting_image_view.cc
diff --git a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
index 2c299389f4271b15e85c8cb0629b81e02e9edf51..6ea7d207c236b6a8cce42dd77831c9749266633d 100644
--- a/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/content_setting_image_view.cc
@@ -43,11 +43,9 @@ ContentSettingImageView::ContentSettingImageView(
pause_animation_state_(0.0),
bubble_view_(nullptr),
suppress_mouse_released_action_(false) {
+ set_next_element_interior_padding(LocationBarView::kIconInteriorPadding);
SetInkDropMode(InkDropMode::ON);
SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY);
- image()->SetHorizontalAlignment(base::i18n::IsRTL()
- ? views::ImageView::TRAILING
- : views::ImageView::LEADING);
image()->EnableCanvasFlippingForRTLUI(true);
label()->SetElideBehavior(gfx::NO_ELIDE);
label()->SetVisible(false);
@@ -161,9 +159,7 @@ SkColor ContentSettingImageView::GetTextColor() const {
}
bool ContentSettingImageView::ShouldShowLabel() const {
- return (!IsShrinking() ||
- (width() > (image()->GetPreferredSize().width() +
- 2 * LocationBarView::kHorizontalPadding))) &&
+ return (!IsShrinking() || (width() > image()->GetPreferredSize().width())) &&
(slide_animator_.is_animating() || pause_animation_);
}

Powered by Google App Engine
This is Rietveld 408576698