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

Unified Diff: sky/sdk/lib/framework/components2/icon.dart

Issue 1146913005: Give the Stocks2 App a new improved toolbar. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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
Index: sky/sdk/lib/framework/components2/icon.dart
diff --git a/sky/sdk/lib/framework/components2/icon.dart b/sky/sdk/lib/framework/components2/icon.dart
index 460ad8a7333c8f0fda4c55011e50451e7507f4ed..08913b05d4a83e9fb9cc397f029fadd7d195660c 100644
--- a/sky/sdk/lib/framework/components2/icon.dart
+++ b/sky/sdk/lib/framework/components2/icon.dart
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+import 'dart:sky' as sky;
import '../fn2.dart';
+import '../rendering/box.dart';
// TODO(eseidel): This should use package:.
const String kAssetBase = '/packages/sky/assets/material-design-icons';
@@ -25,8 +27,12 @@ class Icon extends Component {
category = parts[0];
subtype = parts[1];
}
-
- return new Image(width: size, height: size,
- src: '${kAssetBase}/${category}/2x_web/ic_${subtype}_${size}dp.png');
+ // TODO(jackson): Use a real image.
+ return new Container(
+ desiredSize: new sky.Size(size.toDouble(), size.toDouble()),
+ decoration: new BoxDecoration(backgroundColor: 0xFFFF0000)
+ );
+ // return new Image(width: size, height: size,
+ // src: '${kAssetBase}/${category}/2x_web/ic_${subtype}_${size}dp.png');
}
}

Powered by Google App Engine
This is Rietveld 408576698