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

Unified Diff: ui/app_list/app_list_constants.cc

Issue 889593003: Animate the app list search box shadow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_animations
Patch Set: move GetShadowForZHeight to app_list_constants.cc Created 5 years, 10 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/app_list_constants.h ('k') | ui/app_list/views/contents_animator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/app_list_constants.cc
diff --git a/ui/app_list/app_list_constants.cc b/ui/app_list/app_list_constants.cc
index a17864e3802ca40db159684da47351c9af7fbea9..53a140145d7a442e076272def3bb9875dcbc289b 100644
--- a/ui/app_list/app_list_constants.cc
+++ b/ui/app_list/app_list_constants.cc
@@ -50,9 +50,6 @@ const float kFolderBubbleRadius = 23;
const float kFolderShadowRadius = 23.5;
const float kFolderShadowOffsetY = 1;
-const int kCardShadowBlur = 4;
-const int kCardShadowYOffset = 1;
-const SkColor kCardShadowColor = SkColorSetARGB(0x4C, 0, 0, 0);
const SkColor kCardBackgroundColor = SK_ColorWHITE;
// Duration in milliseconds for page transition.
@@ -126,4 +123,21 @@ const char kAppListWMClass[] = "chromium_app_list";
#endif
#endif
+gfx::ShadowValue GetShadowForZHeight(int z_height) {
+ if (z_height <= 0)
+ return gfx::ShadowValue();
+
+ switch (z_height) {
+ case 1:
+ return gfx::ShadowValue(gfx::Point(0, 1), 2,
+ SkColorSetARGB(0x4C, 0, 0, 0));
+ case 2:
+ return gfx::ShadowValue(gfx::Point(0, 2), 4,
+ SkColorSetARGB(0x33, 0, 0, 0));
+ default:
+ return gfx::ShadowValue(gfx::Point(0, 8), 12,
+ SkColorSetARGB(0x3F, 0, 0, 0));
+ }
+}
+
} // namespace app_list
« no previous file with comments | « ui/app_list/app_list_constants.h ('k') | ui/app_list/views/contents_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698