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 #ifndef ASH_APP_LIST_DROP_SHADOW_LABEL_H_ | 5 #ifndef UI_APP_LIST_DROP_SHADOW_LABEL_H_ |
6 #define ASH_APP_LIST_DROP_SHADOW_LABEL_H_ | 6 #define UI_APP_LIST_DROP_SHADOW_LABEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ui/gfx/shadow_value.h" | 11 #include "ui/gfx/shadow_value.h" |
12 #include "ui/views/controls/label.h" | 12 #include "ui/views/controls/label.h" |
13 | 13 |
14 namespace ash { | 14 namespace app_list { |
15 | 15 |
16 ///////////////////////////////////////////////////////////////////////////// | 16 ///////////////////////////////////////////////////////////////////////////// |
17 // | 17 // |
18 // DropShadowLabel class | 18 // DropShadowLabel class |
19 // | 19 // |
20 // A drop shadow label is a view subclass that can display a string | 20 // A drop shadow label is a view subclass that can display a string |
21 // with a drop shadow. | 21 // with a drop shadow. |
22 // | 22 // |
23 ///////////////////////////////////////////////////////////////////////////// | 23 ///////////////////////////////////////////////////////////////////////////// |
24 class DropShadowLabel : public views::Label { | 24 class DropShadowLabel : public views::Label { |
25 public: | 25 public: |
26 DropShadowLabel(); | 26 DropShadowLabel(); |
27 virtual ~DropShadowLabel(); | 27 virtual ~DropShadowLabel(); |
28 | 28 |
29 void SetTextShadows(int shadow_count, const gfx::ShadowValue* shadows); | 29 void SetTextShadows(int shadow_count, const gfx::ShadowValue* shadows); |
30 | 30 |
31 private: | 31 private: |
32 // Overridden from views::Label: | 32 // Overridden from views::Label: |
33 virtual gfx::Insets GetInsets() const OVERRIDE; | 33 virtual gfx::Insets GetInsets() const OVERRIDE; |
34 virtual void PaintText(gfx::Canvas* canvas, | 34 virtual void PaintText(gfx::Canvas* canvas, |
35 const string16& text, | 35 const string16& text, |
36 const gfx::Rect& text_bounds, | 36 const gfx::Rect& text_bounds, |
37 int flags) OVERRIDE; | 37 int flags) OVERRIDE; |
38 | 38 |
39 std::vector<gfx::ShadowValue> text_shadows_; | 39 std::vector<gfx::ShadowValue> text_shadows_; |
40 | 40 |
41 DISALLOW_COPY_AND_ASSIGN(DropShadowLabel); | 41 DISALLOW_COPY_AND_ASSIGN(DropShadowLabel); |
42 }; | 42 }; |
43 | 43 |
44 } // namespace ash | 44 } // namespace app_list |
45 | 45 |
46 #endif // ASH_APP_LIST_DROP_SHADOW_LABEL_H_ | 46 #endif // UI_APP_LIST_DROP_SHADOW_LABEL_H_ |
OLD | NEW |