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

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

Issue 10917280: Fix up views web intents location bar decoration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Correct pixel spacing Created 8 years, 3 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/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index aba7b08857ada9090683767ae52d9740ebe016f3..8205162c7540678d8ce31c3908875de78927b94e 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -158,7 +158,6 @@ static const int kSelectedKeywordBackgroundImages[] = {
IDR_LOCATION_BAR_SELECTED_KEYWORD_BACKGROUND_R,
};
-// TODO(gbillock): replace these with web-intents images when available.
static const int kWIBubbleBackgroundImages[] = {
IDR_OMNIBOX_WI_BUBBLE_BACKGROUND_L,
IDR_OMNIBOX_WI_BUBBLE_BACKGROUND_C,
@@ -291,6 +290,8 @@ void LocationBarView::Init(views::View* popup_parent_view) {
ContentSettingImageView* content_blocked_view =
new ContentSettingImageView(static_cast<ContentSettingsType>(i),
kCSBubbleBackgroundImages, this);
+ content_blocked_view->SetFont(font_);
+ content_blocked_view->SetFontColor(GetColor(ToolbarModel::NONE, TEXT));
Peter Kasting 2012/09/17 20:04:27 Can we just pass the font and color to the constru
Greg Billock 2012/09/17 21:23:18 Done.
content_setting_views_.push_back(content_blocked_view);
AddChildView(content_blocked_view);
content_blocked_view->SetVisible(false);
@@ -301,6 +302,8 @@ void LocationBarView::Init(views::View* popup_parent_view) {
web_intents_button_view_ =
new WebIntentsButtonView(this, kWIBubbleBackgroundImages);
+ web_intents_button_view_->SetFont(font_);
+ web_intents_button_view_->SetFontColor(GetColor(ToolbarModel::NONE, TEXT));
AddChildView(web_intents_button_view_);
if (browser_defaults::bookmarks_enabled && (mode_ == NORMAL)) {
@@ -822,7 +825,8 @@ void LocationBarView::Layout() {
int width = web_intents_button_view_->GetPreferredSize().width();
offset -= width;
web_intents_button_view_->SetBounds(
- offset, location_y, width, location_height);
+ offset, location_y + kBubbleVerticalPadding, width,
+ web_intents_button_view_->GetPreferredSize().height());
offset -= GetItemPadding() -
web_intents_button_view_->GetBuiltInHorizontalPadding();
}

Powered by Google App Engine
This is Rietveld 408576698