Commit 26120224 authored by Yulun Wu's avatar Yulun Wu Committed by Chromium LUCI CQ

Update background opacity to 80% transparency.

Screenshot of change has been uploaded to the bug.

Bug: 1156245
Change-Id: I80ed29bb9486c75b1ce6bd4217401cb4f25758d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2594448Reviewed-by: default avatarYulun Wu <yulunwu@chromium.org>
Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Yulun Wu <yulunwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#838254}
parent 0de6ec1b
......@@ -69,9 +69,9 @@ SkColor AppListColorProviderImpl::GetSearchBoxBackgroundColor() const {
}
SkColor AppListColorProviderImpl::GetSearchBoxCardBackgroundColor() const {
// Set solid color background to avoid broken text. See crbug.com/746563.
return DeprecatedGetBaseLayerColor(AshColorProvider::BaseLayerType::kOpaque,
/*default_color*/ SK_ColorWHITE);
return DeprecatedGetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent80,
/*default_color*/ SK_ColorWHITE);
}
SkColor AppListColorProviderImpl::GetSearchBoxTextColor(
......
......@@ -155,10 +155,7 @@ void SearchResultTileItemView::OnResultChanged() {
title_->SetFontList(font);
title_->SetEnabledColor(AppListConfig::instance().grid_title_color());
} else {
// Set solid color background to avoid broken text. See crbug.com/746563.
if (rating_) {
rating_->SetBackground(views::CreateSolidBackground(
AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor()));
if (!IsSuggestedAppTile()) {
// App search results use different fonts than AppList apps.
rating_->SetFontList(
......@@ -169,8 +166,6 @@ void SearchResultTileItemView::OnResultChanged() {
}
}
if (price_) {
price_->SetBackground(views::CreateSolidBackground(
AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor()));
if (!IsSuggestedAppTile()) {
// App search results use different fonts than AppList apps.
price_->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList(
......@@ -179,8 +174,6 @@ void SearchResultTileItemView::OnResultChanged() {
price_->SetFontList(font);
}
}
title_->SetBackground(views::CreateSolidBackground(
AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor()));
if (!IsSuggestedAppTile()) {
// App search results use different fonts than AppList apps.
title_->SetFontList(
......
......@@ -265,12 +265,6 @@ void SearchResultView::PaintButtonContents(gfx::Canvas* canvas) {
text_bounds.set_x(
GetMirroredXWithWidthInView(text_bounds.x(), text_bounds.width()));
// 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,
AppListColorProvider::Get()->GetSearchBoxCardBackgroundColor());
if (title_text_ && details_text_) {
gfx::Size title_size(text_bounds.width(), kTitleLineHeight);
gfx::Size details_size(text_bounds.width(), kDetailsLineHeight);
......
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