OLD | NEW |
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/date/tray_date.h" | 5 #include "ash/system/date/tray_date.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/date/date_view.h" | 8 #include "ash/system/date/date_view.h" |
9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
10 #include "ash/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
| 11 #include "ash/system/tray/tray_views.h" |
11 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
12 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
13 #include "base/time.h" | 14 #include "base/time.h" |
14 #include "base/timer.h" | 15 #include "base/timer.h" |
15 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
16 #include "grit/ui_resources.h" | 17 #include "grit/ui_resources.h" |
17 #include "third_party/skia/include/core/SkBitmap.h" | 18 #include "third_party/skia/include/core/SkBitmap.h" |
18 #include "third_party/skia/include/core/SkRect.h" | 19 #include "third_party/skia/include/core/SkRect.h" |
19 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
20 #include "ui/gfx/image/image.h" | 21 #include "ui/gfx/image/image.h" |
(...skipping 14 matching lines...) Expand all Loading... |
35 namespace internal { | 36 namespace internal { |
36 | 37 |
37 TrayDate::TrayDate() { | 38 TrayDate::TrayDate() { |
38 } | 39 } |
39 | 40 |
40 TrayDate::~TrayDate() { | 41 TrayDate::~TrayDate() { |
41 } | 42 } |
42 | 43 |
43 views::View* TrayDate::CreateTrayView(user::LoginStatus status) { | 44 views::View* TrayDate::CreateTrayView(user::LoginStatus status) { |
44 date_tray_.reset(new tray::DateView(tray::DateView::TIME)); | 45 date_tray_.reset(new tray::DateView(tray::DateView::TIME)); |
45 date_tray_->label()->SetFont( | 46 SetupLabelForTray(date_tray_->label()); |
46 date_tray_->label()->font().DeriveFont(2, gfx::Font::BOLD)); | |
47 date_tray_->label()->SetAutoColorReadabilityEnabled(false); | |
48 date_tray_->label()->SetEnabledColor(SK_ColorWHITE); | |
49 | |
50 return date_tray_.get(); | 47 return date_tray_.get(); |
51 } | 48 } |
52 | 49 |
53 views::View* TrayDate::CreateDefaultView(user::LoginStatus status) { | 50 views::View* TrayDate::CreateDefaultView(user::LoginStatus status) { |
54 return NULL; | 51 return NULL; |
55 } | 52 } |
56 | 53 |
57 views::View* TrayDate::CreateDetailedView(user::LoginStatus status) { | 54 views::View* TrayDate::CreateDetailedView(user::LoginStatus status) { |
58 return NULL; | 55 return NULL; |
59 } | 56 } |
(...skipping 11 matching lines...) Expand all Loading... |
71 void TrayDate::OnDateFormatChanged() { | 68 void TrayDate::OnDateFormatChanged() { |
72 date_tray_->UpdateTimeFormat(); | 69 date_tray_->UpdateTimeFormat(); |
73 } | 70 } |
74 | 71 |
75 void TrayDate::Refresh() { | 72 void TrayDate::Refresh() { |
76 date_tray_->UpdateText(); | 73 date_tray_->UpdateText(); |
77 } | 74 } |
78 | 75 |
79 } // namespace internal | 76 } // namespace internal |
80 } // namespace ash | 77 } // namespace ash |
OLD | NEW |