Commit e118f087 authored by Yulun Wu's avatar Yulun Wu Committed by Commit Bot

Update shelf app state indicator color for light mode.

Bug: 1110757
Change-Id: Ide6c6ecfbfc259ac1a5b22e2441afedad6655adf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2392949
Commit-Queue: Yulun Wu <yulunwu@chromium.org>
Reviewed-by: default avatarYulun Wu <yulunwu@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805883}
parent 80ec9a2d
......@@ -54,10 +54,6 @@ constexpr int kNotificationIndicatorPadding = 1;
constexpr SkColor kDefaultIndicatorColor = SK_ColorWHITE;
// Slightly different colors and alpha in the new UI.
constexpr SkColor kIndicatorColorActive = kDefaultIndicatorColor;
constexpr SkColor kIndicatorColorRunning = SkColorSetA(SK_ColorWHITE, 0x7F);
// The time threshold before an item can be dragged.
constexpr int kDragTimeThresholdMs = 300;
......@@ -249,7 +245,13 @@ class ShelfAppButton::AppStatusIndicatorView
gfx::PointF center = gfx::RectF(GetLocalBounds()).CenterPoint();
cc::PaintFlags flags;
// Active and running indicators look a little different in the new UI.
flags.setColor(active_ ? kIndicatorColorActive : kIndicatorColorRunning);
AshColorProvider* ash_color_provider = AshColorProvider::Get();
auto content_layer_type =
active_ ? AshColorProvider::ContentLayerType::kAppStateIndicatorColor
: AshColorProvider::ContentLayerType::
kAppStateIndicatorColorInactive;
flags.setColor(
ash_color_provider->GetContentLayerColor(content_layer_type));
flags.setAntiAlias(true);
flags.setStrokeCap(cc::PaintFlags::Cap::kRound_Cap);
flags.setStrokeJoin(cc::PaintFlags::Join::kRound_Join);
......
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