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

Side by Side Diff: sky/home.dart

Issue 1197203004: Make the buttons on home.dart fill the screen width again (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 | « no previous file | no next file » | 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 'dart:sky'; 5 import 'dart:sky';
6 6
7 import 'package:mojom/intents/intents.mojom.dart'; 7 import 'package:mojom/intents/intents.mojom.dart';
8 import 'package:sky/framework/shell.dart' as shell; 8 import 'package:sky/framework/shell.dart' as shell;
9 import 'package:sky/theme/colors.dart' as colors; 9 import 'package:sky/theme/colors.dart' as colors;
10 import 'package:sky/theme/edges.dart'; 10 import 'package:sky/theme/edges.dart';
(...skipping 20 matching lines...) Expand all
31 String text; 31 String text;
32 String href; 32 String href;
33 33
34 SkyDemo(String text, this.href) : this.text = text, super(key: text); 34 SkyDemo(String text, this.href) : this.text = text, super(key: text);
35 35
36 void _handlePress() { 36 void _handlePress() {
37 launch(href); 37 launch(href);
38 } 38 }
39 39
40 UINode build() { 40 UINode build() {
41 return new RaisedButton( 41 return new ConstrainedBox(
42 child: new Text(text), 42 // TOOD(ianh): Fix so we don't need INFINITY here.
43 onPressed: _handlePress 43 constraints: new BoxConstraints.tightFor(width: double.INFINITY),
44 child: new RaisedButton(
45 child: new Text(text),
46 onPressed: _handlePress
47 )
44 ); 48 );
45 } 49 }
46 } 50 }
47 51
48 class SkyHome extends App { 52 class SkyHome extends App {
49 UINode build() { 53 UINode build() {
50 List<UINode> children = [ 54 List<UINode> children = [
51 new SkyDemo('Stocks App', 'examples/stocks2/lib/stock_app.dart'), 55 new SkyDemo('Stocks App', 'examples/stocks2/lib/stock_app.dart'),
52 new SkyDemo('Astroids Game', 'examples/game/main.dart'), 56 new SkyDemo('Astroids Game', 'examples/game/main.dart'),
53 new SkyDemo('Interactive Flex', 'examples/rendering/interactive_flex.dart' ), 57 new SkyDemo('Interactive Flex', 'examples/rendering/interactive_flex.dart' ),
(...skipping 20 matching lines...) Expand all
74 justifyContent: FlexJustifyContent.spaceAround 78 justifyContent: FlexJustifyContent.spaceAround
75 ) 79 )
76 ) 80 )
77 ); 81 );
78 } 82 }
79 } 83 }
80 84
81 void main() { 85 void main() {
82 runApp(new SkyHome()); 86 runApp(new SkyHome());
83 } 87 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698