| Index: ui/views/border.cc
|
| ===================================================================
|
| --- ui/views/border.cc (revision 236640)
|
| +++ ui/views/border.cc (working copy)
|
| @@ -21,6 +21,7 @@
|
| // Overridden from Border:
|
| virtual void Paint(const View& view, gfx::Canvas* canvas) OVERRIDE;
|
| virtual gfx::Insets GetInsets() const OVERRIDE;
|
| + virtual gfx::Size GetMinimumSize() const OVERRIDE;
|
|
|
| private:
|
| const SkColor color_;
|
| @@ -55,6 +56,10 @@
|
| return insets_;
|
| }
|
|
|
| +gfx::Size SidedSolidBorder::GetMinimumSize() const {
|
| + return gfx::Size(insets_.width(), insets_.height());
|
| +}
|
| +
|
| // A variation of SidedSolidBorder, where each side has the same thickness.
|
| class SolidBorder : public SidedSolidBorder {
|
| public:
|
| @@ -78,6 +83,10 @@
|
| return insets_;
|
| }
|
|
|
| + virtual gfx::Size GetMinimumSize() const OVERRIDE {
|
| + return gfx::Size();
|
| + }
|
| +
|
| private:
|
| const gfx::Insets insets_;
|
|
|
| @@ -103,6 +112,10 @@
|
| return insets_;
|
| }
|
|
|
| + virtual gfx::Size GetMinimumSize() const OVERRIDE {
|
| + return painter_->GetMinimumSize();
|
| + }
|
| +
|
| private:
|
| scoped_ptr<Painter> painter_;
|
| const gfx::Insets insets_;
|
|
|