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

Side by Side Diff: sky/sdk/lib/framework/rendering/box.dart

Issue 1179713004: Material and RaisedButton. (Closed) Base URL: https://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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:math' as math; 5 import 'dart:math' as math;
6 import 'dart:sky' as sky; 6 import 'dart:sky' as sky;
7 import 'object.dart'; 7 import 'object.dart';
8 import '../painting/box_painter.dart'; 8 import '../painting/box_painter.dart';
9 import 'package:vector_math/vector_math.dart'; 9 import 'package:vector_math/vector_math.dart';
10 import 'package:sky/framework/net/image_cache.dart' as image_cache; 10 import 'package:sky/framework/net/image_cache.dart' as image_cache;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 return value; 46 return value;
47 } 47 }
48 String toString() => "EdgeDims($top, $right, $bottom, $left)"; 48 String toString() => "EdgeDims($top, $right, $bottom, $left)";
49 } 49 }
50 50
51 class BoxConstraints { 51 class BoxConstraints {
52 const BoxConstraints({ 52 const BoxConstraints({
53 this.minWidth: 0.0, 53 this.minWidth: 0.0,
54 this.maxWidth: double.INFINITY, 54 this.maxWidth: double.INFINITY,
55 this.minHeight: 0.0, 55 this.minHeight: 0.0,
56 this.maxHeight: double.INFINITY}); 56 this.maxHeight: double.INFINITY
57 });
57 58
58 BoxConstraints.tight(Size size) 59 BoxConstraints.tight(Size size)
59 : minWidth = size.width, 60 : minWidth = size.width,
60 maxWidth = size.width, 61 maxWidth = size.width,
61 minHeight = size.height, 62 minHeight = size.height,
62 maxHeight = size.height; 63 maxHeight = size.height;
63 64
64 BoxConstraints.loose(Size size) 65 BoxConstraints.loose(Size size)
65 : minWidth = 0.0, 66 : minWidth = 0.0,
66 maxWidth = size.width, 67 maxWidth = size.width,
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 945
945 void defaultPaint(RenderObjectDisplayList canvas) { 946 void defaultPaint(RenderObjectDisplayList canvas) {
946 RenderBox child = firstChild; 947 RenderBox child = firstChild;
947 while (child != null) { 948 while (child != null) {
948 assert(child.parentData is ParentDataType); 949 assert(child.parentData is ParentDataType);
949 canvas.paintChild(child, child.parentData.position); 950 canvas.paintChild(child, child.parentData.position);
950 child = child.parentData.nextSibling; 951 child = child.parentData.nextSibling;
951 } 952 }
952 } 953 }
953 } 954 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698