Commit 93e725af authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

Update system tray panel icons with newer designs

Add rather than replace icons since the shelf UI is still protected
by a flag and we want to keep supporting both cases for a few more
weeks.

Bug: 880598
Change-Id: If11bbad338b4113f3e9724a729451e159c4b5964
Reviewed-on: https://chromium-review.googlesource.com/1214695
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589995}
parent 7f585541
......@@ -15,7 +15,9 @@ aggregate_vector_icons("ash_vector_icons") {
"check_circle.icon",
"dictation_menu.icon",
"dictation_off.icon",
"dictation_off_newui.icon",
"dictation_on.icon",
"dictation_on_newui.icon",
"ime_menu_emoticon.icon",
"ime_menu_microphone.icon",
"ime_menu_on_screen_keyboard.icon",
......@@ -86,6 +88,7 @@ aggregate_vector_icons("ash_vector_icons") {
"palette_mode_metalayer.icon",
"palette_tray_icon_capture_region.icon",
"palette_tray_icon_default.icon",
"palette_tray_icon_default_newui.icon",
"palette_tray_icon_laser_pointer.icon",
"palette_tray_icon_magnify.icon",
"palette_tray_icon_metalayer.icon",
......@@ -97,6 +100,7 @@ aggregate_vector_icons("ash_vector_icons") {
"shelf_cancel_button.icon",
"shelf_globe.icon",
"shelf_keyboard.icon",
"shelf_keyboard_newui.icon",
"shelf_logout.icon",
"shelf_notifications.icon",
"shelf_overflow.icon",
......@@ -182,9 +186,12 @@ aggregate_vector_icons("ash_vector_icons") {
"system_tray_rotation_lock_auto.icon",
"system_tray_rotation_lock_locked.icon",
"system_tray_select_to_speak.icon",
"system_tray_select_to_speak_newui.icon",
"system_tray_select_to_speak_active.icon",
"system_tray_select_to_speak_active_newui.icon",
"system_tray_screen_share.icon",
"system_tray_stop.icon",
"system_tray_stop_newui.icon",
"system_tray_tracing.icon",
"system_tray_update.icon",
"system_tray_volume_mute.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,
MOVE_TO, 10, 12,
R_CUBIC_TO, 1.5f, 0, 2.5f, -1.12f, 2.5f, -2.5f,
R_V_LINE_TO, -5,
CUBIC_TO, 12.5f, 3.12f, 11.5f, 2, 10, 2,
CUBIC_TO_SHORTHAND, 7.5f, 3.12f, 7.5f, 4.5f,
R_V_LINE_TO, 5,
R_CUBIC_TO, 0, 1.38f, 1, 2.5f, 2.5f, 2.5f,
CLOSE,
MOVE_TO, 9, 4.5f,
R_CUBIC_TO, 0, -0.35f, 0.44f, -1, 0.97f, -1,
R_CUBIC_TO, 0.53f, 0, 1.03f, 0.65f, 1.03f, 1,
R_V_LINE_TO, 5,
R_CUBIC_TO, 0, 0.35f, -0.5f, 1, -1.03f, 1,
R_CUBIC_TO, -0.53f, 0, -0.97f, -0.65f, -0.97f, -1,
R_V_LINE_TO, -5,
CLOSE,
MOVE_TO, 14.29f, 10,
R_CUBIC_TO, 0, 2.21f, -1.92f, 4, -4.29f, 4,
R_CUBIC_TO, -2.37f, 0, -4.29f, -1.79f, -4.29f, -4,
H_LINE_TO, 4,
R_CUBIC_TO, 0, 2.82f, 2.24f, 5.14f, 5.14f, 5.54f,
V_LINE_TO, 18,
R_H_LINE_TO, 1.71f,
R_V_LINE_TO, -2.46f,
CUBIC_TO, 13.76f, 15.14f, 16, 12.82f, 16, 10,
R_H_LINE_TO, -1.71f,
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,
MOVE_TO, 10, 12,
R_CUBIC_TO, 1.5f, 0, 2.5f, -1.12f, 2.5f, -2.5f,
R_V_LINE_TO, -5,
CUBIC_TO, 12.5f, 3.12f, 11.5f, 2, 10, 2,
CUBIC_TO_SHORTHAND, 7.5f, 3.12f, 7.5f, 4.5f,
R_V_LINE_TO, 5,
R_CUBIC_TO, 0, 1.38f, 1, 2.5f, 2.5f, 2.5f,
CLOSE,
R_MOVE_TO, 4.29f, -2,
R_CUBIC_TO, 0, 2.21f, -1.92f, 4, -4.29f, 4,
R_CUBIC_TO, -2.37f, 0, -4.29f, -1.79f, -4.29f, -4,
H_LINE_TO, 4,
R_CUBIC_TO, 0, 2.82f, 2.24f, 5.14f, 5.14f, 5.54f,
V_LINE_TO, 18,
R_H_LINE_TO, 1.71f,
R_V_LINE_TO, -2.46f,
CUBIC_TO, 13.76f, 15.14f, 16, 12.82f, 16, 10,
R_H_LINE_TO, -1.71f,
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,
MOVE_TO, 2, 14.67f,
V_LINE_TO, 18,
R_H_LINE_TO, 3.32f,
R_LINE_TO, 6.7f, -6.69f,
LINE_TO, 8.69f, 7.97f,
LINE_TO, 2, 14.67f,
CLOSE,
MOVE_TO, 15.66f, 2.27f,
R_LINE_TO, 2.08f, 2.07f,
R_ARC_TO, 0.9f, 0.9f, 0, 0, 1, 0.01f, 1.26f,
R_LINE_TO, -4.77f, 4.76f,
R_LINE_TO, -3.34f, -3.34f,
R_LINE_TO, 2.25f, -2.25f,
R_LINE_TO, -0.65f, -0.65f,
R_LINE_TO, -5.03f, 5.03f,
LINE_TO, 4.96f, 7.91f,
R_LINE_TO, 5.66f, -5.65f,
R_ARC_TO, 0.9f, 0.9f, 0, 0, 1, 1.26f, 0.01f,
R_LINE_TO, 1.26f, 1.25f,
R_LINE_TO, 1.26f, -1.25f,
R_ARC_TO, 0.88f, 0.88f, 0, 0, 1, 1.25f, 0,
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,
MOVE_TO, 18, 5,
R_V_LINE_TO, 10,
H_LINE_TO, 2,
V_LINE_TO, 5,
R_H_LINE_TO, 16,
CLOSE,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LOSE,
R_MOVE_TO, 0, -3,
R_H_LINE_TO, 2,
R_V_LINE_TO, 2,
R_H_LINE_TO, -2,
V_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,
CIRCLE, 10, 10, 8,
MOVE_TO, 12, 13,
R_LINE_TO, -3, -2.94f,
LINE_TO, 10.06f, 9,
LINE_TO, 13, 12,
R_V_LINE_TO, -2,
R_H_LINE_TO, 1,
R_V_LINE_TO, 4,
R_H_LINE_TO, -4,
R_V_LINE_TO, -1,
R_H_LINE_TO, 2,
CLOSE,
R_MOVE_TO, 1, -5,
V_LINE_TO, 7,
H_LINE_TO, 7,
R_V_LINE_TO, 6,
R_H_LINE_TO, 1,
R_V_LINE_TO, 1,
H_LINE_TO, 6,
V_LINE_TO, 6,
R_H_LINE_TO, 8,
R_V_LINE_TO, 2,
R_H_LINE_TO, -1,
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,
MOVE_TO, 14, 14,
R_H_LINE_TO, -1,
R_V_LINE_TO, 1,
R_H_LINE_TO, 2,
R_V_LINE_TO, -2,
R_H_LINE_TO, -1,
R_V_LINE_TO, 1,
CLOSE,
MOVE_TO, 6, 6,
R_H_LINE_TO, 1,
V_LINE_TO, 5,
H_LINE_TO, 5,
R_V_LINE_TO, 2,
R_H_LINE_TO, 1,
V_LINE_TO, 6,
CLOSE,
R_MOVE_TO, 4, 12,
R_ARC_TO, 8, 8, 0, 1, 1, 0, -16,
R_ARC_TO, 8, 8, 0, 0, 1, 0, 16,
CLOSE,
MOVE_TO, 6, 8.63f,
R_V_LINE_TO, 2.74f,
R_H_LINE_TO, 1.78f,
LINE_TO, 10, 13.65f,
V_LINE_TO, 6.35f,
R_LINE_TO, -2.22f, 2.28f,
H_LINE_TO, 6,
CLOSE,
MOVE_TO, 12, 10,
R_CUBIC_TO, 0, -0.81f, -0.45f, -1.5f, -1.11f, -1.84f,
R_V_LINE_TO, 3.67f,
ARC_TO, 2.05f, 2.05f, 0, 0, 0, 12, 10,
CLOSE,
R_MOVE_TO, -1.11f, -4,
R_V_LINE_TO, 0.94f,
R_CUBIC_TO, 1.28f, 0.39f, 2.22f, 1.61f, 2.22f, 3.06f,
R_CUBIC_TO, 0, 1.45f, -0.94f, 2.67f, -2.22f, 3.06f,
V_LINE_TO, 14,
CUBIC_TO, 12.67f, 13.59f, 14, 11.95f, 14, 10,
R_CUBIC_TO, 0, -1.95f, -1.33f, -3.58f, -3.11f, -4,
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,
MOVE_TO, 10, 18,
R_ARC_TO, 8, 8, 0, 1, 1, 0, -16,
R_ARC_TO, 8, 8, 0, 0, 1, 0, 16,
CLOSE,
MOVE_TO, 7, 7,
R_V_LINE_TO, 6,
R_H_LINE_TO, 6,
V_LINE_TO, 7,
H_LINE_TO, 7,
CLOSE
......@@ -12,6 +12,7 @@
#include "ash/strings/grit/ash_strings.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_container.h"
#include "chromeos/chromeos_switches.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/border.h"
......@@ -25,8 +26,13 @@ DictationButtonTray::DictationButtonTray(Shelf* shelf)
SetInkDropMode(InkDropMode::ON);
off_image_ = gfx::CreateVectorIcon(kDictationOffIcon, kShelfIconColor);
on_image_ = gfx::CreateVectorIcon(kDictationOnIcon, kShelfIconColor);
if (chromeos::switches::ShouldUseShelfNewUi()) {
off_image_ = gfx::CreateVectorIcon(kDictationOffNewuiIcon, kShelfIconColor);
on_image_ = gfx::CreateVectorIcon(kDictationOnNewuiIcon, kShelfIconColor);
} else {
off_image_ = gfx::CreateVectorIcon(kDictationOffIcon, kShelfIconColor);
on_image_ = gfx::CreateVectorIcon(kDictationOnIcon, kShelfIconColor);
}
icon_->SetImage(off_image_);
const int vertical_padding = (kTrayItemSize - off_image_.height()) / 2;
const int horizontal_padding = (kTrayItemSize - off_image_.width()) / 2;
......
......@@ -82,10 +82,19 @@ void SelectToSpeakTray::UpdateIconsForSession() {
Shell::Get()->session_controller()->GetSessionState();
SkColor color = TrayIconColor(session_state);
inactive_image_ = gfx::CreateVectorIcon(kSystemTraySelectToSpeakIcon, color);
selecting_image_ =
gfx::CreateVectorIcon(kSystemTraySelectToSpeakActiveIcon, color);
speaking_image_ = gfx::CreateVectorIcon(kSystemTrayStopIcon, color);
if (chromeos::switches::ShouldUseShelfNewUi()) {
inactive_image_ =
gfx::CreateVectorIcon(kSystemTraySelectToSpeakNewuiIcon, color);
selecting_image_ =
gfx::CreateVectorIcon(kSystemTraySelectToSpeakActiveNewuiIcon, color);
speaking_image_ = gfx::CreateVectorIcon(kSystemTrayStopNewuiIcon, color);
} else {
inactive_image_ =
gfx::CreateVectorIcon(kSystemTraySelectToSpeakIcon, color);
selecting_image_ =
gfx::CreateVectorIcon(kSystemTraySelectToSpeakActiveIcon, color);
speaking_image_ = gfx::CreateVectorIcon(kSystemTrayStopIcon, color);
}
}
void SelectToSpeakTray::CheckStatusAndUpdateIcon() {
......
......@@ -10,6 +10,7 @@
#include "ash/system/palette/palette_tool.h"
#include "base/bind.h"
#include "base/metrics/histogram_macros.h"
#include "chromeos/chromeos_switches.h"
namespace ash {
......@@ -81,7 +82,9 @@ const gfx::VectorIcon& PaletteToolManager::GetActiveTrayIcon(
PaletteToolId tool_id) const {
PaletteTool* tool = FindToolById(tool_id);
if (!tool)
return kPaletteTrayIconDefaultIcon;
return chromeos::switches::ShouldUseShelfNewUi()
? kPaletteTrayIconDefaultNewuiIcon
: kPaletteTrayIconDefaultIcon;
return tool->GetActiveTrayIcon();
}
......
......@@ -16,6 +16,7 @@
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_container.h"
#include "ash/system/tray/tray_utils.h"
#include "chromeos/chromeos_switches.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
......@@ -124,8 +125,11 @@ void VirtualKeyboardTray::UnobserveKeyboardController() {
}
void VirtualKeyboardTray::UpdateIcon() {
const gfx::VectorIcon& icon = chromeos::switches::ShouldUseShelfNewUi()
? kShelfKeyboardNewuiIcon
: kShelfKeyboardIcon;
gfx::ImageSkia image = gfx::CreateVectorIcon(
kShelfKeyboardIcon,
icon,
TrayIconColor(Shell::Get()->session_controller()->GetSessionState()));
icon_->SetImage(image);
const int vertical_padding = (kTrayItemSize - image.height()) / 2;
......
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