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

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

Issue 2339523004: Remove old (dead) app list code. (Closed)
Patch Set: Address nonbistytftatl review. Created 4 years, 3 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: ui/app_list/views/app_list_item_view.cc
diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc
index 643c18a3ce6d1148423f5ef23de8f402a7d474b1..4bc50ff45ac27cf1c6179c19c426732583946778 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -272,13 +272,8 @@ void AppListItemView::OnPaint(gfx::Canvas* canvas) {
return;
gfx::Rect rect(GetContentsBounds());
- if (apps_grid_view_->IsSelectedView(this)) {
+ if (apps_grid_view_->IsSelectedView(this))
canvas->FillRect(rect, kSelectedColor);
- } else if (is_highlighted_ && !is_installing_ &&
- !app_list::switches::IsExperimentalAppListEnabled()) {
- canvas->FillRect(rect, kHighlightedColor);
- return;
- }
if (ui_state_ == UI_STATE_DROPPING_IN_FOLDER) {
DCHECK(apps_grid_view_->model()->folders_enabled());
@@ -312,20 +307,14 @@ void AppListItemView::ShowContextMenuForView(views::View* source,
}
void AppListItemView::StateChanged() {
- if (app_list::switches::IsExperimentalAppListEnabled()) {
- if (state() == STATE_HOVERED || state() == STATE_PRESSED) {
- shadow_animator_.animation()->Show();
- } else {
- shadow_animator_.animation()->Hide();
- }
- }
-
if (state() == STATE_HOVERED || state() == STATE_PRESSED) {
+ shadow_animator_.animation()->Show();
// Show the hover/tap highlight: for tap, lighter highlight replaces darker
// keyboard selection; for mouse hover, keyboard selection takes precedence.
if (!apps_grid_view_->IsSelectedView(this) || state() == STATE_PRESSED)
SetItemIsHighlighted(true);
} else {
+ shadow_animator_.animation()->Hide();
SetItemIsHighlighted(false);
if (item_weak_)
item_weak_->set_highlighted(false);

Powered by Google App Engine
This is Rietveld 408576698