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

Unified Diff: ui/views/controls/label.h

Issue 308083011: Add support for painting halos on Views Labels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Draw halos over shadows; refine function order and example. Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/controls/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label.h
diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h
index 17bee02f85f1b1767ff691dd924c17a6c1738684..67b438ba52dc967b185454257467ab3ca5b2bd51 100644
--- a/ui/views/controls/label.h
+++ b/ui/views/controls/label.h
@@ -100,6 +100,9 @@ class VIEWS_EXPORT Label : public View {
// Disables shadows.
void ClearEmbellishing();
+ // Set the color of a halo on the painted text (use transparent for none).
+ void set_halo_color(SkColor halo_color) { halo_color_ = halo_color; }
+
// Sets horizontal alignment. If the locale is RTL, and the directionality
// mode is USE_UI_DIRECTIONALITY, the alignment is flipped around.
//
@@ -270,8 +273,6 @@ class VIEWS_EXPORT Label : public View {
bool auto_color_readability_;
mutable gfx::Size text_size_;
mutable bool text_size_valid_;
- // Indicates the level of shadow blurring. Default is zero.
- double shadow_blur_;
int line_height_;
bool is_multi_line_;
bool is_obscured_;
@@ -296,6 +297,12 @@ class VIEWS_EXPORT Label : public View {
// Should a shadow be drawn behind the text?
bool has_shadow_;
+ // Indicates the level of shadow blurring. Default is zero.
+ double shadow_blur_;
+
+ // The halo color drawn around the text if it is not transparent.
+ SkColor halo_color_;
+
// The cached heights to avoid recalculation in GetHeightForWidth().
mutable std::vector<gfx::Size> cached_heights_;
mutable int cached_heights_cursor_;
« no previous file with comments | « no previous file | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698