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

Unified Diff: sky/sdk/lib/framework/fn2.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/fn2.dart
diff --git a/sky/sdk/lib/framework/fn2.dart b/sky/sdk/lib/framework/fn2.dart
index d1f66af23f4da7a43803207fed3b71cfa5c69dac..427f58b47c82e416863c54e292ca106e3f27f14c 100644
--- a/sky/sdk/lib/framework/fn2.dart
+++ b/sky/sdk/lib/framework/fn2.dart
@@ -577,7 +577,7 @@ class BlockContainer extends OneChildListRenderNodeWrapper {
class Paragraph extends RenderNodeWrapper {
RenderParagraph root;
- RenderParagraph createNode() => new RenderParagraph(text);
+ RenderParagraph createNode() => new RenderParagraph(text: text);
final String text;
@@ -926,40 +926,3 @@ class Text extends Component {
bool get interchangeable => true;
UINode build() => new Paragraph(text: data);
}
-
-
-// for now, but only for now:
-
-class RenderSolidColor extends RenderDecoratedBox {
- final sky.Size desiredSize;
- final int backgroundColor;
-
- RenderSolidColor(int backgroundColor, { this.desiredSize })
- : backgroundColor = backgroundColor,
- super(decoration: new BoxDecoration(backgroundColor: backgroundColor));
-
- sky.Size getIntrinsicDimensions(BoxConstraints constraints) {
- return constraints.constrain(desiredSize);
- }
-
- void performLayout() {
- size = constraints.constrain(desiredSize);
- }
-
- void handlePointer(sky.PointerEvent event) {
- if (event.type == 'pointerdown')
- decoration = new BoxDecoration(backgroundColor: 0xFFFF0000);
- else if (event.type == 'pointerup')
- decoration = new BoxDecoration(backgroundColor: backgroundColor);
- }
-}
-
-class Rectangle extends RenderNodeWrapper {
- RenderSolidColor root;
- RenderSolidColor createNode() =>
- new RenderSolidColor(color, desiredSize: new sky.Size(40.0, 130.0));
-
- final int color;
-
- Rectangle(this.color, { Object key }) : super(key: key);
-}

Powered by Google App Engine
This is Rietveld 408576698