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

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

Issue 25039002: Always aligns text at vertically center (Textfield, Label). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 7 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
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 223923a8032b92908b1166ab9001899ee9d066bf..3701dfc26cce94915f40e65564b78b65070ed673 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
@@ -34,7 +34,6 @@ ContentSettingImageView::ContentSettingImageView(
ContentSettingsType content_type,
LocationBarView* parent,
const gfx::FontList& font_list,
- int font_y_offset,
SkColor text_color,
SkColor parent_background_color)
: parent_(parent),
@@ -53,8 +52,6 @@ ContentSettingImageView::ContentSettingImageView(
AddChildView(icon_);
text_label_->SetVisible(false);
- text_label_->set_border(
- views::Border::CreateEmptyBorder(font_y_offset, 0, 0, 0));
text_label_->SetEnabledColor(text_color);
// Calculate the actual background color for the label. The background images
// are painted atop |parent_background_color|. We grab the color of the
@@ -210,7 +207,7 @@ void ContentSettingImageView::Layout() {
text_label_->SetBounds(
icon_->bounds().right() + LocationBarView::GetItemPadding(), 0,
std::max(width() - GetTotalSpacingWhileAnimating() - icon_width, 0),
- text_label_->GetPreferredSize().height());
+ height());
}
bool ContentSettingImageView::OnMousePressed(const ui::MouseEvent& event) {
@@ -280,4 +277,3 @@ void ContentSettingImageView::CreateBubble(content::WebContents* web_contents) {
bubble_widget_->AddObserver(this);
bubble_widget_->Show();
}
-

Powered by Google App Engine
This is Rietveld 408576698