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

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

Issue 2070733002: Update omnibox dropdown selection/hover background drawing for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scaled_radius
Patch Set: Use BackgroundWith1PxBorder to do the drawing Created 4 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
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 01ba00ba045fb9eb1dbde307ede30415b3bb7976..6abb037ea6a4393f6d0711f6e7dfec160a9d5193 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
@@ -122,14 +122,9 @@ gfx::Rect OmniboxPopupContentsView::GetPopupBounds() const {
void OmniboxPopupContentsView::LayoutChildren() {
gfx::Rect contents_rect = GetContentsBounds();
contents_rect.Inset(GetLayoutInsets(OMNIBOX_DROPDOWN));
- contents_rect.Inset(0, views::NonClientFrameView::kClientEdgeThickness, 0, 0);
-
- // In the non-material dropdown, the colored/clickable regions within the
- // dropdown are only as wide as the location bar. In the material version,
- // these are full width, and OmniboxResultView instead insets the icons/text
- // inside to be aligned with the location bar.
- if (!ui::MaterialDesignController::IsModeMaterial())
- contents_rect.Inset(start_margin_, 0, end_margin_, 0);
+ contents_rect.Inset(start_margin_,
+ views::NonClientFrameView::kClientEdgeThickness,
+ end_margin_, 0);
int top = contents_rect.y();
for (size_t i = 0; i < AutocompleteResult::kMaxMatches; ++i) {
@@ -152,6 +147,7 @@ bool OmniboxPopupContentsView::IsOpen() const {
void OmniboxPopupContentsView::InvalidateLine(size_t line) {
OmniboxResultView* result = result_view_at(line);
result->Invalidate();
+ result->SchedulePaint();
if (HasMatchAt(line) && GetMatchAtIndex(line).associated_keyword.get()) {
result->ShowKeyword(IsSelectedIndex(line) &&
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h ('k') | chrome/browser/ui/views/omnibox/omnibox_result_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698