Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: ui/app_list/views/tile_item_view.cc

Issue 655823005: Specifies transparent background for the label in TileItemView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ifdef Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/tile_item_view.cc
diff --git a/ui/app_list/views/tile_item_view.cc b/ui/app_list/views/tile_item_view.cc
index 408bb229535a0b437eb97d217efc4397066188a1..5e8d43f4bc1d6e26e1bb819d40fca41136da8f2e 100644
--- a/ui/app_list/views/tile_item_view.cc
+++ b/ui/app_list/views/tile_item_view.cc
@@ -11,6 +11,7 @@
#include "ui/app_list/app_list_view_delegate.h"
#include "ui/app_list/search_result.h"
#include "ui/app_list/views/app_list_main_view.h"
+#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_analysis.h"
#include "ui/gfx/color_utils.h"
@@ -24,6 +25,14 @@ namespace {
const int kTileSize = 90;
const int kTileHorizontalPadding = 10;
+// In Windows, transparent background color will cause ugly text rendering,
+// therefore kContentsBackgroundColor should be used. See crbug.com/406989
+#if defined(OS_CHROMEOS)
+const SkColor kTitleBackgroundColor = SK_ColorTRANSPARENT;
+#else
+const SkColor kTitleBackgroundColor = app_list::kContentsBackgroundColor;
+#endif
+
} // namespace
namespace app_list {
@@ -45,7 +54,7 @@ TileItemView::TileItemView()
title_->SetAutoColorReadabilityEnabled(false);
title_->SetEnabledColor(kGridTitleColor);
title_->set_background(views::Background::CreateSolidBackground(
- app_list::kContentsBackgroundColor));
+ kTitleBackgroundColor));
title_->SetFontList(rb.GetFontList(kItemTextFontStyle));
title_->SetHorizontalAlignment(gfx::ALIGN_CENTER);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698