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

Unified Diff: ash/app_list/app_list_item_view.cc

Issue 10381018: ash: First pass of Applist v2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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 | « ash/app_list/app_list_bubble_border.cc ('k') | ash/app_list/app_list_model_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/app_list/app_list_item_view.cc
diff --git a/ash/app_list/app_list_item_view.cc b/ash/app_list/app_list_item_view.cc
index dc6d247adcafe303652358248062182fba6f9b3a..869e6a46a7db3be246a8a2e0098d5ec64ebfdacb 100644
--- a/ash/app_list/app_list_item_view.cc
+++ b/ash/app_list/app_list_item_view.cc
@@ -4,6 +4,7 @@
#include "ash/app_list/app_list_item_view.h"
+#include "ash/app_list/app_list.h"
#include "ash/app_list/app_list_item_model.h"
#include "ash/app_list/app_list_model_view.h"
#include "ash/app_list/drop_shadow_label.h"
@@ -33,6 +34,7 @@ const int kTopBottomPadding = 10;
const int kIconTitleSpacing = 10;
const SkColor kTitleColor = SK_ColorWHITE;
+const SkColor kTitleColorV2 = SkColorSetARGB(0xFF, 0x88, 0x88, 0x88);
// 0.33 black
const SkColor kHoverAndPushedColor = SkColorSetARGB(0x55, 0x00, 0x00, 0x00);
@@ -185,15 +187,19 @@ AppListItemView::AppListItemView(AppListModelView* list_model_view,
selected_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(apply_shadow_factory_(this)) {
title_->SetBackgroundColor(0);
- title_->SetEnabledColor(kTitleColor);
-
- const gfx::ShadowValue kTitleShadows[] = {
- gfx::ShadowValue(gfx::Point(0, 0), 1, SkColorSetARGB(0x66, 0, 0, 0)),
- gfx::ShadowValue(gfx::Point(0, 0), 10, SkColorSetARGB(0x66, 0, 0, 0)),
- gfx::ShadowValue(gfx::Point(0, 2), 2, SkColorSetARGB(0x66, 0, 0, 0)),
- gfx::ShadowValue(gfx::Point(0, 2), 4, SkColorSetARGB(0x66, 0, 0, 0)),
- };
- title_->SetTextShadows(arraysize(kTitleShadows), kTitleShadows);
+
+ if (internal::AppList::UseAppListV2()) {
+ title_->SetEnabledColor(kTitleColorV2);
+ } else {
+ title_->SetEnabledColor(kTitleColor);
+ const gfx::ShadowValue kTitleShadows[] = {
+ gfx::ShadowValue(gfx::Point(0, 0), 1, SkColorSetARGB(0x66, 0, 0, 0)),
+ gfx::ShadowValue(gfx::Point(0, 0), 10, SkColorSetARGB(0x66, 0, 0, 0)),
+ gfx::ShadowValue(gfx::Point(0, 2), 2, SkColorSetARGB(0x66, 0, 0, 0)),
+ gfx::ShadowValue(gfx::Point(0, 2), 4, SkColorSetARGB(0x66, 0, 0, 0)),
+ };
+ title_->SetTextShadows(arraysize(kTitleShadows), kTitleShadows);
+ }
AddChildView(icon_);
AddChildView(title_);
« no previous file with comments | « ash/app_list/app_list_bubble_border.cc ('k') | ash/app_list/app_list_model_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698