Commit f2af2df5 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

cbui: update fullscreen icon color

This change swaps the fullscreen icon color from #989898 to the enabled
menu item foreground color, which also fixes the contrast on this icon.
This makes the icon look a bit "heavy" in the menu but it's alright.

Bug: 957391
Change-Id: Idcc47784643def21d0841e0c93fd52fe2b54a27d
Ux-approved-by: monicagv
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816129Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699326}
parent ee8035f2
...@@ -471,13 +471,12 @@ class AppMenu::ZoomView : public AppMenuView { ...@@ -471,13 +471,12 @@ class AppMenu::ZoomView : public AppMenuView {
// the keyboard navigation to work. // the keyboard navigation to work.
DCHECK(Button::AsButton(fullscreen_button_)); DCHECK(Button::AsButton(fullscreen_button_));
// TODO(https://crbug.com/957391): Do away with this bespoke color. Ideally
// this should be kColorId_EnabledMenuItemForegroundColor. The color here is
// ripped directly from the old PNG asset for this image.
fullscreen_button_->SetImage( fullscreen_button_->SetImage(
ImageButton::STATE_NORMAL, ImageButton::STATE_NORMAL,
gfx::CreateVectorIcon(kFullscreenIcon, gfx::CreateVectorIcon(
SkColorSetRGB(0x98, 0x98, 0x98))); kFullscreenIcon,
GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor)));
// Since |fullscreen_button_| will reside in a menu, make it ALWAYS // Since |fullscreen_button_| will reside in a menu, make it ALWAYS
// focusable regardless of the platform. // focusable regardless of the platform.
...@@ -548,18 +547,16 @@ class AppMenu::ZoomView : public AppMenuView { ...@@ -548,18 +547,16 @@ class AppMenu::ZoomView : public AppMenuView {
zoom_label_max_width_valid_ = false; zoom_label_max_width_valid_ = false;
ui::NativeTheme* theme = GetNativeTheme(); ui::NativeTheme* theme = GetNativeTheme();
if (theme) { zoom_label_->SetEnabledColor(theme->GetSystemColor(
zoom_label_->SetEnabledColor(theme->GetSystemColor( ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor));
ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor)); gfx::ImageSkia hovered_fullscreen_image = gfx::CreateVectorIcon(
gfx::ImageSkia hovered_fullscreen_image = gfx::CreateVectorIcon( kFullscreenIcon,
kFullscreenIcon, theme->GetSystemColor(
theme->GetSystemColor( ui::NativeTheme::kColorId_SelectedMenuItemForegroundColor));
ui::NativeTheme::kColorId_SelectedMenuItemForegroundColor)); fullscreen_button_->SetImage(ImageButton::STATE_HOVERED,
fullscreen_button_->SetImage(ImageButton::STATE_HOVERED, hovered_fullscreen_image);
hovered_fullscreen_image); fullscreen_button_->SetImage(ImageButton::STATE_PRESSED,
fullscreen_button_->SetImage(ImageButton::STATE_PRESSED, hovered_fullscreen_image);
hovered_fullscreen_image);
}
} }
// Overridden from ButtonListener. // Overridden from ButtonListener.
......
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