Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(743)

Side by Side Diff: sky/sdk/lib/widgets/material_button.dart

Issue 1193513007: Rename EventListenerNode to Listener (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/sdk/lib/widgets/icon_button.dart ('k') | sky/sdk/lib/widgets/menu_item.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'basic.dart'; 5 import 'basic.dart';
6 import 'button_base.dart'; 6 import 'button_base.dart';
7 import 'ink_well.dart'; 7 import 'ink_well.dart';
8 import 'material.dart'; 8 import 'material.dart';
9 9
10 enum MaterialButtonTheme { light, dark } 10 enum MaterialButtonTheme { light, dark }
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 Color get color; 36 Color get color;
37 int get level; 37 int get level;
38 38
39 Widget buildContent() { 39 Widget buildContent() {
40 Widget contents = new Container( 40 Widget contents = new Container(
41 padding: new EdgeDims.symmetric(horizontal: 8.0), 41 padding: new EdgeDims.symmetric(horizontal: 8.0),
42 child: new Center(child: child) // TODO(ianh): figure out a way to compell the child to have gray text when disabled... 42 child: new Center(child: child) // TODO(ianh): figure out a way to compell the child to have gray text when disabled...
43 ); 43 );
44 return new EventListenerNode( 44 return new Listener(
45 new Container( 45 child: new Container(
46 height: 36.0, 46 height: 36.0,
47 constraints: new BoxConstraints(minWidth: 88.0), 47 constraints: new BoxConstraints(minWidth: 88.0),
48 margin: new EdgeDims.all(8.0), 48 margin: new EdgeDims.all(8.0),
49 child: new Material( 49 child: new Material(
50 child: enabled ? new InkWell(child: contents) : contents, 50 child: enabled ? new InkWell(child: contents) : contents,
51 level: level, 51 level: level,
52 color: color 52 color: color
53 ) 53 )
54 ), 54 ),
55 onGestureTap: (_) { if (onPressed != null && enabled) onPressed(); } 55 onGestureTap: (_) { if (onPressed != null && enabled) onPressed(); }
56 ); 56 );
57 } 57 }
58 58
59 } 59 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/icon_button.dart ('k') | sky/sdk/lib/widgets/menu_item.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698