Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1765)

Unified Diff: ash/shelf/shelf_layout_manager.cc

Issue 2946363002: Added 1 liner to fix shelf background hiding on side shelf alignment. (Closed)
Patch Set: Added 1 liner to fix shelf background hiding on side shelf alignment. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager.cc
diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc
index 1336dc3b3daa4a49dd2a94d07905b073b333b8e2..ae7475297d520643d263482a367fe2afd15cc5c9 100644
--- a/ash/shelf/shelf_layout_manager.cc
+++ b/ash/shelf/shelf_layout_manager.cc
@@ -147,6 +147,8 @@ ShelfLayoutManager::ShelfLayoutManager(ShelfWidget* shelf_widget, Shelf* shelf)
shelf_(shelf),
window_overlaps_shelf_(false),
mouse_over_shelf_when_auto_hide_timer_started_(false),
+ is_fullscreen_app_list_enabled_(
+ app_list::features::IsFullscreenAppListEnabled()),
gesture_drag_status_(GESTURE_DRAG_NONE),
gesture_drag_amount_(0.f),
gesture_drag_auto_hide_state_(SHELF_AUTO_HIDE_SHOWN),
@@ -432,7 +434,7 @@ void ShelfLayoutManager::OnAppListVisibilityChanged(bool shown,
return;
is_app_list_visible_ = shown;
- if (app_list::features::IsFullscreenAppListEnabled())
+ if (is_fullscreen_app_list_enabled_)
MaybeUpdateShelfBackground(AnimationChangeType::IMMEDIATE);
}
@@ -479,8 +481,14 @@ ShelfBackgroundType ShelfLayoutManager::GetShelfBackgroundType() const {
if (state_.session_state != session_manager::SessionState::ACTIVE)
return SHELF_BACKGROUND_OVERLAP;
+ // If the app list is active and the shelf is oriented vertically, enable the
+ // shelf background.
+ if (is_app_list_visible_ && !shelf_->IsHorizontalAlignment() &&
+ is_fullscreen_app_list_enabled_)
+ return SHELF_BACKGROUND_OVERLAP;
+
// If the app list is active, hide the shelf background to prevent overlap.
- if (is_app_list_visible_ && app_list::features::IsFullscreenAppListEnabled())
+ if (is_app_list_visible_ && is_fullscreen_app_list_enabled_)
return SHELF_BACKGROUND_DEFAULT;
if (state_.visibility_state != SHELF_AUTO_HIDE &&
« no previous file with comments | « ash/shelf/shelf_layout_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698