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

Unified Diff: ui/gfx/shadow_util.cc

Issue 2951583002: Update voice interaction icon shadow (Closed)
Patch Set: fix const Created 3 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 | « ash/shelf/voice_interaction_overlay.cc ('k') | ui/gfx/shadow_value.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/shadow_util.cc
diff --git a/ui/gfx/shadow_util.cc b/ui/gfx/shadow_util.cc
index 1d9820419cf0afbe99c969fcb52254a5c2b748ff..cc1d7ad604271945972ad628c5f07fa4fc31688a 100644
--- a/ui/gfx/shadow_util.cc
+++ b/ui/gfx/shadow_util.cc
@@ -93,20 +93,7 @@ const ShadowDetails& ShadowDetails::Get(int elevation, int corner_radius) {
std::make_pair(elevation, corner_radius), ShadowDetails()));
DCHECK(insertion.second);
ShadowDetails* shadow = &insertion.first->second;
- // To match the CSS notion of blur (spread outside the bounding box) to the
- // Skia notion of blur (spread outside and inside the bounding box), we have
- // to double the designer-provided blur values.
- const int kBlurCorrection = 2;
- // "Key shadow": y offset is elevation and blur is twice the elevation.
- shadow->values.emplace_back(gfx::Vector2d(0, elevation),
- kBlurCorrection * elevation * 2,
- SkColorSetA(SK_ColorBLACK, 0x3d));
- // "Ambient shadow": no offset and blur matches the elevation.
- shadow->values.emplace_back(gfx::Vector2d(), kBlurCorrection * elevation,
- SkColorSetA(SK_ColorBLACK, 0x1f));
- // To see what this looks like for elevation 24, try this CSS:
- // box-shadow: 0 24px 48px rgba(0, 0, 0, .24),
- // 0 0 24px rgba(0, 0, 0, .12);
+ shadow->values = ShadowValue::MakeMdShadowValues(elevation);
auto* source = new ShadowNineboxSource(shadow->values, corner_radius);
shadow->ninebox_image = ImageSkia(source, source->size());
return *shadow;
« no previous file with comments | « ash/shelf/voice_interaction_overlay.cc ('k') | ui/gfx/shadow_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698