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

Unified Diff: ash/common/shelf/app_list_button.cc

Issue 2534953006: Fix shelf auto-hide calculation for app-list visibility. (Closed)
Patch Set: try another approach. Created 4 years 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
Index: ash/common/shelf/app_list_button.cc
diff --git a/ash/common/shelf/app_list_button.cc b/ash/common/shelf/app_list_button.cc
index e3bdf2235a90325706f67cd8ea8629f517d3f534..59f72b4bbe9b9021dc4e2b4a057fc234a6ab915f 100644
--- a/ash/common/shelf/app_list_button.cc
+++ b/ash/common/shelf/app_list_button.cc
@@ -33,8 +33,6 @@ AppListButton::AppListButton(InkDropButtonListener* listener,
ShelfView* shelf_view,
WmShelf* wm_shelf)
: views::ImageButton(nullptr),
- draw_background_as_active_(false),
- background_alpha_(0),
listener_(listener),
shelf_view_(shelf_view),
wm_shelf_(wm_shelf) {
@@ -62,6 +60,8 @@ void AppListButton::OnAppListShown() {
AnimateInkDrop(views::InkDropState::ACTIVATED, nullptr);
else
SchedulePaint();
+ is_showing_app_list_ = true;
+ wm_shelf_->UpdateAutoHideState();
}
void AppListButton::OnAppListDismissed() {
@@ -69,6 +69,8 @@ void AppListButton::OnAppListDismissed() {
AnimateInkDrop(views::InkDropState::DEACTIVATED, nullptr);
else
SchedulePaint();
+ is_showing_app_list_ = false;
+ wm_shelf_->UpdateAutoHideState();
}
void AppListButton::SetBackgroundAlpha(int alpha) {

Powered by Google App Engine
This is Rietveld 408576698