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

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

Issue 1300843003: Change width of rows in material design omnibox dropdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
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) {

Powered by Google App Engine
This is Rietveld 408576698