| Index: ui/views/controls/separator.cc
|
| diff --git a/ui/views/controls/separator.cc b/ui/views/controls/separator.cc
|
| index a8fe6da7ef3f95fd3724735a35e98cafe3736663..6ef4b44437aeb0b086185c1f2e8977a242f2ecef 100644
|
| --- a/ui/views/controls/separator.cc
|
| +++ b/ui/views/controls/separator.cc
|
| @@ -18,7 +18,18 @@ const int kSeparatorHeight = 1;
|
| // Default color of the separator.
|
| const SkColor kDefaultColor = SkColorSetARGB(255, 233, 233, 233);
|
|
|
| -Separator::Separator(Orientation orientation) : orientation_(orientation) {
|
| +Separator::Separator(Orientation orientation)
|
| + : Separator(orientation, kDefaultColor, kSeparatorHeight) {
|
| +}
|
| +
|
| +Separator::Separator(Orientation orientation, SkColor color)
|
| + : Separator(orientation, color, kSeparatorHeight) {
|
| +}
|
| +
|
| +Separator::Separator(Orientation orientation, SkColor color, int height)
|
| + : orientation_(orientation),
|
| + color_(color),
|
| + height_(height) {
|
| SetFocusable(false);
|
| }
|
|
|
| @@ -30,8 +41,8 @@ Separator::~Separator() {
|
|
|
| gfx::Size Separator::GetPreferredSize() const {
|
| if (orientation_ == HORIZONTAL)
|
| - return gfx::Size(width(), kSeparatorHeight);
|
| - return gfx::Size(kSeparatorHeight, height());
|
| + return gfx::Size(width(), height_);
|
| + return gfx::Size(height_, height());
|
| }
|
|
|
| void Separator::GetAccessibleState(ui::AXViewState* state) {
|
| @@ -39,7 +50,7 @@ void Separator::GetAccessibleState(ui::AXViewState* state) {
|
| }
|
|
|
| void Separator::Paint(gfx::Canvas* canvas, const views::CullSet& cull_set) {
|
| - canvas->FillRect(bounds(), kDefaultColor);
|
| + canvas->FillRect(bounds(), color_);
|
| }
|
|
|
| const char* Separator::GetClassName() const {
|
|
|