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 #ifndef UI_VIEWS_CONTROLS_STYLED_LABEL_H_ | 5 #ifndef UI_VIEWS_CONTROLS_STYLED_LABEL_H_ |
6 #define UI_VIEWS_CONTROLS_STYLED_LABEL_H_ | 6 #define UI_VIEWS_CONTROLS_STYLED_LABEL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // Parameters that define label style for a styled label's text range. | 35 // Parameters that define label style for a styled label's text range. |
36 struct VIEWS_EXPORT RangeStyleInfo { | 36 struct VIEWS_EXPORT RangeStyleInfo { |
37 RangeStyleInfo(); | 37 RangeStyleInfo(); |
38 ~RangeStyleInfo(); | 38 ~RangeStyleInfo(); |
39 | 39 |
40 // Creates a range style info with default values for link. | 40 // Creates a range style info with default values for link. |
41 static RangeStyleInfo CreateForLink(); | 41 static RangeStyleInfo CreateForLink(); |
42 | 42 |
43 // The font style that will be applied to the range. Should be a bitmask of | 43 // The font style that will be applied to the range. Should be a bitmask of |
44 // values defined in gfx::Font::FontStyle (BOLD, ITALIC, UNDERLINE). | 44 // values defined in gfx::Font::FontStyle (ITALIC, UNDERLINE). |
45 int font_style; | 45 int font_style; |
46 | 46 |
| 47 // The font weight to be applied to the range. Default is Weight::NORMAL. |
| 48 gfx::Font::Weight weight; |
| 49 |
47 // The text color for the range. Default is SK_ColorTRANSPARENT, indicating | 50 // The text color for the range. Default is SK_ColorTRANSPARENT, indicating |
48 // the theme's default color should be used. | 51 // the theme's default color should be used. |
49 SkColor color; | 52 SkColor color; |
50 | 53 |
51 // Tooltip for the range. | 54 // Tooltip for the range. |
52 base::string16 tooltip; | 55 base::string16 tooltip; |
53 | 56 |
54 // If set, the whole range will be put on a single line. | 57 // If set, the whole range will be put on a single line. |
55 bool disable_line_wrapping; | 58 bool disable_line_wrapping; |
56 | 59 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // Controls whether the text is automatically re-colored to be readable on the | 175 // Controls whether the text is automatically re-colored to be readable on the |
173 // background. | 176 // background. |
174 bool auto_color_readability_enabled_; | 177 bool auto_color_readability_enabled_; |
175 | 178 |
176 DISALLOW_COPY_AND_ASSIGN(StyledLabel); | 179 DISALLOW_COPY_AND_ASSIGN(StyledLabel); |
177 }; | 180 }; |
178 | 181 |
179 } // namespace views | 182 } // namespace views |
180 | 183 |
181 #endif // UI_VIEWS_CONTROLS_STYLED_LABEL_H_ | 184 #endif // UI_VIEWS_CONTROLS_STYLED_LABEL_H_ |
OLD | NEW |