Commit 62c7122a authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

[profile-menu] Add drop shadow to identity badge

Before:
https://drive.google.com/file/d/1EbPAENC4XYTzm-ER7Y-GaThlxCCkh9Tl/view?usp=sharing

After:
https://drive.google.com/file/d/1zfQo_NHCzf0qwD314-wpsZsS1JT1mML8/view?usp=sharing

Bug: 1017302
Change-Id: I896bcf771d6f780c89e7c70618ce5db6c7f2ba5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1876768
Auto-Submit: Thomas Tangl <tangltom@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Reviewed-by: default avatarRamin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708913}
parent 15f6b501
...@@ -304,8 +304,13 @@ void ProfileMenuViewBase::SetIdentityInfo(const gfx::ImageSkia& image, ...@@ -304,8 +304,13 @@ void ProfileMenuViewBase::SetIdentityInfo(const gfx::ImageSkia& image,
gfx::ImageSkia sized_badge = gfx::ImageSkia sized_badge =
AddCircularBackground(SizeImage(badge, kBadgeSize), kBadgeBackgroundColor, AddCircularBackground(SizeImage(badge, kBadgeSize), kBadgeBackgroundColor,
kBadgeSize + 2 * kBadgePadding); kBadgeSize + 2 * kBadgePadding);
gfx::ImageSkia badged_image = gfx::ImageSkia sized_badge_with_shadow =
gfx::ImageSkiaOperations::CreateIconWithBadge(sized_image, sized_badge); gfx::ImageSkiaOperations::CreateImageWithDropShadow(
sized_badge,
gfx::ShadowValue::MakeMdShadowValues(/*elevation=*/1, SK_ColorBLACK));
gfx::ImageSkia badged_image = gfx::ImageSkiaOperations::CreateIconWithBadge(
sized_image, sized_badge_with_shadow);
image_view->SetImage(badged_image); image_view->SetImage(badged_image);
image_view->SetBorder(views::CreateEmptyBorder(0, 0, kImageBottomMargin, 0)); image_view->SetBorder(views::CreateEmptyBorder(0, 0, kImageBottomMargin, 0));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment