OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/views/controls/styled_label.h" | 5 #include "ui/views/controls/styled_label.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <limits> | 9 #include <limits> |
8 #include <vector> | 10 #include <vector> |
9 | 11 |
10 #include "base/strings/string_util.h" | 12 #include "base/strings/string_util.h" |
11 #include "ui/gfx/font_list.h" | 13 #include "ui/gfx/font_list.h" |
12 #include "ui/gfx/text_elider.h" | 14 #include "ui/gfx/text_elider.h" |
13 #include "ui/native_theme/native_theme.h" | 15 #include "ui/native_theme/native_theme.h" |
14 #include "ui/views/controls/label.h" | 16 #include "ui/views/controls/label.h" |
15 #include "ui/views/controls/link.h" | 17 #include "ui/views/controls/link.h" |
16 #include "ui/views/controls/styled_label_listener.h" | 18 #include "ui/views/controls/styled_label_listener.h" |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 DCHECK_LE(used_width, width); | 372 DCHECK_LE(used_width, width); |
371 // The user-specified line height only applies to interline spacing, so the | 373 // The user-specified line height only applies to interline spacing, so the |
372 // final line's height is unaffected. | 374 // final line's height is unaffected. |
373 int total_height = line * line_height + | 375 int total_height = line * line_height + |
374 CalculateLineHeight(font_list_) + GetInsets().height(); | 376 CalculateLineHeight(font_list_) + GetInsets().height(); |
375 calculated_size_ = gfx::Size(used_width + GetInsets().width(), total_height); | 377 calculated_size_ = gfx::Size(used_width + GetInsets().width(), total_height); |
376 return calculated_size_; | 378 return calculated_size_; |
377 } | 379 } |
378 | 380 |
379 } // namespace views | 381 } // namespace views |
OLD | NEW |