Commit 33913b40 authored by Yulun Wu's avatar Yulun Wu Committed by Commit Bot

Update search box icon color.

Bug: 1110766
Change-Id: I832431d2c500080143bb2b470553764d7262097e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2417653
Commit-Queue: Yulun Wu <yulunwu@chromium.org>
Reviewed-by: default avatarYulun Wu <yulunwu@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808604}
parent a522a877
...@@ -83,4 +83,9 @@ SkColor AppListColorProviderImpl::GetPageSwitcherInkDropHighlightColor() const { ...@@ -83,4 +83,9 @@ SkColor AppListColorProviderImpl::GetPageSwitcherInkDropHighlightColor() const {
ripple_attributes.highlight_opacity * 255); ripple_attributes.highlight_opacity * 255);
} }
SkColor AppListColorProviderImpl::GetSearchBoxIconColor() const {
return ash_color_provider_->GetContentLayerColor(
AshColorProvider::ContentLayerType::kButtonIconColor);
}
} // namespace ash } // namespace ash
...@@ -29,6 +29,7 @@ class AppListColorProviderImpl : public AppListColorProvider { ...@@ -29,6 +29,7 @@ class AppListColorProviderImpl : public AppListColorProvider {
SkColor GetPageSwitcherButtonColor() const override; SkColor GetPageSwitcherButtonColor() const override;
SkColor GetPageSwitcherInkDropBaseColor() const override; SkColor GetPageSwitcherInkDropBaseColor() const override;
SkColor GetPageSwitcherInkDropHighlightColor() const override; SkColor GetPageSwitcherInkDropHighlightColor() const override;
SkColor GetSearchBoxIconColor() const override;
private: private:
// Unowned. // Unowned.
......
...@@ -60,4 +60,8 @@ SkColor TestAppListColorProvider::GetPageSwitcherInkDropHighlightColor() const { ...@@ -60,4 +60,8 @@ SkColor TestAppListColorProvider::GetPageSwitcherInkDropHighlightColor() const {
return SkColorSetA(SK_ColorBLACK, 0x0F); return SkColorSetA(SK_ColorBLACK, 0x0F);
} }
SkColor TestAppListColorProvider::GetSearchBoxIconColor() const {
return gfx::kGoogleGrey200;
}
} // namespace ash } // namespace ash
...@@ -29,6 +29,7 @@ class TestAppListColorProvider : public AppListColorProvider { ...@@ -29,6 +29,7 @@ class TestAppListColorProvider : public AppListColorProvider {
SkColor GetPageSwitcherButtonColor() const override; SkColor GetPageSwitcherButtonColor() const override;
SkColor GetPageSwitcherInkDropBaseColor() const override; SkColor GetPageSwitcherInkDropBaseColor() const override;
SkColor GetPageSwitcherInkDropHighlightColor() const override; SkColor GetPageSwitcherInkDropHighlightColor() const override;
SkColor GetSearchBoxIconColor() const override;
}; };
} // namespace ash } // namespace ash
......
...@@ -196,8 +196,9 @@ void SearchBoxView::UpdateSearchIcon() { ...@@ -196,8 +196,9 @@ void SearchBoxView::UpdateSearchIcon() {
const gfx::VectorIcon& icon = search_model_->search_engine_is_google() const gfx::VectorIcon& icon = search_model_->search_engine_is_google()
? google_icon ? google_icon
: kSearchEngineNotGoogleIcon; : kSearchEngineNotGoogleIcon;
SetSearchIconImage( SetSearchIconImage(gfx::CreateVectorIcon(
gfx::CreateVectorIcon(icon, search_box::kIconSize, search_box_color())); icon, search_box::kIconSize,
AppListColorProvider::Get()->GetSearchBoxIconColor()));
} }
void SearchBoxView::UpdateSearchBoxBorder() { void SearchBoxView::UpdateSearchBoxBorder() {
...@@ -231,10 +232,10 @@ int SearchBoxView::GetFocusRingSpacing() { ...@@ -231,10 +232,10 @@ int SearchBoxView::GetFocusRingSpacing() {
void SearchBoxView::SetupCloseButton() { void SearchBoxView::SetupCloseButton() {
views::ImageButton* close = close_button(); views::ImageButton* close = close_button();
close->SetImage( close->SetImage(views::ImageButton::STATE_NORMAL,
views::ImageButton::STATE_NORMAL, gfx::CreateVectorIcon(
gfx::CreateVectorIcon(views::kIcCloseIcon, search_box::kIconSize, views::kIcCloseIcon, search_box::kIconSize,
gfx::kGoogleGrey700)); AppListColorProvider::Get()->GetSearchBoxIconColor()));
close->SetVisible(false); close->SetVisible(false);
base::string16 close_button_label( base::string16 close_button_label(
l10n_util::GetStringUTF16(IDS_APP_LIST_CLEAR_SEARCHBOX)); l10n_util::GetStringUTF16(IDS_APP_LIST_CLEAR_SEARCHBOX));
...@@ -799,8 +800,9 @@ void SearchBoxView::SetupAssistantButton() { ...@@ -799,8 +800,9 @@ void SearchBoxView::SetupAssistantButton() {
views::ImageButton* assistant = assistant_button(); views::ImageButton* assistant = assistant_button();
assistant->SetImage( assistant->SetImage(
views::ImageButton::STATE_NORMAL, views::ImageButton::STATE_NORMAL,
gfx::CreateVectorIcon(kAssistantIcon, search_box::kIconSize, gfx::CreateVectorIcon(
gfx::kGoogleGrey700)); kAssistantIcon, search_box::kIconSize,
AppListColorProvider::Get()->GetSearchBoxIconColor()));
base::string16 assistant_button_label( base::string16 assistant_button_label(
l10n_util::GetStringUTF16(IDS_APP_LIST_START_ASSISTANT)); l10n_util::GetStringUTF16(IDS_APP_LIST_START_ASSISTANT));
assistant->SetAccessibleName(assistant_button_label); assistant->SetAccessibleName(assistant_button_label);
......
...@@ -28,6 +28,7 @@ class ASH_PUBLIC_EXPORT AppListColorProvider { ...@@ -28,6 +28,7 @@ class ASH_PUBLIC_EXPORT AppListColorProvider {
virtual SkColor GetPageSwitcherButtonColor() const = 0; virtual SkColor GetPageSwitcherButtonColor() const = 0;
virtual SkColor GetPageSwitcherInkDropBaseColor() const = 0; virtual SkColor GetPageSwitcherInkDropBaseColor() const = 0;
virtual SkColor GetPageSwitcherInkDropHighlightColor() const = 0; virtual SkColor GetPageSwitcherInkDropHighlightColor() const = 0;
virtual SkColor GetSearchBoxIconColor() const = 0;
protected: protected:
AppListColorProvider(); AppListColorProvider();
......
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
#include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkColor.h"
#include "ui/chromeos/search_box/search_box_export.h" #include "ui/chromeos/search_box/search_box_export.h"
#include "ui/gfx/color_palette.h"
namespace search_box { namespace search_box {
// Default color used when wallpaper customized color is not available for // Default color used when wallpaper customized color is not available for
// searchbox, #000 at 87% opacity. // searchbox, #000 at 87% opacity.
SEARCH_BOX_EXPORT constexpr SkColor kDefaultSearchboxColor = SEARCH_BOX_EXPORT constexpr SkColor kDefaultSearchboxColor =
SkColorSetARGB(0xDE, 0x00, 0x00, 0x00); gfx::kGoogleGrey200;
// The horizontal padding of the box layout of the search box. // The horizontal padding of the box layout of the search box.
SEARCH_BOX_EXPORT constexpr int kPadding = 12; SEARCH_BOX_EXPORT constexpr int kPadding = 12;
......
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