Commit 95239c50 authored by Min Chen's avatar Min Chen Committed by Commit Bot

Remove overview icon animation on dragging window from top.

Bug: 926990
Change-Id: I9db8486d10837c8af29aaa19c6f534f4be768670
Reviewed-on: https://chromium-review.googlesource.com/c/1453538Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Min Chen <minch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629816}
parent e5e33aaa
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "base/metrics/user_metrics_action.h" #include "base/metrics/user_metrics_action.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/paint_vector_icon.h"
#include "ui/views/animation/ink_drop.h"
#include "ui/views/border.h" #include "ui/views/border.h"
#include "ui/views/controls/image_view.h" #include "ui/views/controls/image_view.h"
#include "ui/wm/core/window_util.h" #include "ui/wm/core/window_util.h"
...@@ -63,6 +64,10 @@ void OverviewButtonTray::UpdateAfterLoginStatusChange(LoginStatus status) { ...@@ -63,6 +64,10 @@ void OverviewButtonTray::UpdateAfterLoginStatusChange(LoginStatus status) {
UpdateIconVisibility(); UpdateIconVisibility();
} }
void OverviewButtonTray::SnapRippleToActivated() {
GetInkDrop()->SnapToActivated();
}
void OverviewButtonTray::OnGestureEvent(ui::GestureEvent* event) { void OverviewButtonTray::OnGestureEvent(ui::GestureEvent* event) {
Button::OnGestureEvent(event); Button::OnGestureEvent(event);
if (event->type() == ui::ET_GESTURE_LONG_PRESS) { if (event->type() == ui::ET_GESTURE_LONG_PRESS) {
......
...@@ -45,6 +45,9 @@ class ASH_EXPORT OverviewButtonTray : public TrayBackgroundView, ...@@ -45,6 +45,9 @@ class ASH_EXPORT OverviewButtonTray : public TrayBackgroundView,
// state of TabletMode // state of TabletMode
virtual void UpdateAfterLoginStatusChange(LoginStatus status); virtual void UpdateAfterLoginStatusChange(LoginStatus status);
// Sets the ink drop ripple to ACTIVATED immediately with no animations.
void SnapRippleToActivated();
// views::Button: // views::Button:
void OnGestureEvent(ui::GestureEvent* event) override; void OnGestureEvent(ui::GestureEvent* event) override;
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/shelf/shelf_layout_manager.h" #include "ash/shelf/shelf_layout_manager.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/system/overview/overview_button_tray.h"
#include "ash/system/status_area_widget.h"
#include "ash/wm/overview/overview_controller.h" #include "ash/wm/overview/overview_controller.h"
#include "ash/wm/overview/overview_grid.h" #include "ash/wm/overview/overview_grid.h"
#include "ash/wm/overview/overview_item.h" #include "ash/wm/overview/overview_item.h"
...@@ -108,6 +110,12 @@ void TabletModeWindowDragDelegate::StartWindowDrag( ...@@ -108,6 +110,12 @@ void TabletModeWindowDragDelegate::StartWindowDrag(
// might open overview in the dragged window side of the screen. // might open overview in the dragged window side of the screen.
split_view_controller_->OnWindowDragStarted(dragged_window_); split_view_controller_->OnWindowDragStarted(dragged_window_);
if (ShouldOpenOverviewWhenDragStarts() && !controller->IsSelecting()) { if (ShouldOpenOverviewWhenDragStarts() && !controller->IsSelecting()) {
OverviewButtonTray* overview_button_tray =
RootWindowController::ForWindow(dragged_window_)
->GetStatusAreaWidget()
->overview_button_tray();
DCHECK(overview_button_tray);
overview_button_tray->SnapRippleToActivated();
controller->ToggleOverview( controller->ToggleOverview(
OverviewSession::EnterExitOverviewType::kWindowDragged); OverviewSession::EnterExitOverviewType::kWindowDragged);
} }
......
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