Commit f74b2d14 authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Adding separator to UnifiedSystemTray.

This CL adds separator between notification center part and system tray
part of UnifiedSystemTray.

Screenshot: https://screenshot.googleplex.com/i2G4zquv1Gz
UX spec: http://shortn/_U7QSE9nhSk

TEST=manual
BUG=828752

Change-Id: Ia1719faada97c0886b1a8d8526e5a8777f0dd222
Reviewed-on: https://chromium-review.googlesource.com/1006296Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550383}
parent 4aa62fd0
...@@ -146,6 +146,7 @@ constexpr SkColor kUnifiedFeaturePodHoverColor = ...@@ -146,6 +146,7 @@ constexpr SkColor kUnifiedFeaturePodHoverColor =
constexpr gfx::Insets kUnifiedMenuItemPadding(0, 16, 16, 16); constexpr gfx::Insets kUnifiedMenuItemPadding(0, 16, 16, 16);
constexpr gfx::Insets kUnifiedSliderPadding(0, 16); constexpr gfx::Insets kUnifiedSliderPadding(0, 16);
constexpr int kUnifiedNotificationCenterSpacing = 16;
constexpr int kUnifiedTrayCornerRadius = 20; constexpr int kUnifiedTrayCornerRadius = 20;
constexpr int kUnifiedTopShortcutSpacing = 16; constexpr int kUnifiedTopShortcutSpacing = 16;
constexpr gfx::Insets kUnifiedTopShortcutPadding(0, 16); constexpr gfx::Insets kUnifiedTopShortcutPadding(0, 16);
......
...@@ -20,6 +20,19 @@ ...@@ -20,6 +20,19 @@
namespace ash { namespace ash {
namespace {
std::unique_ptr<views::Background> CreateUnifiedBackground() {
return views::CreateBackgroundFromPainter(
views::Painter::CreateSolidRoundRectPainter(
app_list::features::IsBackgroundBlurEnabled()
? kUnifiedMenuBackgroundColorWithBlur
: kUnifiedMenuBackgroundColor,
kUnifiedTrayCornerRadius));
}
} // namespace
UnifiedSlidersContainerView::UnifiedSlidersContainerView( UnifiedSlidersContainerView::UnifiedSlidersContainerView(
bool initially_expanded) bool initially_expanded)
: expanded_amount_(initially_expanded ? 1.0 : 0.0) { : expanded_amount_(initially_expanded ? 1.0 : 0.0) {
...@@ -79,24 +92,27 @@ UnifiedSystemTrayView::UnifiedSystemTrayView( ...@@ -79,24 +92,27 @@ UnifiedSystemTrayView::UnifiedSystemTrayView(
system_info_view_(new UnifiedSystemInfoView()) { system_info_view_(new UnifiedSystemInfoView()) {
DCHECK(controller_); DCHECK(controller_);
auto* layout = SetLayoutManager( auto* layout = SetLayoutManager(std::make_unique<views::BoxLayout>(
std::make_unique<views::BoxLayout>(views::BoxLayout::kVertical)); views::BoxLayout::kVertical, gfx::Insets(),
kUnifiedNotificationCenterSpacing));
SetBackground(views::CreateBackgroundFromPainter( SetBackground(CreateUnifiedBackground());
views::Painter::CreateSolidRoundRectPainter(
app_list::features::IsBackgroundBlurEnabled()
? kUnifiedMenuBackgroundColorWithBlur
: kUnifiedMenuBackgroundColor,
kUnifiedTrayCornerRadius)));
SetPaintToLayer(); SetPaintToLayer();
layer()->SetFillsBoundsOpaquely(false); layer()->SetFillsBoundsOpaquely(false);
AddChildView(message_center_view_); AddChildView(message_center_view_);
AddChildView(top_shortcuts_view_);
AddChildView(feature_pods_container_);
AddChildView(sliders_container_);
AddChildView(system_info_view_);
layout->SetFlexForView(message_center_view_, 1); layout->SetFlexForView(message_center_view_, 1);
auto* system_tray_container = new views::View;
system_tray_container->SetLayoutManager(
std::make_unique<views::BoxLayout>(views::BoxLayout::kVertical));
system_tray_container->SetBackground(CreateUnifiedBackground());
AddChildView(system_tray_container);
system_tray_container->AddChildView(top_shortcuts_view_);
system_tray_container->AddChildView(feature_pods_container_);
system_tray_container->AddChildView(sliders_container_);
system_tray_container->AddChildView(system_info_view_);
} }
UnifiedSystemTrayView::~UnifiedSystemTrayView() = default; UnifiedSystemTrayView::~UnifiedSystemTrayView() = default;
......
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