| 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 <cmath> | 7 #include <cmath> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/string_split.h" | 12 #include "base/string_split.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "gfx/canvas_skia.h" | |
| 16 #include "gfx/color_utils.h" | |
| 17 #include "gfx/font.h" | |
| 18 #include "gfx/insets.h" | |
| 19 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
| 20 #include "ui/base/text/text_elider.h" | 16 #include "ui/base/text/text_elider.h" |
| 17 #include "ui/gfx/canvas_skia.h" |
| 18 #include "ui/gfx/color_utils.h" |
| 19 #include "ui/gfx/font.h" |
| 20 #include "ui/gfx/insets.h" |
| 21 #include "views/background.h" | 21 #include "views/background.h" |
| 22 | 22 |
| 23 namespace views { | 23 namespace views { |
| 24 | 24 |
| 25 // static | 25 // static |
| 26 const char Label::kViewClassName[] = "views/Label"; | 26 const char Label::kViewClassName[] = "views/Label"; |
| 27 SkColor Label::kEnabledColor, Label::kDisabledColor; | 27 SkColor Label::kEnabledColor, Label::kDisabledColor; |
| 28 | 28 |
| 29 const int Label::kFocusBorderPadding = 1; | 29 const int Label::kFocusBorderPadding = 1; |
| 30 | 30 |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 font_, GetAvailableRect().width(), true)); | 446 font_, GetAvailableRect().width(), true)); |
| 447 } else { | 447 } else { |
| 448 *paint_text = UTF16ToWideHack(text_); | 448 *paint_text = UTF16ToWideHack(text_); |
| 449 } | 449 } |
| 450 | 450 |
| 451 *text_bounds = GetTextBounds(); | 451 *text_bounds = GetTextBounds(); |
| 452 *flags = ComputeMultiLineFlags(); | 452 *flags = ComputeMultiLineFlags(); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace views | 455 } // namespace views |
| OLD | NEW |