Commit 423c2e99 authored by Ana Salazar's avatar Ana Salazar Committed by Commit Bot

Cros: Fix unnecesary ripples on system tray when dragging hotseat

This changes the InkDropMode of several buttons in the System Tray from
ON to ON_NO_GESTURE_HANDLER to stop showing the ripple for gesture
events.

Fixed: 1012822
Change-Id: I4a004c7db4d45ce67f25f0f8de4257beb5d51d49
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1877450Reviewed-by: default avatarTim Song <tengs@chromium.org>
Reviewed-by: default avatarJenny Zhang <jennyz@chromium.org>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Ana Salazar <anasalazar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710923}
parent 2315de34
...@@ -25,8 +25,6 @@ DictationButtonTray::DictationButtonTray(Shelf* shelf) ...@@ -25,8 +25,6 @@ DictationButtonTray::DictationButtonTray(Shelf* shelf)
: TrayBackgroundView(shelf), icon_(new views::ImageView()) { : TrayBackgroundView(shelf), icon_(new views::ImageView()) {
UpdateVisibility(); UpdateVisibility();
SetInkDropMode(InkDropMode::ON);
off_image_ = gfx::CreateVectorIcon(kDictationOffNewuiIcon, off_image_ = gfx::CreateVectorIcon(kDictationOffNewuiIcon,
ShelfConfig::Get()->shelf_icon_color()); ShelfConfig::Get()->shelf_icon_color());
on_image_ = gfx::CreateVectorIcon(kDictationOnNewuiIcon, on_image_ = gfx::CreateVectorIcon(kDictationOnNewuiIcon,
......
...@@ -30,7 +30,6 @@ const char kSelectToSpeakTrayClassName[] = ...@@ -30,7 +30,6 @@ const char kSelectToSpeakTrayClassName[] =
SelectToSpeakTray::SelectToSpeakTray(Shelf* shelf) SelectToSpeakTray::SelectToSpeakTray(Shelf* shelf)
: TrayBackgroundView(shelf), icon_(new views::ImageView()) { : TrayBackgroundView(shelf), icon_(new views::ImageView()) {
SetInkDropMode(InkDropMode::ON);
UpdateIconsForSession(); UpdateIconsForSession();
icon_->SetImage(inactive_image_); icon_->SetImage(inactive_image_);
......
...@@ -335,7 +335,6 @@ ImeMenuTray::ImeMenuTray(Shelf* shelf) ...@@ -335,7 +335,6 @@ ImeMenuTray::ImeMenuTray(Shelf* shelf)
is_handwriting_enabled_(false), is_handwriting_enabled_(false),
is_voice_enabled_(false) { is_voice_enabled_(false) {
DCHECK(ime_controller_); DCHECK(ime_controller_);
SetInkDropMode(InkDropMode::ON);
CreateLabel(); CreateLabel();
SystemTrayNotifier* tray_notifier = Shell::Get()->system_tray_notifier(); SystemTrayNotifier* tray_notifier = Shell::Get()->system_tray_notifier();
tray_notifier->AddIMEObserver(this); tray_notifier->AddIMEObserver(this);
......
...@@ -35,8 +35,6 @@ OverviewButtonTray::OverviewButtonTray(Shelf* shelf) ...@@ -35,8 +35,6 @@ OverviewButtonTray::OverviewButtonTray(Shelf* shelf)
: TrayBackgroundView(shelf), : TrayBackgroundView(shelf),
icon_(new views::ImageView()), icon_(new views::ImageView()),
scoped_session_observer_(this) { scoped_session_observer_(this) {
SetInkDropMode(InkDropMode::ON);
gfx::ImageSkia image = gfx::CreateVectorIcon( gfx::ImageSkia image = gfx::CreateVectorIcon(
kShelfOverviewIcon, ShelfConfig::Get()->shelf_icon_color()); kShelfOverviewIcon, ShelfConfig::Get()->shelf_icon_color());
icon_->SetImage(image); icon_->SetImage(image);
......
...@@ -180,7 +180,6 @@ PaletteTray::PaletteTray(Shelf* shelf) ...@@ -180,7 +180,6 @@ PaletteTray::PaletteTray(Shelf* shelf)
scoped_session_observer_(this) { scoped_session_observer_(this) {
PaletteTool::RegisterToolInstances(palette_tool_manager_.get()); PaletteTool::RegisterToolInstances(palette_tool_manager_.get());
SetInkDropMode(InkDropMode::ON);
SetLayoutManager(std::make_unique<views::FillLayout>()); SetLayoutManager(std::make_unique<views::FillLayout>());
icon_ = new views::ImageView(); icon_ = new views::ImageView();
icon_->set_tooltip_text( icon_->set_tooltip_text(
......
...@@ -83,8 +83,6 @@ void StatusAreaOverflowButtonTray::IconView::UpdateRotation() { ...@@ -83,8 +83,6 @@ void StatusAreaOverflowButtonTray::IconView::UpdateRotation() {
StatusAreaOverflowButtonTray::StatusAreaOverflowButtonTray(Shelf* shelf) StatusAreaOverflowButtonTray::StatusAreaOverflowButtonTray(Shelf* shelf)
: TrayBackgroundView(shelf), icon_(new IconView()) { : TrayBackgroundView(shelf), icon_(new IconView()) {
SetInkDropMode(InkDropMode::ON);
tray_container()->AddChildView(icon_); tray_container()->AddChildView(icon_);
} }
......
...@@ -155,6 +155,7 @@ TrayBackgroundView::TrayBackgroundView(Shelf* shelf) ...@@ -155,6 +155,7 @@ TrayBackgroundView::TrayBackgroundView(Shelf* shelf)
set_ink_drop_visible_opacity( set_ink_drop_visible_opacity(
ShelfConfig::Get()->shelf_ink_drop_visible_opacity()); ShelfConfig::Get()->shelf_ink_drop_visible_opacity());
SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER);
SetLayoutManager(std::make_unique<views::FillLayout>()); SetLayoutManager(std::make_unique<views::FillLayout>());
SetInstallFocusRingOnFocus(true); SetInstallFocusRingOnFocus(true);
focus_ring()->SetColor(ShelfConfig::Get()->shelf_focus_border_color()); focus_ring()->SetColor(ShelfConfig::Get()->shelf_focus_border_color());
......
...@@ -152,7 +152,6 @@ UnifiedSystemTray::UnifiedSystemTray(Shelf* shelf) ...@@ -152,7 +152,6 @@ UnifiedSystemTray::UnifiedSystemTray(Shelf* shelf)
tray_container()->AddChildView(new tray::PowerTrayView(shelf)); tray_container()->AddChildView(new tray::PowerTrayView(shelf));
tray_container()->AddChildView(time_view_); tray_container()->AddChildView(time_view_);
SetInkDropMode(InkDropMode::ON);
set_separator_visibility(false); set_separator_visibility(false);
ShelfConfig::Get()->AddObserver(this); ShelfConfig::Get()->AddObserver(this);
......
...@@ -29,8 +29,6 @@ namespace ash { ...@@ -29,8 +29,6 @@ namespace ash {
VirtualKeyboardTray::VirtualKeyboardTray(Shelf* shelf) VirtualKeyboardTray::VirtualKeyboardTray(Shelf* shelf)
: TrayBackgroundView(shelf), icon_(new views::ImageView), shelf_(shelf) { : TrayBackgroundView(shelf), icon_(new views::ImageView), shelf_(shelf) {
SetInkDropMode(InkDropMode::ON);
UpdateIcon(); UpdateIcon();
tray_container()->AddChildView(icon_); tray_container()->AddChildView(icon_);
......
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