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

Side by Side Diff: ash/system/tray/tray_utils.cc

Issue 140693017: Clean-up: Replaces obsolete Font/FontList methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/hover_highlight_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/tray/tray_utils.h" 5 #include "ash/system/tray/tray_utils.h"
6 6
7 #include "ash/system/tray/tray_constants.h" 7 #include "ash/system/tray/tray_constants.h"
8 #include "ash/system/tray/tray_item_view.h" 8 #include "ash/system/tray/tray_item_view.h"
9 #include "ui/gfx/font_list.h" 9 #include "ui/gfx/font_list.h"
10 #include "ui/views/border.h" 10 #include "ui/views/border.h"
11 #include "ui/views/controls/label.h" 11 #include "ui/views/controls/label.h"
12 12
13 namespace ash { 13 namespace ash {
14 namespace internal { 14 namespace internal {
15 15
16 void SetupLabelForTray(views::Label* label) { 16 void SetupLabelForTray(views::Label* label) {
17 // Making label_font static to avoid the time penalty of DeriveFont for 17 // Making label_font static to avoid the time penalty of Derive for all but
18 // all but the first call. 18 // the first call.
19 static const gfx::FontList label_font_list( 19 static const gfx::FontList label_font_list(
20 gfx::FontList().DeriveFontListWithSizeDeltaAndStyle(1, gfx::Font::BOLD)); 20 gfx::FontList().Derive(1, gfx::Font::BOLD));
21 label->SetFontList(label_font_list); 21 label->SetFontList(label_font_list);
22 label->SetAutoColorReadabilityEnabled(false); 22 label->SetAutoColorReadabilityEnabled(false);
23 label->SetEnabledColor(SK_ColorWHITE); 23 label->SetEnabledColor(SK_ColorWHITE);
24 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); 24 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255));
25 label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0), 25 label->SetShadowColors(SkColorSetARGB(64, 0, 0, 0),
26 SkColorSetARGB(64, 0, 0, 0)); 26 SkColorSetARGB(64, 0, 0, 0));
27 label->SetShadowOffset(0, 1); 27 label->SetShadowOffset(0, 1);
28 } 28 }
29 29
30 void SetTrayImageItemBorder(views::View* tray_view, 30 void SetTrayImageItemBorder(views::View* tray_view,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 tray_view->SetBorder(views::Border::CreateEmptyBorder( 62 tray_view->SetBorder(views::Border::CreateEmptyBorder(
63 kTrayLabelItemVerticalPaddingVerticalAlignment, 63 kTrayLabelItemVerticalPaddingVerticalAlignment,
64 horizontal_padding, 64 horizontal_padding,
65 kTrayLabelItemVerticalPaddingVerticalAlignment, 65 kTrayLabelItemVerticalPaddingVerticalAlignment,
66 horizontal_padding)); 66 horizontal_padding));
67 } 67 }
68 } 68 }
69 69
70 } // namespace internal 70 } // namespace internal
71 } // namespace ash 71 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/hover_highlight_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698