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

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

Issue 1154323002: Use app list item shadow for app list folders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_arrow_keys_crash
Patch Set: fix mac compile Created 5 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
« no previous file with comments | « ui/app_list/views/app_list_item_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3471e7df1ea348841359f64e198cb4b97d3e591c..c62dbf0c03b0f1bd19399b0a5cb9379f324f6e90 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -110,7 +110,7 @@ AppListItemView::AppListItemView(AppsGridView* apps_grid_view,
AddChildView(title_);
AddChildView(progress_bar_);
- SetIcon(item->icon(), item->has_shadow());
+ SetIcon(item->icon());
SetItemName(base::UTF8ToUTF16(item->GetDisplayName()),
base::UTF8ToUTF16(item->name()));
SetItemIsInstalling(item->is_installing());
@@ -128,7 +128,7 @@ AppListItemView::~AppListItemView() {
item_weak_->RemoveObserver(this);
}
-void AppListItemView::SetIcon(const gfx::ImageSkia& icon, bool has_shadow) {
+void AppListItemView::SetIcon(const gfx::ImageSkia& icon) {
// Clear icon and bail out if item icon is empty.
if (icon.isNull()) {
icon_->SetImage(NULL);
@@ -139,12 +139,7 @@ void AppListItemView::SetIcon(const gfx::ImageSkia& icon, bool has_shadow) {
icon,
skia::ImageOperations::RESIZE_BEST,
gfx::Size(kGridIconDimension, kGridIconDimension)));
- if (has_shadow || app_list::switches::IsExperimentalAppListEnabled()) {
- shadow_animator_.SetOriginalImage(resized);
- return;
- }
-
- icon_->SetImage(resized);
+ shadow_animator_.SetOriginalImage(resized);
}
void AppListItemView::SetUIState(UIState state) {
@@ -559,7 +554,7 @@ void AppListItemView::SetTitleSubpixelAA() {
}
void AppListItemView::ItemIconChanged() {
- SetIcon(item_weak_->icon(), item_weak_->has_shadow());
+ SetIcon(item_weak_->icon());
}
void AppListItemView::ItemNameChanged() {
« no previous file with comments | « ui/app_list/views/app_list_item_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698