Chromium Code Reviews| Index: chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc |
| diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc |
| index d716b57767e858e0bc7b5d107f630642efcd3ba8..137ad7742af54d6d7b63e60231a90d43e5bcded8 100644 |
| --- a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc |
| +++ b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc |
| @@ -117,10 +117,15 @@ void OmniboxPopupContentsView::LayoutChildren() { |
| gfx::Rect contents_rect = GetContentsBounds(); |
| + // In the material design version of the omnibox dropdown, the |
| + // selected/hovered background color and the click/touch regions for each |
| + // result should extend to the entire width of the dropdown. Icons and |
| + // text remain aligned with the location bar; this is done by modifying |
| + // the layout using LeftOffset() and RightOffset() in OmniboxResultView. |
| contents_rect.Inset( |
| - left_margin_, |
| + ui::MaterialDesignController::IsModeMaterial() ? 0 : left_margin_, |
| views::NonClientFrameView::kClientEdgeThickness + min_vertical_padding, |
| - right_margin_, |
| + ui::MaterialDesignController::IsModeMaterial() ? 0 : right_margin_, |
| min_vertical_padding); |
|
Peter Kasting
2015/08/18 19:55:37
Nit: This code is the same length, but might be sl
tdanderson
2015/08/19 17:22:35
Agreed, that is much nicer. Changed.
|
| int top = contents_rect.y(); |
| for (size_t i = 0; i < AutocompleteResult::kMaxMatches; ++i) { |