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

Side by Side Diff: ash/shelf/app_list_button.cc

Issue 2127723003: [MD settings] do not scroll when toggling advanced menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge with master Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/settings/settings_main/settings_main.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shelf/app_list_button.h" 5 #include "ash/shelf/app_list_button.h"
6 6
7 #include "ash/common/ash_constants.h" 7 #include "ash/common/ash_constants.h"
8 #include "ash/common/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/shelf/shelf_constants.h" 9 #include "ash/common/shelf/shelf_constants.h"
10 #include "ash/common/shelf/shelf_item_types.h" 10 #include "ash/common/shelf/shelf_item_types.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 return base::WrapUnique(ink_drop_ripple); 260 return base::WrapUnique(ink_drop_ripple);
261 } 261 }
262 262
263 void AppListButton::NotifyClick(const ui::Event& event) { 263 void AppListButton::NotifyClick(const ui::Event& event) {
264 ImageButton::NotifyClick(event); 264 ImageButton::NotifyClick(event);
265 if (listener_) 265 if (listener_)
266 listener_->ButtonPressed(this, event, ink_drop()); 266 listener_->ButtonPressed(this, event, ink_drop());
267 } 267 }
268 268
269 bool AppListButton::ShouldEnterPushedState(const ui::Event& event) { 269 bool AppListButton::ShouldEnterPushedState(const ui::Event& event) {
270 return !Shell::GetInstance()->IsApplistVisible(); 270 if (!shelf_view_->ShouldEventActivateButton(this, event))
271 return false;
272 if (Shell::GetInstance()->IsApplistVisible())
273 return false;
274 return views::ImageButton::ShouldEnterPushedState(event);
Dan Beam 2016/07/08 23:32:28 wat
dschuyler 2016/07/20 19:03:01 Done.
271 } 275 }
272 276
273 bool AppListButton::ShouldShowInkDropHighlight() const { 277 bool AppListButton::ShouldShowInkDropHighlight() const {
274 return false; 278 return false;
275 } 279 }
276 280
277 void AppListButton::SetDrawBackgroundAsActive(bool draw_background_as_active) { 281 void AppListButton::SetDrawBackgroundAsActive(bool draw_background_as_active) {
278 if (draw_background_as_active_ == draw_background_as_active) 282 if (draw_background_as_active_ == draw_background_as_active)
279 return; 283 return;
280 draw_background_as_active_ = draw_background_as_active; 284 draw_background_as_active_ = draw_background_as_active;
281 SchedulePaint(); 285 SchedulePaint();
282 } 286 }
283 287
284 } // namespace ash 288 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/settings_main/settings_main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698