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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "ui/base/text/text_elider.h" | 10 #include "ui/base/text/text_elider.h" |
11 #include "ui/views/controls/label.h" | 11 #include "ui/views/controls/label.h" |
12 #include "ui/views/controls/link.h" | 12 #include "ui/views/controls/link.h" |
13 #include "ui/views/controls/styled_label_listener.h" | 13 #include "ui/views/controls/styled_label_listener.h" |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // Calculates the height of a line of text. Currently returns the height of | 19 // Calculates the height of a line of text. Currently returns the height of |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 } | 239 } |
240 x += view_size.width() - 2 * overlap; | 240 x += view_size.width() - 2 * overlap; |
241 | 241 |
242 remaining_string = remaining_string.substr(chunk.size()); | 242 remaining_string = remaining_string.substr(chunk.size()); |
243 } | 243 } |
244 | 244 |
245 return (line + 1) * line_height + GetInsets().height(); | 245 return (line + 1) * line_height + GetInsets().height(); |
246 } | 246 } |
247 | 247 |
248 } // namespace views | 248 } // namespace views |
OLD | NEW |