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

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

Issue 1399253005: Fix layout of omnibox rows for material design (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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 9a640a68870fe6839295d5fb33e32bd69f3674c5..877fa8cdd3f0e1d2122bf6d79037165df08020b6 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -722,9 +722,16 @@ void OmniboxResultView::AnimationProgressed(const gfx::Animation* animation) {
int OmniboxResultView::GetAnswerLineHeight() const {
// GetTextStyle(1) is the largest font used and so defines the boundary that
// all the other answer styles fit within.
- return ui::ResourceBundle::GetSharedInstance()
+ int font_height =
+ ui::ResourceBundle::GetSharedInstance()
.GetFontList(GetTextStyle(1).font)
.GetHeight();
+ if (!ui::MaterialDesignController::IsModeMaterial())
+ return font_height;
+
+ // Answer lines should be at least as tall as content lines in
+ // material design.
+ return std::max(font_height, GetContentLineHeight());
Peter Kasting 2015/10/13 19:21:17 Where in the specs is this requirement? I don't u
}
int OmniboxResultView::GetContentLineHeight() 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