Commit 3b1c2723 authored by Timothy Loh's avatar Timothy Loh Committed by Commit Bot

Use a proper icon for Crostini package install notifications

This CL adds a vector icon for use in notifications for Linux packages.
Using a vector icon allows this to get blue/red colours automatically
to match the notification title color.

Bug: 822464
Change-Id: Ie21f437b8c65aefb8d5be4732e864f826445d361
Reviewed-on: https://chromium-review.googlesource.com/1143046Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Commit-Queue: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577100}
parent 3099beca
...@@ -118,6 +118,7 @@ MessageCenterController::MessageCenterController() { ...@@ -118,6 +118,7 @@ MessageCenterController::MessageCenterController() {
&kNotificationGoogleIcon, &kNotificationGoogleIcon,
&kNotificationImageIcon, &kNotificationImageIcon,
&kNotificationInstalledIcon, &kNotificationInstalledIcon,
&kNotificationLinuxIcon,
&kNotificationMultiDeviceSetupIcon, &kNotificationMultiDeviceSetupIcon,
&kNotificationMobileDataIcon, &kNotificationMobileDataIcon,
&kNotificationMobileDataOffIcon, &kNotificationMobileDataOffIcon,
......
...@@ -17,6 +17,7 @@ aggregate_vector_icons("ash_public_vector_icons") { ...@@ -17,6 +17,7 @@ aggregate_vector_icons("ash_public_vector_icons") {
"notification_google.icon", "notification_google.icon",
"notification_image.icon", "notification_image.icon",
"notification_installed.icon", "notification_installed.icon",
"notification_linux.icon",
"notification_mobile_data.icon", "notification_mobile_data.icon",
"notification_mobile_data_off.icon", "notification_mobile_data_off.icon",
"notification_multi_device_setup.icon", "notification_multi_device_setup.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, 16,
MOVE_TO, 4.91f, 13.94f,
R_CUBIC_TO, -1.71f, -0.71f, -2.81f, -2.15f, -2.85f, -4.66f,
R_CUBIC_TO, -0.17f, 0.09f, -0.37f, 0.11f, -0.6f, 0.02f,
R_CUBIC_TO, -0.65f, -0.24f, -0.5f, -1.06f, -0.27f, -1.78f,
R_CUBIC_TO, 0.2f, -0.6f, 0.87f, -1.04f, 1.2f, -1.13f,
CUBIC_TO, 3.17f, 3.37f, 4.97f, 1, 8, 1,
R_CUBIC_TO, 3.07f, 0, 4.88f, 2.27f, 5.63f, 5.39f,
R_CUBIC_TO, 0.34f, 0.11f, 0.98f, 0.54f, 1.17f, 1.12f,
R_CUBIC_TO, 0.24f, 0.72f, 0.38f, 1.54f, -0.27f, 1.78f,
R_CUBIC_TO, -0.23f, 0.08f, -0.42f, 0.07f, -0.6f, -0.02f,
R_CUBIC_TO, -0.03f, 2.53f, -1.13f, 3.96f, -2.85f, 4.67f,
R_CUBIC_TO, 0.03f, 0.06f, 0.04f, 0.12f, 0.04f, 0.19f,
R_CUBIC_TO, 0, 0.48f, 0.23f, 0.87f, -1.44f, 0.87f,
R_CUBIC_TO, -1.21f, 0, -1.42f, -0.26f, -1.45f, -0.55f,
R_CUBIC_TO, -0.08f, -0.05f, -0.16f, -0.13f, -0.24f, -0.13f,
R_CUBIC_TO, -0.08f, 0, -0.16f, 0.08f, -0.24f, 0.14f,
CUBIC_TO, 7.73f, 14.74f, 7.52f, 15, 6.31f, 15,
R_CUBIC_TO, -1.66f, 0, -1.44f, -0.39f, -1.44f, -0.87f,
R_CUBIC_TO, 0, -0.07f, 0.01f, -0.14f, 0.04f, -0.19f,
CLOSE,
MOVE_TO, 8, 12.86f,
R_CUBIC_TO, 3.2f, 0, 4.35f, -1.4f, 4.35f, -4.51f,
R_CUBIC_TO, 0, -2.57f, -1.05f, -4.94f, -2.79f, -5.33f,
CUBIC_TO, 9, 2.9f, 8.61f, 4.27f, 8, 4.27f,
R_CUBIC_TO, -0.61f, 0, -1.06f, -1.38f, -1.56f, -1.25f,
R_CUBIC_TO, -1.75f, 0.44f, -2.79f, 2.9f, -2.79f, 5.33f,
R_CUBIC_TO, 0, 2.93f, 1.15f, 4.51f, 4.35f, 4.51f,
CLOSE,
MOVE_TO, 5.83f, 6.83f,
R_CUBIC_TO, -0.4f, 0, -0.72f, -0.33f, -0.72f, -0.74f,
R_CUBIC_TO, 0, -0.41f, 0.32f, -0.74f, 0.72f, -0.74f,
R_CUBIC_TO, 0.4f, 0, 0.72f, 0.33f, 0.72f, 0.74f,
R_CUBIC_TO, 0, 0.41f, -0.32f, 0.74f, -0.72f, 0.74f,
CLOSE,
R_MOVE_TO, 4.34f, 0,
R_CUBIC_TO, -0.4f, 0, -0.72f, -0.33f, -0.72f, -0.74f,
R_CUBIC_TO, 0, -0.41f, 0.32f, -0.74f, 0.72f, -0.74f,
R_CUBIC_TO, 0.4f, 0, 0.72f, 0.33f, 0.72f, 0.74f,
R_CUBIC_TO, 0, 0.41f, -0.32f, 0.74f, -0.72f, 0.74f,
CLOSE,
R_MOVE_TO, -2.04f, 0.4f,
R_LINE_TO, 0.99f, 0.45f,
R_CUBIC_TO, 0.17f, 0.08f, 0.25f, 0.28f, 0.17f, 0.46f,
R_ARC_TO, 0.35f, 0.35f, 0, 0, 1, -0.06f, 0.09f,
LINE_TO, 8.25f, 9.32f,
R_CUBIC_TO, -0.13f, 0.14f, -0.34f, 0.15f, -0.48f, 0.02f,
R_ARC_TO, 0.34f, 0.34f, 0, 0, 1, -0.02f, -0.02f,
LINE_TO, 6.76f, 8.23f,
R_CUBIC_TO, -0.13f, -0.14f, -0.12f, -0.36f, 0.02f, -0.49f,
R_ARC_TO, 0.34f, 0.34f, 0, 0, 1, 0.09f, -0.06f,
R_LINE_TO, 0.98f, -0.45f,
R_ARC_TO, 0.34f, 0.34f, 0, 0, 1, 0.28f, 0,
CLOSE
...@@ -4,12 +4,11 @@ ...@@ -4,12 +4,11 @@
#include "chrome/browser/chromeos/crostini/crostini_package_installer_notification.h" #include "chrome/browser/chromeos/crostini/crostini_package_installer_notification.h"
#include "ash/public/cpp/vector_icons/vector_icons.h"
#include "chrome/browser/chromeos/crostini/crostini_package_installer_service.h" #include "chrome/browser/chromeos/crostini/crostini_package_installer_service.h"
#include "chrome/browser/notifications/notification_display_service.h" #include "chrome/browser/notifications/notification_display_service.h"
#include "chrome/grit/chrome_unscaled_resources.h"
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/message_center/public/cpp/message_center_constants.h" #include "ui/message_center/public/cpp/message_center_constants.h"
#include "ui/message_center/public/cpp/notification.h" #include "ui/message_center/public/cpp/notification.h"
#include "ui/message_center/public/cpp/notification_delegate.h" #include "ui/message_center/public/cpp/notification_delegate.h"
...@@ -31,10 +30,7 @@ CrostiniPackageInstallerNotification::CrostiniPackageInstallerNotification( ...@@ -31,10 +30,7 @@ CrostiniPackageInstallerNotification::CrostiniPackageInstallerNotification(
profile_(profile), profile_(profile),
weak_ptr_factory_(this) { weak_ptr_factory_(this) {
message_center::RichNotificationData rich_notification_data; message_center::RichNotificationData rich_notification_data;
// TODO(timloh): This is probably not the right icon... rich_notification_data.vector_small_image = &ash::kNotificationLinuxIcon;
rich_notification_data.small_image =
ui::ResourceBundle::GetSharedInstance().GetImageNamed(
IDR_LOGO_CROSTINI_DEFAULT);
rich_notification_data.never_timeout = true; rich_notification_data.never_timeout = true;
rich_notification_data.accent_color = rich_notification_data.accent_color =
message_center::kSystemNotificationColorNormal; message_center::kSystemNotificationColorNormal;
......
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