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

Unified Diff: sky/examples/lib/solid_color_box.dart

Issue 1167293003: Split getIntrinsicDimensions into four pieces (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
Index: sky/examples/lib/solid_color_box.dart
diff --git a/sky/examples/lib/solid_color_box.dart b/sky/examples/lib/solid_color_box.dart
index 4608f4b6b334d766e8f026c92fa315e946ca7dc0..f39f8f54d78e9d9ee904e15d81bb827bb8695fa6 100644
--- a/sky/examples/lib/solid_color_box.dart
+++ b/sky/examples/lib/solid_color_box.dart
@@ -13,8 +13,20 @@ class RenderSolidColorBox extends RenderDecoratedBox {
: backgroundColor = backgroundColor,
super(decoration: new BoxDecoration(backgroundColor: backgroundColor));
- Size getIntrinsicDimensions(BoxConstraints constraints) {
- return constraints.constrain(desiredSize);
+ double getMinIntrinsicWidth(BoxConstraints constraints) {
Hixie 2015/06/08 21:35:32 this seems wrong.
+ return constraints.constrain(desiredSize.width);
+ }
+
+ double getMaxIntrinsicWidth(BoxConstraints constraints) {
+ return constraints.constrain(desiredSize.width);
+ }
+
+ double getMinIntrinsicHeight(BoxConstraints constraints) {
+ return constraints.constrain(desiredSize.height);
+ }
+
+ double getMaxIntrinsicHeight(BoxConstraints constraints) {
+ return constraints.constrain(desiredSize.height);
}
void performLayout() {
« no previous file with comments | « no previous file | sky/sdk/lib/framework/rendering/block.dart » ('j') | sky/sdk/lib/framework/rendering/block.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698