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

Unified Diff: sky/examples/stocks-fn/lib/stock_arrow.dart

Issue 1011023003: Make stocks-fn match the style for the Sky SDK (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: more Created 5 years, 9 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/examples/stocks-fn/lib/stock_app.dart ('k') | sky/examples/stocks-fn/lib/stock_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/stocks-fn/lib/stock_arrow.dart
diff --git a/sky/examples/stocks-fn/stockarrow.dart b/sky/examples/stocks-fn/lib/stock_arrow.dart
similarity index 78%
rename from sky/examples/stocks-fn/stockarrow.dart
rename to sky/examples/stocks-fn/lib/stock_arrow.dart
index 82e52815d2ea57b1d7763f6a0a54933d5c15e9cb..9524ffe37cc95b0c3a6dc06facb99b85a2dd57d5 100644
--- a/sky/examples/stocks-fn/stockarrow.dart
+++ b/sky/examples/stocks-fn/lib/stock_arrow.dart
@@ -1,10 +1,12 @@
-part of stocksapp;
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
-class StockArrow extends Component {
-
- double percentChange;
+import 'dart:math';
+import 'package:sky/framework/fn.dart';
- static Style _style = new Style('''
+class StockArrow extends Component {
+ static final Style _style = new Style('''
width: 40px;
height: 40px;
display: flex;
@@ -15,7 +17,7 @@ class StockArrow extends Component {
border: 1px solid transparent;'''
);
- static Style _upStyle = new Style('''
+ static final Style _upStyle = new Style('''
width: 0;
height: 0;
border-left: 9px solid transparent;
@@ -24,7 +26,7 @@ class StockArrow extends Component {
border-bottom: 9px solid white;'''
);
- static Style _downStyle = new Style('''
+ static final Style _downStyle = new Style('''
width: 0;
height: 0;
border-left: 9px solid transparent;
@@ -33,8 +35,11 @@ class StockArrow extends Component {
border-top: 9px solid white'''
);
+ double percentChange;
+
StockArrow({ Object key, this.percentChange }) : super(key: key);
+ // TODO(abarth): These should use sky/framework/theme/colors.dart.
final List<String> _kRedColors = [
'#E57373',
'#EF5350',
@@ -45,6 +50,7 @@ class StockArrow extends Component {
'#B71C1C',
];
+ // TODO(abarth): These should use sky/framework/theme/colors.dart.
final List<String> _kGreenColors = [
'#81C784',
'#66BB6A',
« no previous file with comments | « sky/examples/stocks-fn/lib/stock_app.dart ('k') | sky/examples/stocks-fn/lib/stock_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698