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

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: 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 6d29e0a88eb076eed56a869c07f408f5eeb59282..ba5cfda702b82b159db5cb71a5e5d17ba23ae54f 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -739,6 +739,12 @@ 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;
+
+ // When BaseFont is specified, reuse font_list_, which may have had size
+ // adjustments from BaseFont before it was provided to this class.
Peter Kasting 2017/06/15 22:50:28 Hmm. It seems like if the font passed in has been
Justin Donnelly 2017/06/16 14:28:23 Yeah, it feels like that's the right thing to do.
Peter Kasting 2017/06/16 23:47:21 Hrm, I would worry about this, especially for user
Justin Donnelly 2017/06/21 21:13:49 I'm interested in how answers look with different
Peter Kasting 2017/06/21 21:20:23 On Win 7, try Control Panel > Appearance and Perso
Justin Donnelly 2017/06/21 21:32:07 Thanks! It's so obvious, why didn't I think of tha
+ if (GetTextStyle(text_type).font == ui::ResourceBundle::BaseFont)
Peter Kasting 2017/06/15 22:50:28 Nit: Use a temp for this subexpression that's repe
Justin Donnelly 2017/06/16 14:28:23 Done.
+ return font_list_;
+
return ui::ResourceBundle::GetSharedInstance().GetFontList(
GetTextStyle(text_type).font);
}
« 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