Commit c76592d1 authored by Katie D's avatar Katie D Committed by Commit Bot

Adds Autoclick icons to system tray menu.

Bug: 928592
Change-Id: I1506a77038113ae2b8c641575155d96d1621c06c
Reviewed-on: https://chromium-review.googlesource.com/c/1488177
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Auto-Submit: Katie Dektar <katie@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635715}
parent ba7fcf52
......@@ -11,6 +11,12 @@ aggregate_vector_icons("ash_vector_icons") {
icons = [
"always_show_shelf.icon",
"auto_hide.icon",
"autoclick.icon",
"autoclick_double_click.icon",
"autoclick_drag.icon",
"autoclick_left_click.icon",
"autoclick_right_click.icon",
"autoclick_pause.icon",
"captive_portal.icon",
"check_circle.icon",
"dictation_menu.icon",
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 20,
R_MOVE_TO, 10, 2,
R_CUBIC_TO, 4.42f, 0, 8, 3.58f, 8, 8,
R_CUBIC_TO, 0, 4.42f, -3.58f, 8, -8, 8,
R_CUBIC_TO, -4.42f, 0, -8, -3.58f, -8, -8,
R_CUBIC_TO, 0, -4.42f, 3.58f, -8, 8, -8,
CLOSE,
R_MOVE_TO, 0, 14,
R_CUBIC_TO, 3.31f, 0, 6, -2.69f, 6, -6,
R_CUBIC_TO, 0, -3.31f, -2.69f, -6, -6, -6,
R_CUBIC_TO, -3.31f, 0, -6, 2.69f, -6, 6,
R_CUBIC_TO, 0, 3.31f, 2.69f, 6, 6, 6,
CLOSE,
R_MOVE_TO, 0, -5,
R_CUBIC_TO, 0.55f, 0, 1, -0.45f, 1, -1,
R_CUBIC_TO, 0, -0.55f, -0.45f, -1, -1, -1,
R_CUBIC_TO, -0.55f, 0, -1, 0.45f, -1, 1,
R_CUBIC_TO, 0, 0.55f, 0.45f, 1, 1, 1,
CLOSE,
R_MOVE_TO, 0, 2,
R_CUBIC_TO, -1.66f, 0, -3, -1.34f, -3, -3,
R_CUBIC_TO, 0, -1.66f, 1.34f, -3, 3, -3,
R_CUBIC_TO, 1.66f, 0, 3, 1.34f, 3, 3,
R_CUBIC_TO, 0, 1.66f, -1.34f, 3, -3, 3,
CLOSE
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 20,
R_MOVE_TO, 8, 16.71f,
R_CUBIC_TO, -2.89f, -0.86f, -5, -3.54f, -5, -6.71f,
R_CUBIC_TO, 0, -3.87f, 3.13f, -7, 7, -7,
R_CUBIC_TO, 3.17f, 0, 5.85f, 2.11f, 6.71f, 5,
R_H_LINE_TO, -2.13f,
R_CUBIC_TO, -0.77f, -1.77f, -2.53f, -3, -4.58f, -3,
R_CUBIC_TO, -2.76f, 0, -5, 2.24f, -5, 5,
R_CUBIC_TO, 0, 2.05f, 1.23f, 3.81f, 3, 4.58f,
CLOSE,
R_MOVE_TO, 0, -3.25f,
R_CUBIC_TO, -1.2f, -0.69f, -2, -1.98f, -2, -3.46f,
R_CUBIC_TO, 0, -2.21f, 1.79f, -4, 4, -4,
R_CUBIC_TO, 1.48f, 0, 2.77f, 0.8f, 3.46f, 2,
R_H_LINE_TO, -5.46f,
CLOSE,
R_MOVE_TO, 7, -2.46f,
R_H_LINE_TO, -2.59f,
R_LINE_TO, 5.07f, 5.07f,
R_LINE_TO, -1.41f, 1.41f,
R_LINE_TO, -5.07f, -5.07f,
R_V_LINE_TO, 2.59f,
R_H_LINE_TO, -2,
R_V_LINE_TO, -6,
R_H_LINE_TO, 6,
CLOSE
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 20,
R_MOVE_TO, 9, 11,
R_H_LINE_TO, -4.71f,
R_LINE_TO, 1.95f, 1.87f,
R_LINE_TO, -1.15f, 1.13f,
R_LINE_TO, -4.09f, -4,
R_LINE_TO, 4.09f, -4,
R_LINE_TO, 1.15f, 1.13f,
R_LINE_TO, -1.87f, 1.87f,
R_H_LINE_TO, 4.63f,
R_V_LINE_TO, -4.71f,
R_LINE_TO, -1.87f, 1.95f,
R_LINE_TO, -1.13f, -1.15f,
R_LINE_TO, 4, -4.09f,
R_LINE_TO, 4, 4.09f,
R_LINE_TO, -1.13f, 1.15f,
R_LINE_TO, -1.87f, -1.87f,
R_V_LINE_TO, 4.63f,
R_H_LINE_TO, 4.71f,
R_LINE_TO, -1.95f, -1.87f,
R_LINE_TO, 1.15f, -1.13f,
R_LINE_TO, 4.09f, 4,
R_LINE_TO, -4.09f, 4,
R_LINE_TO, -1.15f, -1.13f,
R_LINE_TO, 1.87f, -1.87f,
R_H_LINE_TO, -4.63f,
R_V_LINE_TO, 4.71f,
R_LINE_TO, 1.87f, -1.95f,
R_LINE_TO, 1.13f, 1.15f,
R_LINE_TO, -4, 4.09f,
R_LINE_TO, -4, -4.09f,
R_LINE_TO, 1.13f, -1.15f,
R_LINE_TO, 1.87f, 1.87f,
CLOSE
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 20,
R_MOVE_TO, 8, 16.71f,
R_CUBIC_TO, -2.89f, -0.86f, -5, -3.54f, -5, -6.71f,
R_CUBIC_TO, 0, -3.87f, 3.13f, -7, 7, -7,
R_CUBIC_TO, 3.17f, 0, 5.85f, 2.11f, 6.71f, 5,
R_H_LINE_TO, -2.13f,
R_CUBIC_TO, -0.77f, -1.77f, -2.53f, -3, -4.58f, -3,
R_CUBIC_TO, -2.76f, 0, -5, 2.24f, -5, 5,
R_CUBIC_TO, 0, 2.05f, 1.23f, 3.81f, 3, 4.58f,
CLOSE,
R_MOVE_TO, 7, -5.71f,
R_H_LINE_TO, -2.59f,
R_LINE_TO, 5.07f, 5.07f,
R_LINE_TO, -1.41f, 1.41f,
R_LINE_TO, -5.07f, -5.07f,
R_V_LINE_TO, 2.59f,
R_H_LINE_TO, -2,
R_V_LINE_TO, -6,
R_H_LINE_TO, 6,
CLOSE
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 20,
R_MOVE_TO, 10, 2,
R_CUBIC_TO, -4.42f, 0, -8, 3.58f, -8, 8,
R_CUBIC_TO, 0, 4.42f, 3.58f, 8, 8, 8,
R_CUBIC_TO, 4.42f, 0, 8, -3.58f, 8, -8,
R_CUBIC_TO, 0, -4.42f, -3.58f, -8, -8, -8,
CLOSE,
R_MOVE_TO, -1, 11,
R_H_LINE_TO, -2,
R_V_LINE_TO, -6,
R_H_LINE_TO, 2,
CLOSE,
R_MOVE_TO, 4, 0,
R_H_LINE_TO, -2,
R_V_LINE_TO, -6,
R_H_LINE_TO, 2,
CLOSE
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 20,
R_MOVE_TO, 3.07f, 9,
R_CUBIC_TO, 0.49f, -3.39f, 3.4f, -6, 6.93f, -6,
R_CUBIC_TO, 3.87f, 0, 7, 3.13f, 7, 7,
R_CUBIC_TO, 0, 3.17f, -2.11f, 5.85f, -5, 6.71f,
R_V_LINE_TO, -2.13f,
R_CUBIC_TO, 1.77f, -0.77f, 3, -2.53f, 3, -4.58f,
R_CUBIC_TO, 0, -2.76f, -2.24f, -5, -5, -5,
R_CUBIC_TO, -2.42f, 0, -4.44f, 1.72f, -4.9f, 4,
CLOSE,
R_MOVE_TO, 1.9f, 3,
R_V_LINE_TO, -2,
R_H_LINE_TO, 6,
R_V_LINE_TO, 6,
R_H_LINE_TO, -2,
R_V_LINE_TO, -2.59f,
R_LINE_TO, -5.07f, 5.07f,
R_LINE_TO, -1.41f, -1.41f,
R_LINE_TO, 5.07f, -5.07f,
CLOSE
......@@ -227,8 +227,7 @@ void AutoclickTray::UpdateIconsForSession() {
Shell::Get()->session_controller()->GetSessionState();
SkColor color = TrayIconColor(session_state);
// TODO(katie): Use autoclick asset when available.
tray_image_ = gfx::CreateVectorIcon(kSystemTraySelectToSpeakNewuiIcon, color);
tray_image_ = gfx::CreateVectorIcon(kAutoclickIcon, color);
}
void AutoclickTray::CheckStatusAndUpdateIcon() {
......
......@@ -4,6 +4,7 @@
#include "ash/system/accessibility/autoclick_tray_action_list_view.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/accessibility/autoclick_tray.h"
#include "ash/system/accessibility/autoclick_tray_action_view.h"
......@@ -36,6 +37,7 @@ AutoclickTrayActionListView::AutoclickTrayActionListView(
this, mojom::AutoclickEventType::kLeftClick,
l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_AUTOCLICK_OPTION_LEFT_CLICK),
kAutoclickLeftClickIcon,
selected_event_type_ == mojom::AutoclickEventType::kLeftClick);
left_click_view->set_id(kLeftClickViewID);
AddChildView(left_click_view);
......@@ -45,6 +47,7 @@ AutoclickTrayActionListView::AutoclickTrayActionListView(
this, mojom::AutoclickEventType::kRightClick,
l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_AUTOCLICK_OPTION_RIGHT_CLICK),
kAutoclickRightClickIcon,
selected_event_type_ == mojom::AutoclickEventType::kRightClick);
right_click_view->set_id(kRightClickViewID);
AddChildView(right_click_view);
......@@ -54,6 +57,7 @@ AutoclickTrayActionListView::AutoclickTrayActionListView(
this, mojom::AutoclickEventType::kDoubleClick,
l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_AUTOCLICK_OPTION_DOUBLE_CLICK),
kAutoclickDoubleClickIcon,
selected_event_type_ == mojom::AutoclickEventType::kDoubleClick);
double_click_view->set_id(kDoubleClickViewID);
AddChildView(double_click_view);
......@@ -63,6 +67,7 @@ AutoclickTrayActionListView::AutoclickTrayActionListView(
this, mojom::AutoclickEventType::kDragAndDrop,
l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_AUTOCLICK_OPTION_DRAG_AND_DROP),
kAutoclickDragIcon,
selected_event_type_ == mojom::AutoclickEventType::kDragAndDrop);
drag_and_drop_view->set_id(kDragAndDropViewID);
AddChildView(drag_and_drop_view);
......@@ -71,6 +76,7 @@ AutoclickTrayActionListView::AutoclickTrayActionListView(
views::View* pause_view = new AutoclickTrayActionView(
this, mojom::AutoclickEventType::kNoAction,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_AUTOCLICK_OPTION_NO_ACTION),
kAutoclickPauseIcon,
selected_event_type_ == mojom::AutoclickEventType::kNoAction);
pause_view->set_id(kPauseViewID);
AddChildView(pause_view);
......
......@@ -21,6 +21,7 @@ AutoclickTrayActionView::AutoclickTrayActionView(
AutoclickTrayActionListView* list_view,
mojom::AutoclickEventType event_type,
const base::string16& label,
const gfx::VectorIcon& vector_icon,
bool selected)
: ActionableView(TrayPopupInkDropStyle::FILL_BOUNDS),
list_view_(list_view),
......@@ -34,8 +35,7 @@ AutoclickTrayActionView::AutoclickTrayActionView(
views::ImageView* icon = new views::ImageView();
// TODO(katie): Use autoclick assets when available.
icon->SetImage(gfx::CreateVectorIcon(kSystemTraySelectToSpeakNewuiIcon,
gfx::kGoogleGrey700));
icon->SetImage(gfx::CreateVectorIcon(vector_icon, gfx::kGoogleGrey700));
tri_view->AddView(TriView::Container::START, icon);
auto* label_view = TrayPopupUtils::CreateDefaultLabel();
......
......@@ -8,6 +8,7 @@
#include "ash/public/interfaces/accessibility_controller_enums.mojom.h"
#include "ash/system/tray/actionable_view.h"
#include "base/macros.h"
#include "ui/gfx/vector_icon_types.h"
namespace ash {
class AutoclickTrayActionListView;
......@@ -18,6 +19,7 @@ class AutoclickTrayActionView : public ActionableView {
AutoclickTrayActionView(AutoclickTrayActionListView* list_view,
mojom::AutoclickEventType event_type,
const base::string16& label,
const gfx::VectorIcon& vector_icon,
bool selected);
~AutoclickTrayActionView() override = default;
......
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