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/app_list/drop_shadow_label.h" | 5 #include "ui/app_list/drop_shadow_label.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "third_party/skia/include/effects/SkGradientShader.h" | 8 #include "third_party/skia/include/effects/SkGradientShader.h" |
9 #include "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
10 #include "ui/gfx/color_utils.h" | 10 #include "ui/gfx/color_utils.h" |
11 #include "ui/gfx/insets.h" | 11 #include "ui/gfx/insets.h" |
12 #include "ui/gfx/skbitmap_operations.h" | 12 #include "ui/gfx/skbitmap_operations.h" |
13 | 13 |
14 using views::Label; | 14 using views::Label; |
15 | 15 |
16 namespace ash { | 16 namespace app_list { |
17 | 17 |
18 DropShadowLabel::DropShadowLabel() { | 18 DropShadowLabel::DropShadowLabel() { |
19 } | 19 } |
20 | 20 |
21 DropShadowLabel::~DropShadowLabel() { | 21 DropShadowLabel::~DropShadowLabel() { |
22 } | 22 } |
23 | 23 |
24 void DropShadowLabel::SetTextShadows(int shadow_count, | 24 void DropShadowLabel::SetTextShadows(int shadow_count, |
25 const gfx::ShadowValue* shadows) { | 25 const gfx::ShadowValue* shadows) { |
26 text_shadows_.clear(); | 26 text_shadows_.clear(); |
(...skipping 26 matching lines...) Expand all Loading... |
53 text_shadows_); | 53 text_shadows_); |
54 | 54 |
55 if (HasFocus() || paint_as_focused()) { | 55 if (HasFocus() || paint_as_focused()) { |
56 gfx::Rect focus_bounds = text_bounds; | 56 gfx::Rect focus_bounds = text_bounds; |
57 focus_bounds.Inset(-Label::kFocusBorderPadding, | 57 focus_bounds.Inset(-Label::kFocusBorderPadding, |
58 -Label::kFocusBorderPadding); | 58 -Label::kFocusBorderPadding); |
59 canvas->DrawFocusRect(focus_bounds); | 59 canvas->DrawFocusRect(focus_bounds); |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 } // namespace ash | 63 } // namespace app_list |
OLD | NEW |