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

Unified Diff: ui/views/shadow_border.h

Issue 900163002: Make ShadowBorder use ShadowValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_animations
Patch Set: Created 5 years, 10 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/message_center/views/message_view.cc ('k') | ui/views/shadow_border.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/shadow_border.h
diff --git a/ui/views/shadow_border.h b/ui/views/shadow_border.h
index fd0565f11ff5e4f0940901106e2a8602a7e67c92..afe4b6466f2a07a9f2ccd86e2b06ebc9812b499c 100644
--- a/ui/views/shadow_border.h
+++ b/ui/views/shadow_border.h
@@ -6,6 +6,7 @@
#define UI_VIEWS_SHADOW_BORDER_H_
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/gfx/shadow_value.h"
#include "ui/views/border.h"
#include "ui/views/views_export.h"
@@ -14,10 +15,7 @@ namespace views {
// Creates a css box-shadow like border which fades into SK_ColorTRANSPARENT.
class VIEWS_EXPORT ShadowBorder : public views::Border {
public:
- ShadowBorder(int blur,
- SkColor color,
- int vertical_offset,
- int horizontal_offset);
+ explicit ShadowBorder(const gfx::ShadowValue& shadow);
~ShadowBorder() override;
protected:
@@ -27,18 +25,11 @@ class VIEWS_EXPORT ShadowBorder : public views::Border {
gfx::Size GetMinimumSize() const override;
private:
- // Blur amount of the shadow in pixels. For details on how blur is defined see
- // comments for blur_ in class ShadowValue.
- const int blur_;
+ // The shadow value to use for this border.
+ const gfx::ShadowValue shadow_value_;
- // Shadow color.
- const SkColor color_;
-
- // Number of pixels to shift shadow to bottom.
- const int vertical_offset_;
-
- // Number of pixels to shift shadow to right.
- const int horizontal_offset_;
+ // The insets of this border.
+ const gfx::Insets insets_;
DISALLOW_COPY_AND_ASSIGN(ShadowBorder);
};
« no previous file with comments | « ui/message_center/views/message_view.cc ('k') | ui/views/shadow_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698