Commit 092c274c authored by Yulun Wu's avatar Yulun Wu Committed by Commit Bot

Update OOBE button color as shelf theming behavior is not defined.

Bug: 1130865
Change-Id: I6ff276495f08928a68be3cd53a2681c37a14dd1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2423263Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Reviewed-by: default avatarYulun Wu <yulunwu@chromium.org>
Commit-Queue: Yulun Wu <yulunwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809916}
parent 1c92945c
......@@ -84,6 +84,15 @@ SkColor GetButtonIconColor() {
AshColorProvider::ContentLayerType::kButtonIconColor);
}
SkColor GetButtonBackgroundColor() {
if (Shell::Get()->session_controller()->GetSessionState() ==
session_manager::SessionState::OOBE) {
return SkColorSetA(SK_ColorBLACK, 16); // 6% opacity
}
return AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive);
}
LoginMetricsRecorder::ShelfButtonClickTarget GetUserClickTarget(int button_id) {
switch (button_id) {
case LoginShelfView::kShutdown:
......@@ -215,8 +224,7 @@ class LoginShelfButton : public views::LabelButton {
void PaintButtonContents(gfx::Canvas* canvas) override {
cc::PaintFlags flags;
flags.setAntiAlias(true);
flags.setColor(AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive));
flags.setColor(GetButtonBackgroundColor());
flags.setStyle(cc::PaintFlags::kFill_Style);
canvas->DrawPath(GetButtonHighlightPath(this), flags);
}
......
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