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

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

Issue 1218153005: Refactoring to support dark theme better (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix import issues Created 5 years, 5 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/material.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 // Rather than using this class directly, please use FlatButton or RaisedButton. 10 // Rather than using this class directly, please use FlatButton or RaisedButton.
(...skipping 24 matching lines...) Expand all
35 Widget contents = new Container( 35 Widget contents = new Container(
36 padding: new EdgeDims.symmetric(horizontal: 8.0), 36 padding: new EdgeDims.symmetric(horizontal: 8.0),
37 child: new Center(child: child) // TODO(ianh): figure out a way to compell the child to have gray text when disabled... 37 child: new Center(child: child) // TODO(ianh): figure out a way to compell the child to have gray text when disabled...
38 ); 38 );
39 return new Listener( 39 return new Listener(
40 child: new Container( 40 child: new Container(
41 height: 36.0, 41 height: 36.0,
42 constraints: new BoxConstraints(minWidth: 88.0), 42 constraints: new BoxConstraints(minWidth: 88.0),
43 margin: new EdgeDims.all(8.0), 43 margin: new EdgeDims.all(8.0),
44 child: new Material( 44 child: new Material(
45 type: MaterialType.button,
45 child: enabled ? new InkWell(child: contents) : contents, 46 child: enabled ? new InkWell(child: contents) : contents,
46 level: level, 47 level: level,
47 color: color 48 color: color
48 ) 49 )
49 ), 50 ),
50 onGestureTap: (_) { if (onPressed != null && enabled) onPressed(); } 51 onGestureTap: (_) { if (onPressed != null && enabled) onPressed(); }
51 ); 52 );
52 } 53 }
53 54
54 } 55 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/material.dart ('k') | sky/sdk/lib/widgets/menu_item.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698