Commit 95ea4ce8 authored by minch's avatar minch Committed by Commit Bot

dark_mode: Add kProminentIconButton.

See https://docs.google.com/document/d/1DFKZsXCU4GySB9Ry8Bhd8k8sB7pO5wOz0GBcFmAq5B4/edit#heading=h.ekjb61oacmwf
for the colors of kProminentIconButton.

Bug: 982950
Change-Id: I921c053c2fcd5c6a30dcf26acc995ce060a90e67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1775499Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Commit-Queue: Min Chen <minch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692164}
parent b8ddbf2a
...@@ -232,6 +232,10 @@ SkColor AshColorProvider::GetContentLayerColorImpl( ...@@ -232,6 +232,10 @@ SkColor AshColorProvider::GetContentLayerColorImpl(
light_color = gfx::kGoogleRed600; light_color = gfx::kGoogleRed600;
dark_color = gfx::kGoogleRed300; dark_color = gfx::kGoogleRed300;
break; break;
case ContentLayerType::kProminentIconButton:
light_color = gfx::kGoogleBlue600;
dark_color = gfx::kGoogleBlue300;
break;
} }
return color_mode == AshColorMode::kLight ? light_color : dark_color; return color_mode == AshColorMode::kLight ? light_color : dark_color;
} }
......
...@@ -70,6 +70,9 @@ class ASH_EXPORT AshColorProvider { ...@@ -70,6 +70,9 @@ class ASH_EXPORT AshColorProvider {
kIconPrimary, kIconPrimary,
kIconSecondary, kIconSecondary,
kIconRed, kIconRed,
// Color for prominent icon button, e.g, "Add connection" icon button inside
// VPN detailed view.
kProminentIconButton,
}; };
// Attributes of ripple, includes the base color, opacity of inkdrop and // Attributes of ripple, includes the base color, opacity of inkdrop and
......
...@@ -26,6 +26,8 @@ constexpr SkColor kUnifiedMenuButtonColor = ...@@ -26,6 +26,8 @@ constexpr SkColor kUnifiedMenuButtonColor =
SkColorSetA(gfx::kGoogleGrey200, 0x14); SkColorSetA(gfx::kGoogleGrey200, 0x14);
constexpr SkColor kUnifiedMenuButtonColorActive = gfx::kGoogleBlueDark600; constexpr SkColor kUnifiedMenuButtonColorActive = gfx::kGoogleBlueDark600;
constexpr SkColor kProminentIconButtonColor = gfx::kGoogleGreen700;
//----------------------------------End---------------------------------------- //----------------------------------End----------------------------------------
#endif // ASH_STYLE_DEFAULT_COLOR_CONSTANTS_H_ #endif // ASH_STYLE_DEFAULT_COLOR_CONSTANTS_H_
...@@ -268,9 +268,12 @@ void ImeListView::AppendImeListAndProperties( ...@@ -268,9 +268,12 @@ void ImeListView::AppendImeListAndProperties(
DCHECK(ime_map_.empty()); DCHECK(ime_map_.empty());
for (size_t i = 0; i < list.size(); i++) { for (size_t i = 0; i < list.size(); i++) {
const bool selected = current_ime_id == list[i].id; const bool selected = current_ime_id == list[i].id;
views::View* ime_view = views::View* ime_view = new ImeListItemView(
new ImeListItemView(this, list[i].short_name, list[i].name, selected, this, list[i].short_name, list[i].name, selected,
gfx::kGoogleGreen700, use_unified_theme_); AshColorProvider::Get()->DeprecatedGetContentLayerColor(
AshColorProvider::ContentLayerType::kProminentIconButton,
kProminentIconButtonColor),
use_unified_theme_);
scroll_content()->AddChildView(ime_view); scroll_content()->AddChildView(ime_view);
ime_map_[ime_view] = list[i].id; ime_map_[ime_view] = list[i].id;
......
...@@ -76,7 +76,10 @@ class LocaleItem : public ActionableView { ...@@ -76,7 +76,10 @@ class LocaleItem : public ActionableView {
if (checked_) { if (checked_) {
views::ImageView* checked_image = TrayPopupUtils::CreateMainImageView(); views::ImageView* checked_image = TrayPopupUtils::CreateMainImageView();
checked_image->SetImage(gfx::CreateVectorIcon( checked_image->SetImage(gfx::CreateVectorIcon(
kCheckCircleIcon, kMenuIconSize, gfx::kGoogleGreen700)); kCheckCircleIcon, kMenuIconSize,
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
AshColorProvider::ContentLayerType::kProminentIconButton,
kProminentIconButtonColor)));
tri_view->AddView(TriView::Container::END, checked_image); tri_view->AddView(TriView::Container::END, checked_image);
} }
SetAccessibleName(display_name_view->GetText()); SetAccessibleName(display_name_view->GetText());
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "ash/session/session_controller_impl.h" #include "ash/session/session_controller_impl.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h" #include "ash/strings/grit/ash_strings.h"
#include "ash/style/ash_color_provider.h"
#include "ash/system/model/system_tray_model.h" #include "ash/system/model/system_tray_model.h"
#include "ash/system/network/network_icon.h" #include "ash/system/network/network_icon.h"
#include "ash/system/network/network_icon_animation.h" #include "ash/system/network/network_icon_animation.h"
...@@ -22,7 +23,6 @@ ...@@ -22,7 +23,6 @@
#include "ash/system/network/vpn_list.h" #include "ash/system/network/vpn_list.h"
#include "ash/system/tray/hover_highlight_view.h" #include "ash/system/tray/hover_highlight_view.h"
#include "ash/system/tray/system_menu_button.h" #include "ash/system/tray/system_menu_button.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_popup_utils.h" #include "ash/system/tray/tray_popup_utils.h"
#include "ash/system/tray/tri_view.h" #include "ash/system/tray/tri_view.h"
#include "ash/system/tray/view_click_listener.h" #include "ash/system/tray/view_click_listener.h"
...@@ -122,9 +122,10 @@ class VPNListProviderEntry : public views::ButtonListener, public views::View { ...@@ -122,9 +122,10 @@ class VPNListProviderEntry : public views::ButtonListener, public views::View {
label->SetText(base::ASCIIToUTF16(name)); label->SetText(base::ASCIIToUTF16(name));
tri_view->AddView(TriView::Container::CENTER, label); tri_view->AddView(TriView::Container::CENTER, label);
const SkColor image_color = GetNativeTheme()->GetSystemColor( const SkColor image_color = AshColorProvider::Get()->GetContentLayerColor(
ui::NativeTheme::kColorId_ProminentButtonColor); AshColorProvider::ContentLayerType::kProminentIconButton,
gfx::ImageSkia icon = AshColorProvider::AshColorMode::kDark);
const gfx::ImageSkia icon =
gfx::CreateVectorIcon(kSystemMenuAddConnectionIcon, image_color); gfx::CreateVectorIcon(kSystemMenuAddConnectionIcon, image_color);
SystemMenuButton* add_vpn_button = SystemMenuButton* add_vpn_button =
new SystemMenuButton(this, icon, icon, button_accessible_name_id); new SystemMenuButton(this, icon, icon, button_accessible_name_id);
......
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