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

Side by Side Diff: sky/sdk/home.dart

Issue 1209413006: Fix padding on Sky home screen scrollable list (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « no previous file | sky/sdk/lib/widgets/card.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 '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/painting/box_painter.dart'; 9 import 'package:sky/painting/box_painter.dart';
10 import 'package:sky/theme/colors.dart' as colors; 10 import 'package:sky/theme/colors.dart' as colors;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // TODO(eseidel): We could use to separate these groups? 99 // TODO(eseidel): We could use to separate these groups?
100 // new SkyDemo('Old Stocks App', 'examples/stocks/main.sky'), 100 // new SkyDemo('Old Stocks App', 'examples/stocks/main.sky'),
101 // new SkyDemo('Old Touch Demo', 'examples/raw/touch-demo.sky'), 101 // new SkyDemo('Old Touch Demo', 'examples/raw/touch-demo.sky'),
102 // new SkyDemo('Old Spinning Square', 'examples/raw/spinning-square.sky'), 102 // new SkyDemo('Old Spinning Square', 'examples/raw/spinning-square.sky'),
103 103
104 // TODO(jackson): This doesn't seem to be working 104 // TODO(jackson): This doesn't seem to be working
105 // new SkyDemo('Licenses', 'LICENSES.sky'), 105 // new SkyDemo('Licenses', 'LICENSES.sky'),
106 ]; 106 ];
107 107
108 const double kCardHeight = 120.0; 108 const double kCardHeight = 120.0;
109 const EdgeDims kListPadding = const EdgeDims.all(4.0);
109 110
110 class DemoList extends FixedHeightScrollable { 111 class DemoList extends FixedHeightScrollable {
111 DemoList({ String key }) : super(key: key, itemHeight: kCardHeight) { 112 DemoList({ String key }) : super(key: key, itemHeight: kCardHeight, padding: k ListPadding) {
112 itemCount = demos.length; 113 itemCount = demos.length;
113 } 114 }
114 115
115 Widget buildDemo(SkyDemo demo) { 116 Widget buildDemo(SkyDemo demo) {
116 return new Listener( 117 return new Listener(
117 key: demo.name, 118 key: demo.name,
118 onGestureTap: (_) => launch(demo.href), 119 onGestureTap: (_) => launch(demo.href),
119 child: new Container( 120 child: new Container(
120 height: kCardHeight, 121 height: kCardHeight,
121 child: new Card( 122 child: new Card(
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 child: new DemoList() 165 child: new DemoList()
165 ) 166 )
166 ) 167 )
167 ); 168 );
168 } 169 }
169 } 170 }
170 171
171 void main() { 172 void main() {
172 runApp(new SkyHome()); 173 runApp(new SkyHome());
173 } 174 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/widgets/card.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698