Index: ui/views/controls/separator.h |
diff --git a/ui/views/controls/separator.h b/ui/views/controls/separator.h |
index d4689fe209748b9241bebf63b616d9227a4ccf91..9a1fec36a137e5489721c63a5e2d8752151611ab 100644 |
--- a/ui/views/controls/separator.h |
+++ b/ui/views/controls/separator.h |
@@ -8,48 +8,37 @@ |
#include <string> |
#include "base/macros.h" |
+#include "base/optional.h" |
#include "ui/views/view.h" |
namespace views { |
// The Separator class is a view that shows a line used to visually separate |
// other views. |
- |
class VIEWS_EXPORT Separator : public View { |
public: |
- enum Orientation { |
- HORIZONTAL, |
- VERTICAL |
- }; |
- |
// The separator's class name. |
static const char kViewClassName[]; |
- explicit Separator(Orientation orientation); |
+ // The separator's thickness in dip. |
+ static const int kThickness; |
+ |
+ Separator(); |
~Separator() override; |
- SkColor color() const { return color_; } |
void SetColor(SkColor color); |
- int size() const { return size_; } |
- // Preferred size of one axis: height for horizontal separator |
- // and width for vertical separator |
- void SetPreferredSize(int size); |
+ void SetPreferredHeight(int height); |
// Overridden from View: |
gfx::Size GetPreferredSize() const override; |
void GetAccessibleNodeData(ui::AXNodeData* node_data) override; |
void OnPaint(gfx::Canvas* canvas) override; |
- void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
const char* GetClassName() const override; |
private: |
- void SetColorFromNativeTheme(); |
- |
- const Orientation orientation_; |
- SkColor color_; |
- bool color_overridden_; |
- int size_; |
+ int preferred_height_ = kThickness; |
+ base::Optional<SkColor> overridden_color_; |
DISALLOW_COPY_AND_ASSIGN(Separator); |
}; |