OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ash/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_skia.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/skbitmap_operations.h" | 11 #include "ui/gfx/skbitmap_operations.h" |
12 | 12 |
13 using views::Label; | 13 using views::Label; |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 | 16 |
17 static const int kDefaultDropShadowSize = 2; | 17 static const int kDefaultDropShadowSize = 2; |
18 | 18 |
19 DropShadowLabel::DropShadowLabel() : drop_shadow_size_(kDefaultDropShadowSize) { | 19 DropShadowLabel::DropShadowLabel() : drop_shadow_size_(kDefaultDropShadowSize) { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 | 110 |
111 gfx::Size DropShadowLabel::GetTextSize() const { | 111 gfx::Size DropShadowLabel::GetTextSize() const { |
112 gfx::Size text_size = Label::GetTextSize(); | 112 gfx::Size text_size = Label::GetTextSize(); |
113 text_size.SetSize(text_size.width() + drop_shadow_size_, | 113 text_size.SetSize(text_size.width() + drop_shadow_size_, |
114 text_size.height() + drop_shadow_size_); | 114 text_size.height() + drop_shadow_size_); |
115 return text_size; | 115 return text_size; |
116 } | 116 } |
117 | 117 |
118 } // namespace ash | 118 } // namespace ash |
OLD | NEW |