OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/controls/label.h" | 5 #include "views/controls/label.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "app/gfx/canvas.h" | |
11 #include "app/gfx/font.h" | |
12 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
13 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
14 #include "app/text_elider.h" | 12 #include "app/text_elider.h" |
15 #include "base/i18n/rtl.h" | 13 #include "base/i18n/rtl.h" |
16 #include "base/logging.h" | 14 #include "base/logging.h" |
17 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "gfx/canvas.h" |
18 #include "gfx/color_utils.h" | 17 #include "gfx/color_utils.h" |
| 18 #include "gfx/font.h" |
19 #include "gfx/insets.h" | 19 #include "gfx/insets.h" |
20 #include "views/background.h" | 20 #include "views/background.h" |
21 | 21 |
22 namespace views { | 22 namespace views { |
23 | 23 |
24 // static | 24 // static |
25 const char Label::kViewClassName[] = "views/Label"; | 25 const char Label::kViewClassName[] = "views/Label"; |
26 SkColor Label::kEnabledColor, Label::kDisabledColor; | 26 SkColor Label::kEnabledColor, Label::kDisabledColor; |
27 | 27 |
28 static const int kFocusBorderPadding = 1; | 28 static const int kFocusBorderPadding = 1; |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 } | 412 } |
413 | 413 |
414 gfx::Rect Label::GetAvailableRect() const { | 414 gfx::Rect Label::GetAvailableRect() const { |
415 gfx::Rect bounds(gfx::Point(), size()); | 415 gfx::Rect bounds(gfx::Point(), size()); |
416 gfx::Insets insets(GetInsets()); | 416 gfx::Insets insets(GetInsets()); |
417 bounds.Inset(insets.left(), insets.top(), insets.right(), insets.bottom()); | 417 bounds.Inset(insets.left(), insets.top(), insets.right(), insets.bottom()); |
418 return bounds; | 418 return bounds; |
419 } | 419 } |
420 | 420 |
421 } // namespace views | 421 } // namespace views |
OLD | NEW |