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/tray/tray_views.h" | 5 #include "ash/system/tray/tray_views.h" |
6 | 6 |
7 #include "ash/system/tray/tray_constants.h" | 7 #include "ash/system/tray/tray_constants.h" |
8 #include "third_party/skia/include/core/SkBitmap.h" | 8 #include "third_party/skia/include/core/SkBitmap.h" |
9 #include "ui/views/controls/label.h" | 9 #include "ui/views/controls/label.h" |
10 #include "ui/views/layout/box_layout.h" | 10 #include "ui/views/layout/box_layout.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 set_background(views::Background::CreateSolidBackground( | 78 set_background(views::Background::CreateSolidBackground( |
79 ash::kHoverBackgroundColor)); | 79 ash::kHoverBackgroundColor)); |
80 SchedulePaint(); | 80 SchedulePaint(); |
81 } | 81 } |
82 | 82 |
83 void HoverHighlightView::OnMouseExited(const views::MouseEvent& event) { | 83 void HoverHighlightView::OnMouseExited(const views::MouseEvent& event) { |
84 set_background(NULL); | 84 set_background(NULL); |
85 SchedulePaint(); | 85 SchedulePaint(); |
86 } | 86 } |
87 | 87 |
| 88 void SetupLabelForTray(views::Label* label) { |
| 89 label->SetFont( |
| 90 label->font().DeriveFont(2, gfx::Font::BOLD)); |
| 91 label->SetAutoColorReadabilityEnabled(false); |
| 92 label->SetEnabledColor(SK_ColorWHITE); |
| 93 label->SetBackgroundColor(SkColorSetARGB(0, 255, 255, 255)); |
| 94 } |
| 95 |
88 } // namespace internal | 96 } // namespace internal |
89 } // namespace ash | 97 } // namespace ash |
OLD | NEW |