Commit 093e8f03 authored by mohsen's avatar mohsen Committed by Commit bot

Vectorize help icon in Ash system menu for MD

Also, updated PaletteTray to use the new icon.

BUG=646533
TEST=manually run Ash with --ash-md=experimental and check the icon

Review-Url: https://codereview.chromium.org/2327943002
Cr-Commit-Position: refs/heads/master@{#419559}
parent 1ac8d9b1
......@@ -18,6 +18,7 @@
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "base/metrics/histogram_macros.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
......@@ -96,10 +97,11 @@ class TitleView : public views::View, public views::ButtonListener {
AddChildView(text_label);
box_layout->SetFlexForView(text_label, 1);
gfx::ImageSkia settings_icon = CreateVectorIcon(
gfx::VectorIconId::SETTINGS, kIconSize, gfx::kChromeIconGrey);
gfx::ImageSkia help_icon = CreateVectorIcon(
gfx::VectorIconId::HELP, kIconSize, gfx::kChromeIconGrey);
gfx::ImageSkia settings_icon = CreateVectorIcon(gfx::VectorIconId::SETTINGS,
kIconSize, kMenuIconColor);
gfx::ImageSkia help_icon =
CreateVectorIcon(kSystemMenuHelpIcon, kMenuIconColor);
DCHECK_EQ(kIconSize, help_icon.width());
help_button_ = new ash::TrayPopupHeaderButton(this, help_icon,
IDS_ASH_STATUS_TRAY_HELP);
......
......@@ -4,6 +4,7 @@
#include "ash/common/system/date/date_default_view.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/metrics/user_metrics_action.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/system/date/date_view.h"
......@@ -12,10 +13,12 @@
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_popup_header_button.h"
#include "ash/common/wm_shell.h"
#include "ash/resources/vector_icons/vector_icons.h"
#include "base/i18n/rtl.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/layout/fill_layout.h"
......@@ -63,10 +66,17 @@ DateDefaultView::DateDefaultView(LoginStatus login)
date_view_->SetAction(TrayDate::SHOW_DATE_SETTINGS);
help_button_ = new TrayPopupHeaderButton(
this, IDR_AURA_UBER_TRAY_HELP, IDR_AURA_UBER_TRAY_HELP,
IDR_AURA_UBER_TRAY_HELP_HOVER, IDR_AURA_UBER_TRAY_HELP_HOVER,
IDS_ASH_STATUS_TRAY_HELP);
if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
gfx::ImageSkia help_icon =
gfx::CreateVectorIcon(kSystemMenuHelpIcon, kMenuIconColor);
help_button_ =
new TrayPopupHeaderButton(this, help_icon, IDS_ASH_STATUS_TRAY_HELP);
} else {
help_button_ = new TrayPopupHeaderButton(
this, IDR_AURA_UBER_TRAY_HELP, IDR_AURA_UBER_TRAY_HELP,
IDR_AURA_UBER_TRAY_HELP_HOVER, IDR_AURA_UBER_TRAY_HELP_HOVER,
IDS_ASH_STATUS_TRAY_HELP);
}
if (base::i18n::IsRTL() &&
base::i18n::GetConfiguredLocale() == kHebrewLocale) {
// The asset for the help button is a question mark '?'. Normally this asset
......
......@@ -7,6 +7,7 @@
#include "ash/common/material_design/material_design_controller.h"
#include "base/logging.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/color_palette.h"
namespace ash {
......@@ -87,7 +88,7 @@ const int kMessageCenterBubblePadding = 4;
const int kTrayIconSize = 16;
const SkColor kTrayIconColor = SK_ColorWHITE;
const int kMenuIconSize = 20;
const SkColor kMenuIconColor = SkColorSetRGB(0x5A, 0x5A, 0x5A);
const SkColor kMenuIconColor = gfx::kChromeIconGrey;
const int kHitRegionPadding = 4;
const SkColor kSeparatorColor = SkColorSetA(SK_ColorWHITE, 0x4D);
......
......@@ -48,6 +48,8 @@ action("aggregate_vector_icons") {
"system_menu_cast.icon",
"system_menu_child_user.1x.icon",
"system_menu_child_user.icon",
"system_menu_help.1x.icon",
"system_menu_help.icon",
"system_menu_keyboard.1x.icon",
"system_menu_keyboard.icon",
"system_menu_rotation_lock_auto.1x.icon",
......
// Copyright 2016 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, 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.8f, 13.6f,
H_LINE_TO, 9.2f,
V_LINE_TO, 14,
R_H_LINE_TO, 1.6f,
R_V_LINE_TO, 1.6f,
CLOSE,
R_MOVE_TO, 1.66f, -6.2f,
R_LINE_TO, -0.72f, 0.74f,
R_CUBIC_TO, -0.58f, 0.58f, -0.94f, 1.06f, -0.94f, 2.26f,
H_LINE_TO, 9.2f,
V_LINE_TO, 12,
R_CUBIC_TO, 0, -0.88f, 0.36f, -1.68f, 0.94f, -2.26f,
R_LINE_TO, 0.99f, -1.01f,
R_CUBIC_TO, 0.3f, -0.29f, 0.47f, -0.69f, 0.47f, -1.13f,
R_CUBIC_TO, 0, -0.88f, -0.72f, -1.6f, -1.6f, -1.6f,
R_CUBIC_TO, -0.88f, 0, -1.6f, 0.72f, -1.6f, 1.6f,
H_LINE_TO, 6.8f,
R_CUBIC_TO, 0, -1.77f, 1.43f, -3.2f, 3.2f, -3.2f,
R_CUBIC_TO, 1.77f, 0, 3.2f, 1.43f, 3.2f, 3.2f,
R_CUBIC_TO, 0, 0.7f, -0.29f, 1.34f, -0.74f, 1.8f,
CLOSE,
END
// Copyright 2016 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, 40,
MOVE_TO, 20, 4,
CUBIC_TO, 11.17f, 4, 4, 11.17f, 4, 20,
R_CUBIC_TO, 0, 8.83f, 7.17f, 16, 16, 16,
R_CUBIC_TO, 8.83f, 0, 16, -7.17f, 16, -16,
CUBIC_TO_SHORTHAND, 28.83f, 4, 20, 4,
CLOSE,
R_MOVE_TO, 1.6f, 27.2f,
R_H_LINE_TO, -3.2f,
V_LINE_TO, 28,
R_H_LINE_TO, 3.2f,
R_V_LINE_TO, 3.2f,
CLOSE,
R_MOVE_TO, 3.31f, -12.4f,
R_LINE_TO, -1.44f, 1.47f,
CUBIC_TO, 22.32f, 21.44f, 21.6f, 22.4f, 21.6f, 24.8f,
R_H_LINE_TO, -3.2f,
V_LINE_TO, 24,
R_CUBIC_TO, 0, -1.76f, 0.72f, -3.36f, 1.87f, -4.53f,
R_LINE_TO, 1.98f, -2.02f,
R_CUBIC_TO, 0.59f, -0.58f, 0.94f, -1.38f, 0.94f, -2.26f,
R_CUBIC_TO, 0, -1.76f, -1.44f, -3.2f, -3.2f, -3.2f,
R_CUBIC_TO, -1.76f, 0, -3.2f, 1.44f, -3.2f, 3.2f,
R_H_LINE_TO, -3.2f,
R_CUBIC_TO, 0, -3.54f, 2.86f, -6.4f, 6.4f, -6.4f,
R_CUBIC_TO, 3.54f, 0, 6.4f, 2.86f, 6.4f, 6.4f,
R_CUBIC_TO, 0, 1.41f, -0.58f, 2.69f, -1.49f, 3.6f,
CLOSE,
END
......@@ -55,7 +55,6 @@ action("aggregate_vector_icons") {
"folder_supervised.icon",
"fullscreen.icon",
"globe.icon",
"help.icon",
"help_outline.icon",
"image.icon",
"incognito.1x.icon",
......
// Copyright 2016 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.
MOVE_TO, 24, 4,
CUBIC_TO, 12.95f, 4, 4, 12.95f, 4, 24,
CUBIC_TO, 4, 35.05f, 12.95f, 44, 24, 44,
CUBIC_TO, 35.05f, 44, 44, 35.05f, 44, 24,
CUBIC_TO, 44, 12.95f, 35.05f, 4, 24, 4,
LINE_TO, 24, 4,
CLOSE,
R_MOVE_TO, 2, 34,
R_H_LINE_TO, -4,
R_V_LINE_TO, -4,
R_H_LINE_TO, 4,
R_V_LINE_TO, 4,
CLOSE,
R_MOVE_TO, 4.13f, -15.49f,
R_LINE_TO, -1.79f, 1.84f,
CUBIC_TO, 26.9f, 25.79f, 26, 27, 26, 30,
R_H_LINE_TO, -4,
R_V_LINE_TO, -1,
R_CUBIC_TO, 0, -2.21f, 0.9f, -4.21f, 2.34f, -5.66f,
R_LINE_TO, 2.49f, -2.52f,
CUBIC_TO, 27.55f, 20.1f, 28, 19.1f, 28, 18,
R_CUBIC_TO, 0, -2.21f, -1.79f, -4, -4, -4,
R_CUBIC_TO, -2.21f, 0, -4, 1.79f, -4, 4,
R_H_LINE_TO, -4,
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, 1.76f, -0.71f, 3.35f, -1.87f, 4.51f,
CLOSE,
END
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