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

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

Issue 10899009: Fix assets related to ev bubble and tab to search UI elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 4 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 9ff07a50510ab65bcf0d49f1f5a63b9ea61999c5..54c08f4f9a99d3416ae05f3a0ae50b051643f648 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
@@ -32,7 +32,7 @@ const int kMoveTimeMs = kFullOpenedTimeMs + 2 * kOpenTimeMs;
const int kFrameRateHz = 60;
// Margins for animated box.
const int kTextMarginPixels = 4;
-const int kIconLeftMargin = 4;
+const int kIconLeftMargin = 2;
// The fraction of the animation we'll spend animating the string into view, and
@@ -111,8 +111,6 @@ void ContentSettingImageView::Update(TabContents* tab_contents) {
text_size_ = ui::ResourceBundle::GetSharedInstance().GetFont(
ui::ResourceBundle::MediumFont).GetStringWidth(animated_text_);
text_size_ += 2 * kTextMarginPixels + kIconLeftMargin;
- if (border())
- border()->GetInsets(&saved_insets_);
slide_animator_->Show();
}
}
@@ -223,10 +221,7 @@ void ContentSettingImageView::OnPaint(gfx::Canvas* canvas) {
// starts to disappear.
int necessary_left_margin = std::min(kIconLeftMargin, visible_text_size_);
views::Border* empty_border = views::Border::CreateEmptyBorder(
Peter Kasting 2012/08/28 23:22:48 Nit: Wrap after = instead
varunjain 2012/08/29 02:59:57 Done.
- saved_insets_.top(),
- saved_insets_.left() + necessary_left_margin,
- saved_insets_.bottom(),
- saved_insets_.right());
+ 0, necessary_left_margin, 0, 0);
set_border(empty_border);
views::ImageView::OnPaint(canvas);
@@ -234,7 +229,7 @@ void ContentSettingImageView::OnPaint(gfx::Canvas* canvas) {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
canvas->DrawStringInt(animated_text_,
rb.GetFont(ui::ResourceBundle::MediumFont), SK_ColorBLACK,
- GetImageBounds().right() + kTextMarginPixels, y(),
+ GetImageBounds().right() + kTextMarginPixels, 0,
Peter Kasting 2012/08/28 23:22:48 Nit: Shouldn't leaving this as "y()" still work?
varunjain 2012/08/29 02:59:57 I am not sure if y() is even correct. It give the
Peter Kasting 2012/08/29 21:35:14 I think you're correct, the coordinates used here
width() - GetImageBounds().width(), height(),
gfx::Canvas::TEXT_ALIGN_LEFT | gfx::Canvas::TEXT_VALIGN_MIDDLE);
} else {

Powered by Google App Engine
This is Rietveld 408576698