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

Unified Diff: sky/sky_home.dart

Issue 1178293004: Port sky_home to the new SkyView world (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sky_home ('k') | sky/tools/shelldb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sky_home.dart
diff --git a/sky/sky_home.dart b/sky/sky_home.dart
deleted file mode 100644
index 46e45cff739fc00149f47a5f9f12bda15c945b51..0000000000000000000000000000000000000000
--- a/sky/sky_home.dart
+++ /dev/null
@@ -1,56 +0,0 @@
-import 'dart:sky';
-import 'package:sky/framework/fn.dart';
-import 'package:sky/framework/components/button.dart';
-import 'package:sky/framework/components/scaffold.dart';
-import 'package:sky/framework/components/tool_bar.dart';
-import 'package:sky/framework/theme/colors.dart';
-import 'package:sky/framework/theme/typography.dart' as typography;
-
-class SkyLink extends Component {
- String text;
- String href;
-
- SkyLink(String text, this.href) : this.text = text, super(key: text);
-
- UINode build() {
- return new EventListenerNode(
- new Button(key: text, content: new Text(text), level: 1),
- onPointerUp: (_) => window.location.href = href
- );
- }
-}
-
-class SkyHome extends App {
- static final Style _actionBarStyle = new Style('''
- background-color: ${Green[500]};''');
-
- static final Style _titleStyle = new Style('''
- ${typography.white.title};''');
-
- UINode build() {
- List<UINode> children = [
- new SkyLink('Stocks2 App', 'examples/stocks2/lib/stock_app.dart'),
- new SkyLink('Box2D Game', 'examples/game/main.dart'),
- new SkyLink('Interactive Flex', 'examples/rendering/interactive_flex.dart'),
- new SkyLink('Sector Layout', 'examples/rendering/sector_layout.dart'),
- new SkyLink('Touch Demo', 'examples/rendering/touch_demo.dart'),
-
- // TODO(eseidel): We could use to separate these groups?
- new SkyLink('Stocks App (Old)', 'examples/stocks/main.sky'),
- new SkyLink('Touch Demo (Old)', 'examples/raw/touch-demo.sky'),
- new SkyLink('Spinning Square (Old)', 'examples/raw/spinning-square.sky'),
-
- new SkyLink('Licences (Old)', 'LICENSES.sky'),
- ];
-
- return new Scaffold(
- // FIXME: ActionBar should have a better default style than transparent.
- header: new StyleNode(
- // FIXME: left should be optional, but currently crashes when null.
- new ToolBar(left: new Text(''),
- center: new Container(children: [new Text('Sky Demos')], style: _titleStyle)),
- _actionBarStyle),
- content: new Container(children: children)
- );
- }
-}
« no previous file with comments | « sky/sky_home ('k') | sky/tools/shelldb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698