| 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/date_view.h" | 5 #include "ash/system/date/date_view.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
| 9 #include "ash/system/tray/tray_constants.h" | 9 #include "ash/system/tray/tray_constants.h" |
| 10 #include "ash/system/tray/tray_utils.h" | 10 #include "ash/system/tray/tray_utils.h" |
| 11 #include "base/i18n/rtl.h" | 11 #include "base/i18n/rtl.h" |
| 12 #include "base/i18n/time_formatting.h" | 12 #include "base/i18n/time_formatting.h" |
| 13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "grit/ash_strings.h" | 15 #include "grit/ash_strings.h" |
| 16 #include "third_party/icu/source/i18n/unicode/datefmt.h" | 16 #include "third_party/icu/source/i18n/unicode/datefmt.h" |
| 17 #include "third_party/icu/source/i18n/unicode/dtptngen.h" | 17 #include "third_party/icu/source/i18n/unicode/dtptngen.h" |
| 18 #include "third_party/icu/source/i18n/unicode/smpdtfmt.h" | 18 #include "third_party/icu/source/i18n/unicode/smpdtfmt.h" |
| 19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
| 20 #include "ui/views/border.h" | 20 #include "ui/views/border.h" |
| 21 #include "ui/views/controls/label.h" | 21 #include "ui/views/controls/label.h" |
| 22 #include "ui/views/layout/box_layout.h" | 22 #include "ui/views/layout/box_layout.h" |
| 23 #include "ui/views/layout/grid_layout.h" | 23 #include "ui/views/layout/grid_layout.h" |
| 24 #include "ui/views/widget/widget.h" | 24 #include "ui/views/widget/widget.h" |
| 25 | 25 |
| 26 namespace ash { | 26 namespace ash { |
| 27 namespace internal { | |
| 28 namespace tray { | 27 namespace tray { |
| 29 | |
| 30 namespace { | 28 namespace { |
| 31 | 29 |
| 32 // Amount of slop to add into the timer to make sure we're into the next minute | 30 // Amount of slop to add into the timer to make sure we're into the next minute |
| 33 // when the timer goes off. | 31 // when the timer goes off. |
| 34 const int kTimerSlopSeconds = 1; | 32 const int kTimerSlopSeconds = 1; |
| 35 | 33 |
| 36 // Text color of the vertical clock minutes. | 34 // Text color of the vertical clock minutes. |
| 37 const SkColor kVerticalClockMinuteColor = SkColorSetRGB(0xBA, 0xBA, 0xBA); | 35 const SkColor kVerticalClockMinuteColor = SkColorSetRGB(0xBA, 0xBA, 0xBA); |
| 38 | 36 |
| 39 // Padding between the left edge of the shelf and the left edge of the vertical | 37 // Padding between the left edge of the shelf and the left edge of the vertical |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 } | 305 } |
| 308 | 306 |
| 309 void TimeView::SetupLabel(views::Label* label) { | 307 void TimeView::SetupLabel(views::Label* label) { |
| 310 label->set_owned_by_client(); | 308 label->set_owned_by_client(); |
| 311 SetupLabelForTray(label); | 309 SetupLabelForTray(label); |
| 312 label->SetFontList(label->font_list().DeriveWithStyle( | 310 label->SetFontList(label->font_list().DeriveWithStyle( |
| 313 label->font_list().GetFontStyle() & ~gfx::Font::BOLD)); | 311 label->font_list().GetFontStyle() & ~gfx::Font::BOLD)); |
| 314 } | 312 } |
| 315 | 313 |
| 316 } // namespace tray | 314 } // namespace tray |
| 317 } // namespace internal | |
| 318 } // namespace ash | 315 } // namespace ash |
| OLD | NEW |