Commit f0ed1c19 authored by Yulun Wu's avatar Yulun Wu Committed by Commit Bot

dark_mode: Update app list folder/overlay background.

All search results will be displayed using primary text coloring.

Bug: 1130822
Change-Id: Id55060e52e62d263da50ec8d507b742e812902c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2421441Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarYulun Wu <yulunwu@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Yulun Wu <yulunwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809521}
parent 9aa46ffe
......@@ -39,6 +39,12 @@ SkColor AppListColorProviderImpl::GetSearchBoxBackgroundColor() const {
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive);
}
SkColor AppListColorProviderImpl::GetSearchBoxCardBackgroundColor() const {
// Set solid color background to avoid broken text. See crbug.com/746563.
return ash_color_provider_->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kOpaque);
}
SkColor AppListColorProviderImpl::GetSearchBoxPlaceholderTextColor() const {
return ash_color_provider_->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorSecondary);
......@@ -49,6 +55,11 @@ SkColor AppListColorProviderImpl::GetSearchBoxTextColor() const {
AshColorProvider::ContentLayerType::kTextColorPrimary);
}
SkColor AppListColorProviderImpl::GetSearchBoxSecondaryTextColor() const {
return ash_color_provider_->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorSecondary);
}
SkColor AppListColorProviderImpl::GetSuggestionChipBackgroundColor() const {
return ash_color_provider_->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive);
......@@ -103,6 +114,27 @@ SkColor AppListColorProviderImpl::GetFolderHintTextColor() const {
AshColorProvider::ContentLayerType::kTextColorSecondary);
}
SkColor AppListColorProviderImpl::GetFolderNameBackgroundColor(
bool active) const {
if (!active)
return SK_ColorTRANSPARENT;
AshColorProvider::RippleAttributes ripple_attributes =
ash_color_provider_->GetRippleAttributes(GetAppListBackgroundColor());
return SkColorSetA(ripple_attributes.base_color,
ripple_attributes.inkdrop_opacity * 255);
}
SkColor AppListColorProviderImpl::GetContentsBackgroundColor() const {
return ash_color_provider_->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive);
}
SkColor AppListColorProviderImpl::GetSeparatorColor() const {
return ash_color_provider_->GetContentLayerColor(
AshColorProvider::ContentLayerType::kSeparatorColor);
}
float AppListColorProviderImpl::GetFolderBackgrounBlurSigma() const {
return static_cast<float>(AshColorProvider::LayerBlurSigma::kBlurDefault);
}
......
......@@ -21,6 +21,7 @@ class AppListColorProviderImpl : public AppListColorProvider {
SkColor GetExpandArrowIconBackgroundColor() const override;
SkColor GetAppListBackgroundColor() const override;
SkColor GetSearchBoxBackgroundColor() const override;
SkColor GetSearchBoxSecondaryTextColor() const override;
SkColor GetSearchBoxPlaceholderTextColor() const override;
SkColor GetSearchBoxTextColor() const override;
SkColor GetSuggestionChipBackgroundColor() const override;
......@@ -30,9 +31,13 @@ class AppListColorProviderImpl : public AppListColorProvider {
SkColor GetPageSwitcherInkDropBaseColor() const override;
SkColor GetPageSwitcherInkDropHighlightColor() const override;
SkColor GetSearchBoxIconColor() const override;
SkColor GetSearchBoxCardBackgroundColor() const override;
SkColor GetFolderBackgroundColor() const override;
SkColor GetFolderTitleTextColor() const override;
SkColor GetFolderHintTextColor() const override;
SkColor GetFolderNameBackgroundColor(bool active) const override;
SkColor GetContentsBackgroundColor() const override;
SkColor GetSeparatorColor() const override;
float GetFolderBackgrounBlurSigma() const override;
private:
......
......@@ -25,7 +25,11 @@ SkColor TestAppListColorProvider::GetAppListBackgroundColor() const {
}
SkColor TestAppListColorProvider::GetSearchBoxBackgroundColor() const {
return SK_ColorWHITE;
return gfx::kGoogleGrey900;
}
SkColor TestAppListColorProvider::GetSearchBoxCardBackgroundColor() const {
return gfx::kGoogleGrey900;
}
SkColor TestAppListColorProvider::GetSearchBoxPlaceholderTextColor() const {
......@@ -36,6 +40,10 @@ SkColor TestAppListColorProvider::GetSearchBoxTextColor() const {
return gfx::kGoogleGrey200;
}
SkColor TestAppListColorProvider::GetSearchBoxSecondaryTextColor() const {
return gfx::kGoogleGrey500;
}
SkColor TestAppListColorProvider::GetSuggestionChipBackgroundColor() const {
return SkColorSetA(SK_ColorWHITE, 0x1A);
}
......@@ -53,7 +61,7 @@ SkColor TestAppListColorProvider::GetFolderBackgroundColor() const {
}
SkColor TestAppListColorProvider::GetPageSwitcherButtonColor() const {
return gfx::kGoogleGrey900;
return gfx::kGoogleGrey700;
}
SkColor TestAppListColorProvider::GetPageSwitcherInkDropBaseColor() const {
......@@ -76,6 +84,22 @@ SkColor TestAppListColorProvider::GetFolderHintTextColor() const {
return gfx::kGoogleGrey500;
}
SkColor TestAppListColorProvider::GetFolderNameBackgroundColor(
bool active) const {
if (!active)
return SK_ColorTRANSPARENT;
return SkColorSetA(SK_ColorBLACK, 0x0F);
}
SkColor TestAppListColorProvider::GetContentsBackgroundColor() const {
return gfx::kGoogleGrey200;
}
SkColor TestAppListColorProvider::GetSeparatorColor() const {
return SkColorSetA(SK_ColorWHITE, 0x24);
}
float TestAppListColorProvider::GetFolderBackgrounBlurSigma() const {
return 30.0f;
}
......
......@@ -23,6 +23,7 @@ class TestAppListColorProvider : public AppListColorProvider {
SkColor GetSearchBoxBackgroundColor() const override;
SkColor GetSearchBoxPlaceholderTextColor() const override;
SkColor GetSearchBoxTextColor() const override;
SkColor GetSearchBoxSecondaryTextColor() const override;
SkColor GetSuggestionChipBackgroundColor() const override;
SkColor GetSuggestionChipTextColor() const override;
SkColor GetAppListItemTextColor() const override;
......@@ -30,9 +31,13 @@ class TestAppListColorProvider : public AppListColorProvider {
SkColor GetPageSwitcherInkDropBaseColor() const override;
SkColor GetPageSwitcherInkDropHighlightColor() const override;
SkColor GetSearchBoxIconColor() const override;
SkColor GetSearchBoxCardBackgroundColor() const override;
SkColor GetFolderBackgroundColor() const override;
SkColor GetFolderTitleTextColor() const override;
SkColor GetFolderHintTextColor() const override;
SkColor GetFolderNameBackgroundColor(bool active) const override;
SkColor GetContentsBackgroundColor() const override;
SkColor GetSeparatorColor() const override;
float GetFolderBackgrounBlurSigma() const override;
};
......
......@@ -64,7 +64,7 @@ class FolderHeaderView::FolderNameView : public views::Textfield,
gfx::Insets(0, horizontal_padding)));
SetBackgroundColor(
AppListConfig::instance().GetFolderNameBackgroundColor(is_active));
AppListColorProvider::Get()->GetFolderNameBackgroundColor(is_active));
}
void OnFocus() override {
......@@ -123,8 +123,9 @@ class FolderHeaderView::FolderNameView : public views::Textfield,
void OnMouseExited(const ui::MouseEvent& event) override {
if (!HasFocus()) {
SetBackgroundColor(AppListConfig::instance().GetFolderNameBackgroundColor(
/*is_active=*/false));
SetBackgroundColor(
AppListColorProvider::Get()->GetFolderNameBackgroundColor(
/*is_active=*/false));
}
has_mouse_already_entered_ = false;
......@@ -135,7 +136,7 @@ class FolderHeaderView::FolderNameView : public views::Textfield,
// If this is reached, the mouse is entering the view.
// Recreate border to have custom corner radius.
SetBackground(views::CreateRoundedRectBackground(
AppListConfig::instance().GetFolderNameBackgroundColor(
AppListColorProvider::Get()->GetFolderNameBackgroundColor(
/*is_active=*/true),
AppListConfig::instance().folder_name_border_radius()));
has_mouse_already_entered_ = true;
......@@ -143,8 +144,9 @@ class FolderHeaderView::FolderNameView : public views::Textfield,
has_mouse_already_entered_ && !HasFocus()) {
// If this is reached, the mouse is exiting the view on its horizontal
// edges.
SetBackgroundColor(AppListConfig::instance().GetFolderNameBackgroundColor(
/*is_active=*/false));
SetBackgroundColor(
AppListColorProvider::Get()->GetFolderNameBackgroundColor(
/*is_active=*/false));
has_mouse_already_entered_ = false;
}
}
......
......@@ -373,7 +373,7 @@ int SearchBoxView::GetSearchBoxBorderCornerRadiusForState(
SkColor SearchBoxView::GetBackgroundColorForState(AppListState state) const {
if (state == AppListState::kStateSearchResults)
return AppListConfig::instance().card_background_color();
return AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor();
return AppListColorProvider::Get()->GetSearchBoxBackgroundColor();
}
......@@ -385,14 +385,6 @@ void SearchBoxView::ShowZeroStateSuggestions() {
}
void SearchBoxView::OnWallpaperColorsChanged() {
const auto& colors = view_delegate_->GetWallpaperProminentColors();
if (colors.empty())
return;
DCHECK_EQ(static_cast<size_t>(ColorProfileType::NUM_OF_COLOR_PROFILES),
colors.size());
SetSearchBoxColor(colors[static_cast<int>(ColorProfileType::DARK_MUTED)]);
UpdateSearchIcon();
AppListColorProvider* app_list_color_provider = AppListColorProvider::Get();
search_box()->set_placeholder_text_color(
......
......@@ -17,6 +17,7 @@
#include "ash/app_list/views/search_result_list_view.h"
#include "ash/app_list/views/search_result_page_anchored_dialog.h"
#include "ash/app_list/views/search_result_tile_item_list_view.h"
#include "ash/public/cpp/app_list/app_list_color_provider.h"
#include "ash/public/cpp/app_list/app_list_config.h"
#include "ash/public/cpp/app_list/app_list_features.h"
#include "ash/public/cpp/view_shadow.h"
......@@ -184,7 +185,7 @@ SearchResultPageView::SearchResultPageView(SearchModel* search_model)
// background border corner radius. All child views' background should be
// set transparent so that the rounded corner is not overwritten.
SetBackground(std::make_unique<SearchResultPageBackground>(
AppListConfig::instance().card_background_color()));
AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor()));
auto scroller = std::make_unique<views::ScrollView>();
// Leaves a placeholder area for the search box and the separator below it.
scroller->SetBorder(views::CreateEmptyBorder(gfx::Insets(
......
......@@ -15,6 +15,7 @@
#include "ash/app_list/app_list_view_delegate.h"
#include "ash/app_list/model/search/search_result.h"
#include "ash/app_list/views/search_result_page_view.h"
#include "ash/public/cpp/app_list/app_list_color_provider.h"
#include "ash/public/cpp/app_list/app_list_config.h"
#include "ash/public/cpp/app_list/app_list_features.h"
#include "ash/public/cpp/app_list/app_list_notifier.h"
......@@ -48,8 +49,6 @@ constexpr int kSeparatorLeftRightPadding = 4;
constexpr int kSeparatorHeight = 46;
constexpr int kSeparatorTopPadding = 10;
constexpr SkColor kSeparatorColor = SkColorSetA(gfx::kGoogleGrey900, 0x24);
// The Delay before recording play store app results impression, i.e., if the
// play store results are displayed less than the duration, we assume user
// won't have chance to see them clearly and click on them, and wont' log
......@@ -95,7 +94,7 @@ SearchResultTileItemListView::SearchResultTileItemListView(
kSeparatorTopPadding, kSeparatorLeftRightPadding,
AppListConfig::instance().search_tile_height() - kSeparatorHeight,
kSeparatorLeftRightPadding));
separator->SetColor(kSeparatorColor);
separator->SetColor(AppListColorProvider::Get()->GetSeparatorColor());
separator_views_.push_back(separator);
layout_->SetFlexForView(separator, 0);
}
......@@ -105,7 +104,7 @@ SearchResultTileItemListView::SearchResultTileItemListView(
view_delegate, false /* show_in_apps_page */));
tile_item->set_index_in_container(i);
tile_item->SetParentBackgroundColor(
AppListConfig::instance().card_background_color());
AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor());
tile_views_.push_back(tile_item);
AddObservedResultView(tile_item);
}
......
......@@ -12,6 +12,7 @@
#include "ash/app_list/model/search/search_model.h"
#include "ash/app_list/model/search/search_result.h"
#include "ash/app_list/views/app_list_item_view.h"
#include "ash/public/cpp/app_list/app_list_color_provider.h"
#include "ash/public/cpp/app_list/app_list_config.h"
#include "ash/public/cpp/app_list/app_list_features.h"
#include "ash/public/cpp/app_list/app_list_types.h"
......@@ -66,11 +67,6 @@ constexpr int kSearchRatingCenteringOffset =
kSearchRatingStarSize)) /
2);
constexpr SkColor kSearchTitleColor = gfx::kGoogleGrey900;
constexpr SkColor kSearchAppRatingColor = gfx::kGoogleGrey700;
constexpr SkColor kSearchAppPriceColor = gfx::kGoogleGreen600;
constexpr SkColor kSearchRatingStarColor = gfx::kGoogleGrey700;
} // namespace
SearchResultTileItemView::SearchResultTileItemView(
......@@ -104,7 +100,7 @@ SearchResultTileItemView::SearchResultTileItemView(
title_ = new views::Label;
title_->SetAutoColorReadabilityEnabled(false);
title_->SetEnabledColor(AppListConfig::instance().grid_title_color());
title_->SetEnabledColor(AppListColorProvider::Get()->GetSearchBoxTextColor());
title_->SetLineHeight(kTileTextLineHeight);
title_->SetHorizontalAlignment(gfx::ALIGN_CENTER);
title_->SetHandlesTooltips(false);
......@@ -114,7 +110,8 @@ SearchResultTileItemView::SearchResultTileItemView(
if (is_play_store_app_search_enabled_ ||
is_app_reinstall_recommendation_enabled_) {
rating_ = new views::Label;
rating_->SetEnabledColor(kSearchAppRatingColor);
rating_->SetEnabledColor(
AppListColorProvider::Get()->GetSearchBoxSecondaryTextColor());
rating_->SetLineHeight(kTileTextLineHeight);
rating_->SetHorizontalAlignment(gfx::ALIGN_RIGHT);
rating_->SetVisible(false);
......@@ -124,12 +121,14 @@ SearchResultTileItemView::SearchResultTileItemView(
rating_star_->set_can_process_events_within_subtree(false);
rating_star_->SetVerticalAlignment(views::ImageView::Alignment::kLeading);
rating_star_->SetImage(gfx::CreateVectorIcon(
kBadgeRatingIcon, kSearchRatingStarSize, kSearchRatingStarColor));
kBadgeRatingIcon, kSearchRatingStarSize,
AppListColorProvider::Get()->GetSearchBoxSecondaryTextColor()));
rating_star_->SetVisible(false);
AddChildView(rating_star_);
price_ = new views::Label;
price_->SetEnabledColor(kSearchAppPriceColor);
price_->SetEnabledColor(
AppListColorProvider::Get()->GetSearchBoxSecondaryTextColor());
price_->SetLineHeight(kTileTextLineHeight);
price_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
price_->SetVisible(false);
......@@ -163,7 +162,7 @@ void SearchResultTileItemView::OnResultChanged() {
// Set solid color background to avoid broken text. See crbug.com/746563.
if (rating_) {
rating_->SetBackground(views::CreateSolidBackground(
AppListConfig::instance().card_background_color()));
AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor()));
if (!IsSuggestedAppTile()) {
// App search results use different fonts than AppList apps.
rating_->SetFontList(
......@@ -175,7 +174,7 @@ void SearchResultTileItemView::OnResultChanged() {
}
if (price_) {
price_->SetBackground(views::CreateSolidBackground(
AppListConfig::instance().card_background_color()));
AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor()));
if (!IsSuggestedAppTile()) {
// App search results use different fonts than AppList apps.
price_->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList(
......@@ -185,7 +184,7 @@ void SearchResultTileItemView::OnResultChanged() {
}
}
title_->SetBackground(views::CreateSolidBackground(
AppListConfig::instance().card_background_color()));
AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor()));
if (!IsSuggestedAppTile()) {
// App search results use different fonts than AppList apps.
title_->SetFontList(
......@@ -196,7 +195,8 @@ void SearchResultTileItemView::OnResultChanged() {
} else {
title_->SetFontList(font);
}
title_->SetEnabledColor(kSearchTitleColor);
title_->SetEnabledColor(
AppListColorProvider::Get()->GetSearchBoxTextColor());
}
title_->SetMaxLines(2);
......
......@@ -17,6 +17,7 @@
#include "ash/app_list/views/search_result_actions_view.h"
#include "ash/app_list/views/search_result_list_view.h"
#include "ash/app_list/views/search_result_page_view.h"
#include "ash/public/cpp/app_list/app_list_color_provider.h"
#include "ash/public/cpp/app_list/app_list_config.h"
#include "ash/public/cpp/app_list/app_list_switches.h"
#include "ash/public/cpp/app_list/app_list_types.h"
......@@ -44,10 +45,6 @@ constexpr int kActionButtonRightMargin = 8;
constexpr int kTitleLineHeight = 20;
constexpr int kDetailsLineHeight = 16;
// Matched text color.
constexpr SkColor kMatchedTextColor = gfx::kGoogleGrey900;
// Default text color.
constexpr SkColor kDefaultTextColor = gfx::kGoogleGrey700;
// URL color.
constexpr SkColor kUrlColor = gfx::kGoogleBlue600;
// Row selected color, Google Grey 8%.
......@@ -122,16 +119,14 @@ void SearchResultView::CreateTitleRenderText() {
// When result is an omnibox non-url search, the matched tag indicates
// proposed query. For all other cases, the matched tag indicates typed search
// query.
render_text->SetColor(result()->is_omnibox_search() ? kDefaultTextColor
: kMatchedTextColor);
render_text->SetColor(AppListColorProvider::Get()->GetSearchBoxTextColor());
const SearchResult::Tags& tags = result()->title_tags();
for (const auto& tag : tags) {
if (tag.styles & SearchResult::Tag::URL) {
render_text->ApplyColor(kUrlColor, tag.range);
} else if (tag.styles & SearchResult::Tag::MATCH) {
render_text->ApplyColor(
result()->is_omnibox_search() ? kMatchedTextColor : kDefaultTextColor,
tag.range);
AppListColorProvider::Get()->GetSearchBoxTextColor(), tag.range);
}
}
title_text_ = std::move(render_text);
......@@ -148,7 +143,7 @@ void SearchResultView::CreateDetailsRenderText() {
render_text->SetText(result()->details());
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
render_text->SetFontList(rb.GetFontList(ui::ResourceBundle::BaseFont));
render_text->SetColor(kDefaultTextColor);
render_text->SetColor(AppListColorProvider::Get()->GetSearchBoxTextColor());
const SearchResult::Tags& tags = result()->details_tags();
for (const auto& tag : tags) {
if (tag.styles & SearchResult::Tag::URL)
......@@ -270,8 +265,9 @@ void SearchResultView::PaintButtonContents(gfx::Canvas* canvas) {
// Set solid color background to avoid broken text. See crbug.com/746563.
// This should be drawn before selected color which is semi-transparent.
canvas->FillRect(text_bounds,
AppListConfig::instance().card_background_color());
canvas->FillRect(
text_bounds,
AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor());
// Possibly call FillRect a second time (these colours are partially
// transparent, so the previous FillRect is not redundant).
......
......@@ -22,6 +22,7 @@ class ASH_PUBLIC_EXPORT AppListColorProvider {
virtual SkColor GetSearchBoxBackgroundColor() const = 0;
virtual SkColor GetSearchBoxPlaceholderTextColor() const = 0;
virtual SkColor GetSearchBoxTextColor() const = 0;
virtual SkColor GetSearchBoxSecondaryTextColor() const = 0;
virtual SkColor GetSuggestionChipBackgroundColor() const = 0;
virtual SkColor GetSuggestionChipTextColor() const = 0;
virtual SkColor GetAppListItemTextColor() const = 0;
......@@ -29,9 +30,13 @@ class ASH_PUBLIC_EXPORT AppListColorProvider {
virtual SkColor GetPageSwitcherInkDropBaseColor() const = 0;
virtual SkColor GetPageSwitcherInkDropHighlightColor() const = 0;
virtual SkColor GetSearchBoxIconColor() const = 0;
virtual SkColor GetSearchBoxCardBackgroundColor() const = 0;
virtual SkColor GetFolderBackgroundColor() const = 0;
virtual SkColor GetFolderTitleTextColor() const = 0;
virtual SkColor GetFolderHintTextColor() const = 0;
virtual SkColor GetFolderNameBackgroundColor(bool active) const = 0;
virtual SkColor GetContentsBackgroundColor() const = 0;
virtual SkColor GetSeparatorColor() const = 0;
virtual float GetFolderBackgrounBlurSigma() const = 0;
protected:
......
......@@ -301,8 +301,6 @@ AppListConfig::AppListConfig(AppListConfigType type)
folder_name_border_thickness_(2),
folder_name_padding_(8),
folder_name_border_color_(gfx::kGoogleBlue600),
folder_name_background_color_(SK_ColorTRANSPARENT),
folder_name_background_color_active_(gfx::kGoogleGrey100),
folder_icon_dimension_(FolderClippedIconDimensionForType(type)),
folder_unclipped_icon_dimension_(
FolderUnclippedIconDimensionForType(type)),
......@@ -318,9 +316,7 @@ AppListConfig::AppListConfig(AppListConfigType type)
page_flip_zone_size_(20),
grid_tile_spacing_in_folder_(8),
blur_radius_(30),
contents_background_color_(SkColorSetRGB(0xF2, 0xF2, 0xF2)),
grid_selected_color_(gfx::kGoogleBlue300),
card_background_color_(SK_ColorWHITE),
page_transition_duration_(base::TimeDelta::FromMilliseconds(250)),
overscroll_page_transition_duration_(
base::TimeDelta::FromMilliseconds(50)),
......@@ -436,9 +432,6 @@ AppListConfig::AppListConfig(const AppListConfig& base_config,
folder_name_border_thickness_(base_config.folder_name_border_thickness_),
folder_name_padding_(base_config.folder_name_padding_),
folder_name_border_color_(base_config.folder_name_border_color_),
folder_name_background_color_(base_config.folder_name_background_color_),
folder_name_background_color_active_(
base_config.folder_name_background_color_active_),
folder_icon_dimension_(MinScale(base_config.folder_icon_dimension_,
scale_x,
inner_tile_scale_y)),
......@@ -472,9 +465,7 @@ AppListConfig::AppListConfig(const AppListConfig& base_config,
scale_x,
inner_tile_scale_y)),
blur_radius_(base_config.blur_radius_),
contents_background_color_(base_config.contents_background_color_),
grid_selected_color_(base_config.grid_selected_color_),
card_background_color_(base_config.card_background_color_),
page_transition_duration_(base_config.page_transition_duration_),
overscroll_page_transition_duration_(
base_config.overscroll_page_transition_duration_),
......@@ -553,9 +544,4 @@ SkColor AppListConfig::GetCardifiedBackgroundColor(bool is_active) const {
: cardified_background_color_;
}
SkColor AppListConfig::GetFolderNameBackgroundColor(bool is_active) const {
return is_active ? folder_name_background_color_active_
: folder_name_background_color_;
}
} // namespace ash
......@@ -150,11 +150,7 @@ class ASH_PUBLIC_EXPORT AppListConfig {
return grid_tile_spacing_in_folder_;
}
int blur_radius() const { return blur_radius_; }
SkColor contents_background_color() const {
return contents_background_color_;
}
SkColor grid_selected_color() const { return grid_selected_color_; }
SkColor card_background_color() const { return card_background_color_; }
base::TimeDelta page_transition_duration() const {
return page_transition_duration_;
}
......@@ -268,9 +264,6 @@ class ASH_PUBLIC_EXPORT AppListConfig {
// Returns the color and opacity for the page background.
SkColor GetCardifiedBackgroundColor(bool is_active) const;
// Returns the folder name background color.
SkColor GetFolderNameBackgroundColor(bool is_active) const;
private:
const AppListConfigType type_;
......@@ -411,10 +404,6 @@ class ASH_PUBLIC_EXPORT AppListConfig {
// The color of the folder name border.
const SkColor folder_name_border_color_;
// Background colors for folder name.
const SkColor folder_name_background_color_;
const SkColor folder_name_background_color_active_;
// The icon dimension of folder.
const int folder_icon_dimension_;
......@@ -455,16 +444,10 @@ class ASH_PUBLIC_EXPORT AppListConfig {
// The blur radius used in the app list.
const int blur_radius_;
// The background color of app list overlay.
const SkColor contents_background_color_;
// The keyboard select color for grid views, which are on top of a black
// shield view for new design (12% white).
const SkColor grid_selected_color_;
// The background color for views in search results page.
const SkColor card_background_color_;
// Duration for page transition.
const base::TimeDelta page_transition_duration_;
......
......@@ -29,7 +29,7 @@
#include "ui/views/window/non_client_view.h"
#if defined(OS_CHROMEOS)
#include "ash/public/cpp/app_list/app_list_config.h"
#include "ash/public/cpp/app_list/app_list_color_provider.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "ui/views/background.h"
#endif
......@@ -62,7 +62,8 @@ class AppListOverlayBackground : public views::Background {
cc::PaintFlags flags;
flags.setStyle(cc::PaintFlags::kFill_Style);
flags.setColor(ash::AppListConfig::instance().contents_background_color());
flags.setColor(
ash::AppListColorProvider::Get()->GetContentsBackgroundColor());
canvas->DrawRoundRect(view->GetContentsBounds(),
kAppListOverlayBorderRadius, flags);
}
......
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