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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 // The ranges that should be linkified, sorted by start position. | 140 // The ranges that should be linkified, sorted by start position. |
141 StyleRanges style_ranges_; | 141 StyleRanges style_ranges_; |
142 | 142 |
143 // A mapping from a view to the range it corresponds to in |text_|. Only views | 143 // A mapping from a view to the range it corresponds to in |text_|. Only views |
144 // that correspond to ranges with is_link style set will be added to the map. | 144 // that correspond to ranges with is_link style set will be added to the map. |
145 std::map<View*, gfx::Range> link_targets_; | 145 std::map<View*, gfx::Range> link_targets_; |
146 | 146 |
147 // This variable saves the result of the last GetHeightForWidth call in order | 147 // This variable saves the result of the last GetHeightForWidth call in order |
148 // to avoid repeated calculation. | 148 // to avoid repeated calculation. |
149 mutable gfx::Size calculated_size_; | 149 mutable gfx::Size calculated_size_; |
150 int layout_built_for_width_; | |
sky
2014/12/12 16:01:10
This needs a description (and a newline). Also, th
sky
2014/12/15 17:03:07
You seemed to have missed this comment.
edjomin
2014/12/16 08:51:52
Yes, I've missed it, sorry
edjomin
2014/12/16 08:51:52
Done.
| |
150 | 151 |
151 // Background color on which the label is drawn, for auto color readability. | 152 // Background color on which the label is drawn, for auto color readability. |
152 SkColor displayed_on_background_color_; | 153 SkColor displayed_on_background_color_; |
153 bool displayed_on_background_color_set_; | 154 bool displayed_on_background_color_set_; |
154 | 155 |
155 // Controls whether the text is automatically re-colored to be readable on the | 156 // Controls whether the text is automatically re-colored to be readable on the |
156 // background. | 157 // background. |
157 bool auto_color_readability_enabled_; | 158 bool auto_color_readability_enabled_; |
158 | 159 |
159 DISALLOW_COPY_AND_ASSIGN(StyledLabel); | 160 DISALLOW_COPY_AND_ASSIGN(StyledLabel); |
160 }; | 161 }; |
161 | 162 |
162 } // namespace views | 163 } // namespace views |
163 | 164 |
164 #endif // UI_VIEWS_CONTROLS_STYLED_LABEL_H_ | 165 #endif // UI_VIEWS_CONTROLS_STYLED_LABEL_H_ |
OLD | NEW |