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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_result_view.cc

Issue 2943533002: Use the result view font list for the base answers font. (Closed)
Patch Set: Respond to comment Created 3 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_result_view.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
index e719b73e1b83a5c947cfd16177ccaafe135a80b8..02930e580dbf85302e787a663c052f7c2341a6e4 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -746,8 +746,14 @@ const gfx::FontList& OmniboxResultView::GetAnswerFont() const {
match_.answer && !match_.answer->second_line().text_fields().empty()
? match_.answer->second_line().text_fields()[0].type()
: SuggestionAnswer::SUGGESTION;
- return ui::ResourceBundle::GetSharedInstance().GetFontList(
- GetTextStyle(text_type).font);
+
+ // When BaseFont is specified, reuse font_list_, which may have had size
+ // adjustments from BaseFont before it was provided to this class. Otherwise,
+ // get the standard font list for the specified style.
+ ui::ResourceBundle::FontStyle font_style = GetTextStyle(text_type).font;
+ return (font_style == ui::ResourceBundle::BaseFont)
+ ? font_list_
+ : ui::ResourceBundle::GetSharedInstance().GetFontList(font_style);
}
int OmniboxResultView::GetAnswerHeight() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698