Commit 4c291c8f authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Update kTransparent74 and kShield74 to 80

Bug: 1046966
Change-Id: I7611a62da0a084471073546fe8390642b887c206
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2029490
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737133}
parent c590b8e8
......@@ -229,7 +229,7 @@ LockScreenMediaControlsView::LockScreenMediaControlsView(
views::BoxLayout::Orientation::kVertical, kMediaControlsInsets));
contents_view_->SetBackground(views::CreateRoundedRectBackground(
AshColorProvider::Get()->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent74,
AshColorProvider::BaseLayerType::kTransparent80,
AshColorProvider::AshColorMode::kDark),
kMediaControlsCornerRadius));
......
......@@ -133,7 +133,7 @@ LoginBaseBubbleView::LoginBaseBubbleView(views::View* anchor_view,
// Layer rendering is needed for animation.
SetPaintToLayer();
SkColor background_color = AshColorProvider::Get()->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent74,
AshColorProvider::BaseLayerType::kTransparent80,
AshColorProvider::AshColorMode::kDark);
layer()->SetBackgroundBlur(
static_cast<float>(AshColorProvider::LayerBlurSigma::kBlurDefault));
......
......@@ -63,7 +63,7 @@ TEST_F(LoginBaseBubbleViewTest, BasicProperties) {
EXPECT_EQ(bubble_->width(), kBubbleTotalWidthDp);
SkColor background_color = AshColorProvider::Get()->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent74,
AshColorProvider::BaseLayerType::kTransparent80,
AshColorProvider::AshColorMode::kDark);
EXPECT_EQ(bubble_->background()->get_color(), background_color);
......
......@@ -358,12 +358,12 @@ SkColor ShelfConfig::GetDefaultShelfColor() const {
if (!chromeos::switches::ShouldShowShelfHotseat()) {
layer_type = IsTabletMode()
? AshColorProvider::BaseLayerType::kTransparent60
: AshColorProvider::BaseLayerType::kTransparent74;
: AshColorProvider::BaseLayerType::kTransparent80;
} else if (IsTabletMode()) {
layer_type = is_in_app() ? AshColorProvider::BaseLayerType::kTransparent90
: AshColorProvider::BaseLayerType::kTransparent60;
} else {
layer_type = AshColorProvider::BaseLayerType::kTransparent74;
layer_type = AshColorProvider::BaseLayerType::kTransparent80;
}
SkColor final_color = AshColorProvider::Get()->GetBaseLayerColor(
......
......@@ -33,7 +33,7 @@ constexpr float kSecondToneOpacity = 0.3f;
constexpr int kAlpha20 = 51; // 20%
constexpr int kAlpha40 = 102; // 40%
constexpr int kAlpha60 = 153; // 60%
constexpr int kAlpha74 = 188; // 74%
constexpr int kAlpha80 = 204; // 80%
constexpr int kAlpha90 = 230; // 90%
// Gets the color mode value from feature flag "--ash-color-mode".
......@@ -163,7 +163,7 @@ AshColorProvider::RippleAttributes AshColorProvider::GetRippleAttributes(
SkColor AshColorProvider::GetShieldLayerColorImpl(
ShieldLayerType type,
AshColorMode color_mode) const {
const int kAlphas[] = {kAlpha20, kAlpha40, kAlpha60, kAlpha74, kAlpha90};
const int kAlphas[] = {kAlpha20, kAlpha40, kAlpha60, kAlpha80, kAlpha90};
DCHECK_LT(static_cast<size_t>(type), base::size(kAlphas));
return SkColorSetA(
color_mode == AshColorMode::kLight ? SK_ColorWHITE : gfx::kGoogleGrey900,
......@@ -173,7 +173,7 @@ SkColor AshColorProvider::GetShieldLayerColorImpl(
SkColor AshColorProvider::GetBaseLayerColorImpl(BaseLayerType type,
AshColorMode color_mode) const {
SkColor light_color, dark_color;
const int kAlphas[] = {kAlpha20, kAlpha40, kAlpha60, kAlpha74,
const int kAlphas[] = {kAlpha20, kAlpha40, kAlpha60, kAlpha80,
kAlpha90, 0xFF, 0xFF};
DCHECK_LT(static_cast<size_t>(type), base::size(kAlphas));
const int transparent_alpha = kAlphas[static_cast<int>(type)];
......@@ -182,7 +182,7 @@ SkColor AshColorProvider::GetBaseLayerColorImpl(BaseLayerType type,
case BaseLayerType::kTransparent20:
case BaseLayerType::kTransparent40:
case BaseLayerType::kTransparent60:
case BaseLayerType::kTransparent74:
case BaseLayerType::kTransparent80:
case BaseLayerType::kTransparent90:
light_color = SkColorSetA(SK_ColorWHITE, transparent_alpha);
dark_color = SkColorSetA(gfx::kGoogleGrey900, transparent_alpha);
......
......@@ -43,7 +43,7 @@ class ASH_EXPORT AshColorProvider {
kShield20 = 0,
kShield40,
kShield60,
kShield74,
kShield80,
kShield90,
};
......@@ -60,7 +60,7 @@ class ASH_EXPORT AshColorProvider {
kTransparent20 = 0,
kTransparent40,
kTransparent60,
kTransparent74,
kTransparent80,
kTransparent90,
// Base layer is opaque.
......
......@@ -40,7 +40,7 @@ constexpr int kPaddingBetweenMenuItems = 8;
SkColor GetMenuBackgroundColor() {
return AshColorProvider::Get()->DeprecatedGetBaseLayerColor(
features::IsBackgroundBlurEnabled()
? AshColorProvider::BaseLayerType::kTransparent74
? AshColorProvider::BaseLayerType::kTransparent80
: AshColorProvider::BaseLayerType::kTransparent90,
kPowerButtonMenuBackgroundColor);
}
......
......@@ -158,7 +158,7 @@ class ToastOverlayView : public views::View, public views::ButtonListener {
: overlay_(overlay) {
background_color_ = AshColorProvider::Get()->DeprecatedGetBaseLayerColor(
features::IsBackgroundBlurEnabled()
? AshColorProvider::BaseLayerType::kTransparent74
? AshColorProvider::BaseLayerType::kTransparent80
: AshColorProvider::BaseLayerType::kTransparent90,
kToastBackgroundColor);
auto* layout = SetLayoutManager(std::make_unique<views::BoxLayout>(
......
......@@ -264,7 +264,7 @@ SkColor UnifiedSystemTrayView::GetBackgroundColor() {
(background_type == ShelfBackgroundType::kMaximized ||
background_type == ShelfBackgroundType::kInApp)
? AshColorProvider::BaseLayerType::kTransparent90
: AshColorProvider::BaseLayerType::kTransparent74;
: AshColorProvider::BaseLayerType::kTransparent80;
SkColor background_color = AshColorProvider::Get()->GetBaseLayerColor(
layer_type, AshColorProvider::AshColorMode::kDark);
......
......@@ -37,7 +37,7 @@ CloseDeskButton::CloseDeskButton(views::ButtonListener* listener)
layer()->SetFillsBoundsOpaquely(false);
SkColor icon_background_color = AshColorProvider::Get()->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent74,
AshColorProvider::BaseLayerType::kTransparent80,
AshColorProvider::AshColorMode::kDark);
SetImage(views::Button::STATE_NORMAL,
gfx::CreateVectorIcon(kDesksCloseDeskButtonIcon, kIconColor));
......
......@@ -126,7 +126,7 @@ DesksBarView::DesksBarView(OverviewGrid* overview_grid)
background_view_->layer()->SetFillsBoundsOpaquely(false);
background_view_->layer()->SetColor(
AshColorProvider::Get()->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent74,
AshColorProvider::BaseLayerType::kTransparent80,
AshColorProvider::AshColorMode::kDark));
AddChildView(background_view_);
......
......@@ -255,7 +255,7 @@ class WindowCycleView : public views::WidgetDelegateView {
mirror_container_->SetPaintToLayer(ui::LAYER_SOLID_COLOR);
mirror_container_->layer()->SetFillsBoundsOpaquely(false);
SkColor background_color = AshColorProvider::Get()->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent74,
AshColorProvider::BaseLayerType::kTransparent80,
AshColorProvider::AshColorMode::kDark);
mirror_container_->layer()->SetColor(background_color);
mirror_container_->layer()->SetBackgroundBlur(kBackgroundBlurSigma);
......
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