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 3e0b1c44bca89feab0e00744b9c987f969cd5f97..dc59404111b2b3a7ce67b999335beb093d72cb39 100644 |
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc |
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc |
@@ -30,6 +30,7 @@ |
#include "third_party/skia/include/core/SkColor.h" |
#include "ui/accessibility/ax_node_data.h" |
#include "ui/base/l10n/l10n_util.h" |
+#include "ui/base/material_design/material_design_controller.h" |
#include "ui/base/resource/resource_bundle.h" |
#include "ui/base/theme_provider.h" |
#include "ui/gfx/canvas.h" |
@@ -687,10 +688,15 @@ int OmniboxResultView::GetAnswerLineHeight() const { |
} |
int OmniboxResultView::GetContentLineHeight() const { |
+ const int kIconVerticalPad = |
+ ui::MaterialDesignController::GetMode() == |
+ ui::MaterialDesignController::MATERIAL_HYBRID |
+ ? 8 |
+ : 4; |
Peter Kasting
2016/11/22 22:12:08
Nit: Shorter:
using MD = ui::MaterialDesignCont
Evan Stade
2016/11/29 03:01:45
done (with slight adjustments)
|
+ const int kTextVerticalPad = 3; |
return std::max( |
- LocationBarView::kIconWidth + |
- GetLayoutInsets(OMNIBOX_DROPDOWN_ICON).height(), |
- GetTextHeight() + GetLayoutInsets(OMNIBOX_DROPDOWN_TEXT).height()); |
+ LocationBarView::kIconWidth + 2 * kIconVerticalPad, |
+ GetTextHeight() + 2 * kTextVerticalPad); |
} |
std::unique_ptr<gfx::RenderText> OmniboxResultView::CreateAnswerLine( |