Commit ecb0ae3a authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Remove fadeout mask while dragging the app launcher

Bug: 898534
Test: manual: no functional/visual change
Change-Id: I32aebe966f4a9fc22f51652ddf797583909ded9f
Reviewed-on: https://chromium-review.googlesource.com/c/1298122
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarWeidong Guo <weidongg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602439}
parent 4667a219
...@@ -354,13 +354,6 @@ AppsGridView::AppsGridView(ContentsView* contents_view, ...@@ -354,13 +354,6 @@ AppsGridView::AppsGridView(ContentsView* contents_view,
AddChildView(expand_arrow_view_); AddChildView(expand_arrow_view_);
} }
if (!folder_delegate_ && app_list_features::IsBackgroundBlurEnabled()) {
// TODO(newcomer): Improve implementation of the mask layer so we can
// enable it on all devices https://crbug.com/765292.
fadeout_layer_delegate_ = std::make_unique<FadeoutLayerDelegate>();
layer()->SetMaskLayer(fadeout_layer_delegate_->layer());
}
if (!folder_delegate && is_new_style_launcher_enabled_) if (!folder_delegate && is_new_style_launcher_enabled_)
SetBorder(views::CreateEmptyBorder(gfx::Insets(kFadeoutZoneHeight, 0))); SetBorder(views::CreateEmptyBorder(gfx::Insets(kFadeoutZoneHeight, 0)));
...@@ -967,6 +960,21 @@ void AppsGridView::Layout() { ...@@ -967,6 +960,21 @@ void AppsGridView::Layout() {
void AppsGridView::UpdateControlVisibility(AppListViewState app_list_state, void AppsGridView::UpdateControlVisibility(AppListViewState app_list_state,
bool is_in_drag) { bool is_in_drag) {
if (!folder_delegate_ && app_list_features::IsBackgroundBlurEnabled()) {
if (is_in_drag) {
layer()->SetMaskLayer(nullptr);
} else {
// TODO(newcomer): Improve implementation of the mask layer so we can
// enable it on all devices https://crbug.com/765292.
if (!fadeout_layer_delegate_)
fadeout_layer_delegate_ = std::make_unique<FadeoutLayerDelegate>();
if (!layer()->layer_mask_layer()) {
layer()->SetMaskLayer(fadeout_layer_delegate_->layer());
fadeout_layer_delegate_->layer()->SetBounds(layer()->bounds());
}
}
}
const bool fullscreen_apps_in_drag = const bool fullscreen_apps_in_drag =
app_list_state == AppListViewState::FULLSCREEN_ALL_APPS || is_in_drag; app_list_state == AppListViewState::FULLSCREEN_ALL_APPS || is_in_drag;
if (all_apps_indicator_) if (all_apps_indicator_)
......
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