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

Unified Diff: ui/app_list/views/search_result_view.cc

Issue 722563002: Add a card background to the app list search result groups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tilv
Patch Set: use constants in speech_view.cc Created 6 years, 1 month 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 | « ui/app_list/views/search_result_page_view.cc ('k') | ui/app_list/views/speech_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/search_result_view.cc
diff --git a/ui/app_list/views/search_result_view.cc b/ui/app_list/views/search_result_view.cc
index de1f324da89d4b9b42c8344c3475489c032e057a..42a12800d6ece392ee413267215b77b1ca00950a 100644
--- a/ui/app_list/views/search_result_view.cc
+++ b/ui/app_list/views/search_result_view.cc
@@ -7,6 +7,7 @@
#include <algorithm>
#include "ui/app_list/app_list_constants.h"
+#include "ui/app_list/app_list_switches.h"
#include "ui/app_list/search_result.h"
#include "ui/app_list/views/progress_bar_view.h"
#include "ui/app_list/views/search_result_actions_view.h"
@@ -209,7 +210,8 @@ void SearchResultView::OnPaint(gfx::Canvas* canvas) {
return;
gfx::Rect content_rect(rect);
- content_rect.set_height(rect.height() - kBorderSize);
+ if (!switches::IsExperimentalAppListEnabled())
+ content_rect.set_height(rect.height() - kBorderSize);
const bool selected = list_view_->IsResultViewSelected(this);
const bool hover = state() == STATE_HOVERED || state() == STATE_PRESSED;
@@ -217,7 +219,7 @@ void SearchResultView::OnPaint(gfx::Canvas* canvas) {
canvas->FillRect(content_rect, kSelectedColor);
else if (hover)
canvas->FillRect(content_rect, kHighlightedColor);
- else
+ else if (!switches::IsExperimentalAppListEnabled())
canvas->FillRect(content_rect, kContentsBackgroundColor);
gfx::Rect border_bottom = gfx::SubtractRects(rect, content_rect);
« no previous file with comments | « ui/app_list/views/search_result_page_view.cc ('k') | ui/app_list/views/speech_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698