| Index: sky/sdk/lib/widgets/icon_button.dart
|
| diff --git a/sky/sdk/lib/widgets/icon_button.dart b/sky/sdk/lib/widgets/icon_button.dart
|
| index 2b39ec2579ba5520710d694052ab318738eb88bd..dbcd0af46b3dde4a9c513815cf60e35a8b8d9a6d 100644
|
| --- a/sky/sdk/lib/widgets/icon_button.dart
|
| +++ b/sky/sdk/lib/widgets/icon_button.dart
|
| @@ -2,6 +2,8 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +import 'dart:sky' as sky;
|
| +
|
| import '../rendering/box.dart';
|
| import 'basic.dart';
|
| import 'icon.dart';
|
| @@ -9,16 +11,25 @@ import 'widget.dart';
|
|
|
| class IconButton extends Component {
|
|
|
| - IconButton({ String icon: '', this.onPressed })
|
| + IconButton({ String icon: '', this.onPressed, this.color })
|
| : super(key: icon), icon = icon;
|
|
|
| final String icon;
|
| final Function onPressed;
|
| + final Color color;
|
|
|
| Widget build() {
|
| + Widget child = new Icon(type: icon, size: 24);
|
| + if (color != null) {
|
| + child = new ColorFilter(
|
| + color: color,
|
| + transferMode: sky.TransferMode.srcATop,
|
| + child: child
|
| + );
|
| + }
|
| return new Listener(
|
| child: new Padding(
|
| - child: new Icon(type: icon, size: 24),
|
| + child: child,
|
| padding: const EdgeDims.all(8.0)),
|
| onGestureTap: (_) {
|
| if (onPressed != null)
|
|
|