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

Unified Diff: sky/examples/raw/sector-layout.dart

Issue 1150253005: Replace BoxDimensions with sky.Size (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
« no previous file with comments | « sky/examples/raw/render_paragraph.dart ('k') | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/raw/sector-layout.dart
diff --git a/sky/examples/raw/sector-layout.dart b/sky/examples/raw/sector-layout.dart
index 36ee2af84a083ee7908d121df6289d852f86e35c..ae8b43fdf698a6f8b35e812312abeac8f13f3ac4 100644
--- a/sky/examples/raw/sector-layout.dart
+++ b/sky/examples/raw/sector-layout.dart
@@ -398,16 +398,16 @@ class RenderBoxToRenderSectorAdapter extends RenderBox {
child.parentData = new SectorParentData();
}
- BoxDimensions getIntrinsicDimensions(BoxConstraints constraints) {
+ sky.Size getIntrinsicDimensions(BoxConstraints constraints) {
if (child == null)
- return new BoxDimensions.withConstraints(constraints, width: 0.0, height: 0.0);
+ return constraints.constrain(new sky.Size(0.0, 0.0));
assert(child is RenderSector);
assert(child.parentData is SectorParentData);
assert(!constraints.isInfinite);
double maxChildDeltaRadius = math.min(constraints.maxWidth, constraints.maxHeight) / 2.0 - innerRadius;
SectorDimensions childDimensions = child.getIntrinsicDimensions(new SectorConstraints(maxDeltaRadius: maxChildDeltaRadius), innerRadius);
double dimension = (innerRadius + childDimensions.deltaRadius) * 2.0;
- return new BoxDimensions.withConstraints(constraints, width: dimension, height: dimension);
+ return constraints.constrain(new sky.Size(dimension, dimension));
}
void performLayout() {
« no previous file with comments | « sky/examples/raw/render_paragraph.dart ('k') | sky/sdk/lib/framework/fn2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698