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

Unified Diff: ash/system/tray/tray_utils.cc

Issue 343513002: Refactor views::Label and gfx::RenderText shadow functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove forbidden static FontList. Created 6 years, 6 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 | ash/touch/touch_hud_debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/tray/tray_utils.cc
diff --git a/ash/system/tray/tray_utils.cc b/ash/system/tray/tray_utils.cc
index 215311753eae84a9ef6ef8bc9afe9a1e4f188fa6..00a68fb1a16825c09a7e094920d7426f9efa7f89 100644
--- a/ash/system/tray/tray_utils.cc
+++ b/ash/system/tray/tray_utils.cc
@@ -13,17 +13,12 @@
namespace ash {
void SetupLabelForTray(views::Label* label) {
- // Making label_font static to avoid the time penalty of Derive for all but
- // the first call.
- static const gfx::FontList label_font_list(
- gfx::FontList().Derive(1, gfx::Font::BOLD));
- label->SetFontList(label_font_list);
+ label->SetFontList(gfx::FontList().Derive(1, gfx::Font::BOLD));
label->SetAutoColorReadabilityEnabled(false);
label->SetEnabledColor(SK_ColorWHITE);
label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255));
- label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0),
- SkColorSetARGB(64, 0, 0, 0));
- label->SetShadowOffset(0, 1);
+ label->set_shadows(gfx::ShadowValues(1,
+ gfx::ShadowValue(gfx::Point(0, 1), 0, SkColorSetARGB(64, 0, 0, 0))));
}
void SetTrayImageItemBorder(views::View* tray_view,
« no previous file with comments | « no previous file | ash/touch/touch_hud_debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698