Commit 0bb5bd82 authored by Qiang Xu's avatar Qiang Xu Committed by Commit Bot

app_list: make launcher 95% opacity when blur is disabled

Bug: 757473
Test: tested with fullscreen app list flag and background blur flag
Change-Id: I1c5fbe9d69dc48b58b8f8181853de51ae22af9e9
Reviewed-on: https://chromium-review.googlesource.com/627696Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Qiang(Joe) Xu <warx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496546}
parent f9d65767
...@@ -222,6 +222,7 @@ class HideViewAnimationObserver : public ui::ImplicitAnimationObserver { ...@@ -222,6 +222,7 @@ class HideViewAnimationObserver : public ui::ImplicitAnimationObserver {
AppListView::AppListView(AppListViewDelegate* delegate) AppListView::AppListView(AppListViewDelegate* delegate)
: delegate_(delegate), : delegate_(delegate),
is_fullscreen_app_list_enabled_(features::IsFullscreenAppListEnabled()), is_fullscreen_app_list_enabled_(features::IsFullscreenAppListEnabled()),
is_background_blur_enabled_(features::IsBackgroundBlurEnabled()),
display_observer_(this), display_observer_(this),
animation_observer_(new HideViewAnimationObserver()), animation_observer_(new HideViewAnimationObserver()),
app_list_animation_duration_ms_(kAppListAnimationDurationMs) { app_list_animation_duration_ms_(kAppListAnimationDurationMs) {
...@@ -417,10 +418,10 @@ void AppListView::InitContents(gfx::NativeView parent, int initial_apps_page) { ...@@ -417,10 +418,10 @@ void AppListView::InitContents(gfx::NativeView parent, int initial_apps_page) {
app_list_background_shield_ = new views::View; app_list_background_shield_ = new views::View;
app_list_background_shield_->SetPaintToLayer(ui::LAYER_SOLID_COLOR); app_list_background_shield_->SetPaintToLayer(ui::LAYER_SOLID_COLOR);
app_list_background_shield_->layer()->SetOpacity( app_list_background_shield_->layer()->SetOpacity(
is_fullscreen_app_list_enabled_ ? kAppListOpacityWithBlur is_background_blur_enabled_ ? kAppListOpacityWithBlur
: kAppListOpacity); : kAppListOpacity);
SetBackgroundShieldColor(); SetBackgroundShieldColor();
if (features::IsBackgroundBlurEnabled()) { if (is_background_blur_enabled_) {
app_list_background_shield_->layer()->SetBackgroundBlur( app_list_background_shield_->layer()->SetBackgroundBlur(
kAppListBlurRadius); kAppListBlurRadius);
} }
......
...@@ -54,7 +54,7 @@ class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView, ...@@ -54,7 +54,7 @@ class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView,
static constexpr float kNumOfShelfSize = 2.0; static constexpr float kNumOfShelfSize = 2.0;
// The opacity of the app list background. // The opacity of the app list background.
static constexpr float kAppListOpacity = 0.8; static constexpr float kAppListOpacity = 0.95;
// The opacity of the app list background with blur. // The opacity of the app list background with blur.
static constexpr float kAppListOpacityWithBlur = 0.7; static constexpr float kAppListOpacityWithBlur = 0.7;
...@@ -334,6 +334,8 @@ class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView, ...@@ -334,6 +334,8 @@ class APP_LIST_EXPORT AppListView : public views::BubbleDialogDelegateView,
float last_fling_velocity_ = 0; float last_fling_velocity_ = 0;
// Whether the fullscreen app list feature is enabled. // Whether the fullscreen app list feature is enabled.
const bool is_fullscreen_app_list_enabled_; const bool is_fullscreen_app_list_enabled_;
// Whether the background blur is enabled.
const bool is_background_blur_enabled_;
// The state of the app list, controlled via SetState(). // The state of the app list, controlled via SetState().
AppListState app_list_state_ = PEEKING; AppListState app_list_state_ = PEEKING;
// An observer that notifies AppListView when the display has changed. // An observer that notifies AppListView when the display has changed.
......
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