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