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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_result_view.cc

Issue 2389073004: Restore correct size for omnibox search icon. (Closed)
Patch Set: . Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/location_bar/selected_keyword_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // For WinDDK ATL compatibility, these ATL headers must come first. 5 // For WinDDK ATL compatibility, these ATL headers must come first.
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 7
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <atlbase.h> // NOLINT 9 #include <atlbase.h> // NOLINT
10 #include <atlwin.h> // NOLINT 10 #include <atlwin.h> // NOLINT
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 location_bar_view_(location_bar_view), 195 location_bar_view_(location_bar_view),
196 font_list_(font_list), 196 font_list_(font_list),
197 font_height_(std::max( 197 font_height_(std::max(
198 font_list.GetHeight(), 198 font_list.GetHeight(),
199 font_list.DeriveWithWeight(gfx::Font::Weight::BOLD).GetHeight())), 199 font_list.DeriveWithWeight(gfx::Font::Weight::BOLD).GetHeight())),
200 mirroring_context_(new MirroringContext()), 200 mirroring_context_(new MirroringContext()),
201 keyword_icon_(new views::ImageView()), 201 keyword_icon_(new views::ImageView()),
202 animation_(new gfx::SlideAnimation(this)) { 202 animation_(new gfx::SlideAnimation(this)) {
203 CHECK_GE(model_index, 0); 203 CHECK_GE(model_index, 0);
204 if (default_icon_size_ == 0) 204 if (default_icon_size_ == 0)
205 default_icon_size_ = LocationBarView::kLocationBarIconWidth; 205 default_icon_size_ = LocationBarView::kIconWidth;
206 keyword_icon_->set_owned_by_client(); 206 keyword_icon_->set_owned_by_client();
207 keyword_icon_->EnableCanvasFlippingForRTLUI(true); 207 keyword_icon_->EnableCanvasFlippingForRTLUI(true);
208 keyword_icon_->SetImage(GetKeywordIcon()); 208 keyword_icon_->SetImage(GetKeywordIcon());
209 keyword_icon_->SizeToPreferredSize(); 209 keyword_icon_->SizeToPreferredSize();
210 } 210 }
211 211
212 OmniboxResultView::~OmniboxResultView() { 212 OmniboxResultView::~OmniboxResultView() {
213 } 213 }
214 214
215 SkColor OmniboxResultView::GetColor( 215 SkColor OmniboxResultView::GetColor(
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 destination->AppendText(text); 838 destination->AppendText(text);
839 const TextStyle& text_style = GetTextStyle(text_type); 839 const TextStyle& text_style = GetTextStyle(text_type);
840 // TODO(dschuyler): follow up on the problem of different font sizes within 840 // TODO(dschuyler): follow up on the problem of different font sizes within
841 // one RenderText. Maybe with destination->SetFontList(...). 841 // one RenderText. Maybe with destination->SetFontList(...).
842 destination->ApplyWeight( 842 destination->ApplyWeight(
843 is_bold ? gfx::Font::Weight::BOLD : gfx::Font::Weight::NORMAL, range); 843 is_bold ? gfx::Font::Weight::BOLD : gfx::Font::Weight::NORMAL, range);
844 destination->ApplyColor( 844 destination->ApplyColor(
845 GetNativeTheme()->GetSystemColor(text_style.colors[GetState()]), range); 845 GetNativeTheme()->GetSystemColor(text_style.colors[GetState()]), range);
846 destination->ApplyBaselineStyle(text_style.baseline, range); 846 destination->ApplyBaselineStyle(text_style.baseline, range);
847 } 847 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/selected_keyword_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698