| 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 "chrome/browser/chromeos/drop_shadow_label.h" | 5 #include "ui/aura_shell/app_list/drop_shadow_label.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "ui/gfx/canvas.h" | 8 #include "ui/gfx/canvas.h" |
| 9 #include "ui/gfx/color_utils.h" | 9 #include "ui/gfx/color_utils.h" |
| 10 | 10 |
| 11 using views::Label; | 11 using views::Label; |
| 12 | 12 |
| 13 namespace chromeos { | 13 namespace aura_shell { |
| 14 | 14 |
| 15 static const int kDefaultDropShadowSize = 2; | 15 static const int kDefaultDropShadowSize = 2; |
| 16 | 16 |
| 17 DropShadowLabel::DropShadowLabel() : drop_shadow_size_(kDefaultDropShadowSize) { | 17 DropShadowLabel::DropShadowLabel() : drop_shadow_size_(kDefaultDropShadowSize) { |
| 18 } | 18 } |
| 19 | 19 |
| 20 void DropShadowLabel::SetDropShadowSize(int drop_shadow_size) { | 20 void DropShadowLabel::SetDropShadowSize(int drop_shadow_size) { |
| 21 if (drop_shadow_size != drop_shadow_size_) { | 21 if (drop_shadow_size != drop_shadow_size_) { |
| 22 drop_shadow_size_ = drop_shadow_size; | 22 drop_shadow_size_ = drop_shadow_size; |
| 23 invalidate_text_size(); | 23 invalidate_text_size(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 gfx::Size DropShadowLabel::GetTextSize() const { | 61 gfx::Size DropShadowLabel::GetTextSize() const { |
| 62 gfx::Size text_size = Label::GetTextSize(); | 62 gfx::Size text_size = Label::GetTextSize(); |
| 63 text_size.SetSize(text_size.width() + drop_shadow_size_, | 63 text_size.SetSize(text_size.width() + drop_shadow_size_, |
| 64 text_size.height() + drop_shadow_size_); | 64 text_size.height() + drop_shadow_size_); |
| 65 return text_size; | 65 return text_size; |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace chromeos | 68 } // namespace aura_shell |
| OLD | NEW |