| Index: sky/sdk/example/rendering/solid_color_box.dart
|
| diff --git a/sky/sdk/example/rendering/solid_color_box.dart b/sky/sdk/example/rendering/solid_color_box.dart
|
| index b6624c666fbb353de51c00d3be1098271d912447..3ce9ef3e6f0fae1a51cfea0808201314a9e88162 100644
|
| --- a/sky/sdk/example/rendering/solid_color_box.dart
|
| +++ b/sky/sdk/example/rendering/solid_color_box.dart
|
| @@ -14,34 +14,40 @@ class RenderSolidColorBox extends RenderDecoratedBox {
|
| : backgroundColor = backgroundColor,
|
| super(decoration: new BoxDecoration(backgroundColor: backgroundColor));
|
|
|
| + @override
|
| double getMinIntrinsicWidth(BoxConstraints constraints) {
|
| return constraints.constrainHeight(
|
| this.desiredSize == Size.infinite ? 0.0 : desiredSize.width
|
| );
|
| }
|
|
|
| + @override
|
| double getMaxIntrinsicWidth(BoxConstraints constraints) {
|
| return constraints.constrainWidth(
|
| this.desiredSize == Size.infinite ? 0.0 : desiredSize.width
|
| );
|
| }
|
|
|
| + @override
|
| double getMinIntrinsicHeight(BoxConstraints constraints) {
|
| return constraints.constrainHeight(
|
| this.desiredSize == Size.infinite ? 0.0 : desiredSize.height
|
| );
|
| }
|
|
|
| + @override
|
| double getMaxIntrinsicHeight(BoxConstraints constraints) {
|
| return constraints.constrainHeight(
|
| this.desiredSize == Size.infinite ? 0.0 : desiredSize.height
|
| );
|
| }
|
|
|
| + @override
|
| void performLayout() {
|
| size = constraints.constrain(desiredSize);
|
| }
|
|
|
| + @override
|
| void handleEvent(sky.Event event, BoxHitTestEntry entry) {
|
| if (event.type == 'pointerdown')
|
| decoration = new BoxDecoration(backgroundColor: const Color(0xFFFF0000));
|
|
|