Commit 14f5cd73 authored by minch's avatar minch Committed by Commit Bot

dark_mode: Always set blur for system tray menu.

Themed system tray background was added at crrev.com/c/2006370 and
removed at crrev.com/c/2398988, since themed background is controlled
inside AshColorProvider after crrev.com/c/2242223.

- Remove the unnecessary logic inside GetBackgroundColor that was added
  to theme the system tray background color.
- Always add blur for system tray.

Then the background color of the system tray will always be
kTransparent80 with 30 blur sigma, based on the latest spec at
https://www.figma.com/file/rQFGy3iAMfNdDnydTGkvHr/Style-%7C-Semantic-color-system-surface-theming?node-id=372%3A0

Bug: 1130618
Change-Id: Ib38a30f6f287baa63a3f2544374224e526859e92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424646Reviewed-by: default avatarTim Song <tengs@chromium.org>
Commit-Queue: Min Chen <minch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809607}
parent 34396121
......@@ -250,8 +250,7 @@ TrayBubbleView::TrayBubbleView(const InitParams& init_params)
layer()->SetColor(UnifiedSystemTrayView::GetBackgroundColor());
layer()->SetFillsBoundsOpaquely(false);
layer()->SetIsFastRoundedCorner(true);
if (features::IsBackgroundBlurEnabled())
layer()->SetBackgroundBlur(kUnifiedMenuBackgroundBlur);
layer()->SetBackgroundBlur(kUnifiedMenuBackgroundBlur);
} else {
// Create a layer so that the layer for FocusRing stays in this view's
// layer. Without it, the layer for FocusRing goes above the
......
......@@ -7,9 +7,8 @@
#include <numeric>
#include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/shelf_config.h"
#include "ash/session/session_controller_impl.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_widget.h"
#include "ash/shell.h"
#include "ash/style/ash_color_provider.h"
#include "ash/system/media/unified_media_controls_container.h"
......@@ -175,17 +174,8 @@ class UnifiedSystemTrayView::SystemTrayContainer : public views::View {
// static
SkColor UnifiedSystemTrayView::GetBackgroundColor() {
auto background_type = Shelf::ForWindow(Shell::GetPrimaryRootWindow())
->shelf_widget()
->GetBackgroundType();
AshColorProvider::BaseLayerType layer_type =
(background_type == ShelfBackgroundType::kMaximized ||
background_type == ShelfBackgroundType::kInApp) ||
!features::IsBackgroundBlurEnabled()
? AshColorProvider::BaseLayerType::kTransparent90
: AshColorProvider::BaseLayerType::kTransparent80;
return AshColorProvider::Get()->GetBaseLayerColor(layer_type);
return AshColorProvider::Get()->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent80);
}
// static
......
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