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

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

Issue 343513002: Refactor views::Label and gfx::RenderText shadow functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove forbidden static FontList. Created 6 years, 6 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 | « ui/views/controls/button/label_button.cc ('k') | 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 60dfba9165aeb1246c0bf2781775f0d42234a83e..cbb12cb2f10be666807da0f690b669e2ca22f911 100644
--- a/ui/views/controls/label.h
+++ b/ui/views/controls/label.h
@@ -13,6 +13,7 @@
#include "base/strings/string16.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/font_list.h"
+#include "ui/gfx/shadow_value.h"
#include "ui/gfx/text_constants.h"
#include "ui/views/view.h"
@@ -58,17 +59,8 @@ class VIEWS_EXPORT Label : public View {
void SetBackgroundColor(SkColor color);
SkColor background_color() const { return background_color_; }
- // Enables a drop shadow underneath the text.
- void SetShadowColors(SkColor enabled_color, SkColor disabled_color);
-
- // Sets the drop shadow's offset from the text.
- void SetShadowOffset(int x, int y);
-
- // Sets the shadow blur. Default is zero.
- void set_shadow_blur(double shadow_blur) { shadow_blur_ = shadow_blur; }
-
- // Disables shadows.
- void ClearEmbellishing();
+ // Set drop shadows underneath the text.
+ void set_shadows(const gfx::ShadowValues& shadows) { shadows_ = shadows; }
// 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; }
@@ -241,19 +233,7 @@ class VIEWS_EXPORT Label : public View {
// Controls whether the directionality is auto-detected based on first strong
// directionality character or is determined by the application UI's locale.
gfx::DirectionalityMode directionality_mode_;
-
- // Colors for shadow.
- SkColor enabled_shadow_color_;
- SkColor disabled_shadow_color_;
-
- // Space between text and shadow.
- gfx::Point shadow_offset_;
-
- // Should a shadow be drawn behind the text?
- bool has_shadow_;
-
- // Indicates the level of shadow blurring. Default is zero.
- double shadow_blur_;
+ gfx::ShadowValues shadows_;
// The halo color drawn around the text if it is not transparent.
SkColor halo_color_;
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698