Chromium Code Reviews| Index: ash/system/tray/tray_views.cc |
| diff --git a/ash/system/tray/tray_views.cc b/ash/system/tray/tray_views.cc |
| index 8a4495576e602a76988a51a548cc9762005308be..af0c91c8924e87b9c0ff0935430e401add37b142 100644 |
| --- a/ash/system/tray/tray_views.cc |
| +++ b/ash/system/tray/tray_views.cc |
| @@ -698,8 +698,10 @@ void SpecialPopupRow::Layout() { |
| } |
| void SetupLabelForTray(views::Label* label) { |
| - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| - label->SetFont(rb.GetFont(ui::ResourceBundle::BoldFont)); |
| + // Making |label_font| static to avoid the time penalty of |DeriveFont| for |
| + // all but the first call. |
|
jennyz
2013/01/29 00:04:49
Don't need to add |xxx| since they are not member
sschmitz
2013/01/29 00:34:56
Done.
|
| + const static gfx::Font label_font(gfx::Font().DeriveFont(1, gfx::Font::BOLD)); |
|
jennyz
2013/01/29 00:04:49
"static const" instead of "const static".
sschmitz
2013/01/29 00:34:56
Done.
|
| + label->SetFont(label_font); |
| label->SetAutoColorReadabilityEnabled(false); |
| label->SetEnabledColor(SK_ColorWHITE); |
| label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); |