Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: ui/views/controls/label.h

Issue 231643002: Added labels under the windows in OverviewMode displaying their current name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/wm/overview/window_selector_window.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LABEL_H_ 5 #ifndef UI_VIEWS_CONTROLS_LABEL_H_
6 #define UI_VIEWS_CONTROLS_LABEL_H_ 6 #define UI_VIEWS_CONTROLS_LABEL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // will force the text color to be readable over it. 87 // will force the text color to be readable over it.
88 void SetBackgroundColor(SkColor color); 88 void SetBackgroundColor(SkColor color);
89 SkColor background_color() const { return background_color_; } 89 SkColor background_color() const { return background_color_; }
90 90
91 // Enables a drop shadow underneath the text. 91 // Enables a drop shadow underneath the text.
92 void SetShadowColors(SkColor enabled_color, SkColor disabled_color); 92 void SetShadowColors(SkColor enabled_color, SkColor disabled_color);
93 93
94 // Sets the drop shadow's offset from the text. 94 // Sets the drop shadow's offset from the text.
95 void SetShadowOffset(int x, int y); 95 void SetShadowOffset(int x, int y);
96 96
97 // Sets the shadow blur. Default is zero.
98 void set_shadow_blur(double shadow_blur) { shadow_blur_ = shadow_blur; }
99
97 // Disables shadows. 100 // Disables shadows.
98 void ClearEmbellishing(); 101 void ClearEmbellishing();
99 102
100 // Sets horizontal alignment. If the locale is RTL, and the directionality 103 // Sets horizontal alignment. If the locale is RTL, and the directionality
101 // mode is USE_UI_DIRECTIONALITY, the alignment is flipped around. 104 // mode is USE_UI_DIRECTIONALITY, the alignment is flipped around.
102 // 105 //
103 // Caveat: for labels originating from a web page, the directionality mode 106 // Caveat: for labels originating from a web page, the directionality mode
104 // should be reset to AUTO_DETECT_DIRECTIONALITY before the horizontal 107 // should be reset to AUTO_DETECT_DIRECTIONALITY before the horizontal
105 // alignment is set. Otherwise, the label's alignment specified as a parameter 108 // alignment is set. Otherwise, the label's alignment specified as a parameter
106 // will be flipped in RTL locales. 109 // will be flipped in RTL locales.
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 SkColor background_color_; 263 SkColor background_color_;
261 264
262 // Set to true once the corresponding setter is invoked. 265 // Set to true once the corresponding setter is invoked.
263 bool enabled_color_set_; 266 bool enabled_color_set_;
264 bool disabled_color_set_; 267 bool disabled_color_set_;
265 bool background_color_set_; 268 bool background_color_set_;
266 269
267 bool auto_color_readability_; 270 bool auto_color_readability_;
268 mutable gfx::Size text_size_; 271 mutable gfx::Size text_size_;
269 mutable bool text_size_valid_; 272 mutable bool text_size_valid_;
273 // Indicates the level of shadow blurring. Default is zero.
274 double shadow_blur_;
270 int line_height_; 275 int line_height_;
271 bool is_multi_line_; 276 bool is_multi_line_;
272 bool is_obscured_; 277 bool is_obscured_;
273 bool allow_character_break_; 278 bool allow_character_break_;
274 ElideBehavior elide_behavior_; 279 ElideBehavior elide_behavior_;
275 gfx::HorizontalAlignment horizontal_alignment_; 280 gfx::HorizontalAlignment horizontal_alignment_;
276 base::string16 tooltip_text_; 281 base::string16 tooltip_text_;
277 // Whether to collapse the label when it's not visible. 282 // Whether to collapse the label when it's not visible.
278 bool collapse_when_hidden_; 283 bool collapse_when_hidden_;
279 // The following member variable is used to control whether the 284 // The following member variable is used to control whether the
(...skipping 14 matching lines...) Expand all
294 // The cached heights to avoid recalculation in GetHeightForWidth(). 299 // The cached heights to avoid recalculation in GetHeightForWidth().
295 std::vector<gfx::Size> cached_heights_; 300 std::vector<gfx::Size> cached_heights_;
296 int cached_heights_cursor_; 301 int cached_heights_cursor_;
297 302
298 DISALLOW_COPY_AND_ASSIGN(Label); 303 DISALLOW_COPY_AND_ASSIGN(Label);
299 }; 304 };
300 305
301 } // namespace views 306 } // namespace views
302 307
303 #endif // UI_VIEWS_CONTROLS_LABEL_H_ 308 #endif // UI_VIEWS_CONTROLS_LABEL_H_
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector_window.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698