Chromium Code Reviews| Index: sky/sdk/lib/framework/components2/scaffold.dart |
| diff --git a/sky/sdk/lib/framework/components2/scaffold.dart b/sky/sdk/lib/framework/components2/scaffold.dart |
| index 9ed7ba1ddb929201a08871010aa8275d9c21307a..fb4d5241363116d8e24a512148b87ef3c325b509 100644 |
| --- a/sky/sdk/lib/framework/components2/scaffold.dart |
| +++ b/sky/sdk/lib/framework/components2/scaffold.dart |
| @@ -5,6 +5,7 @@ |
| import '../fn2.dart'; |
| import '../rendering/box.dart'; |
| import '../rendering/object.dart'; |
| +import '../theme2/view_configuration.dart'; |
| enum ScaffoldSlots { |
| toolbar, |
| @@ -78,8 +79,6 @@ class RenderScaffold extends RenderBox { |
| assert(size.height < double.INFINITY); |
| } |
| - static const kToolbarHeight = 100.0; |
| - static const kStatusbarHeight = 50.0; |
| static const kButtonX = 16.0; // left from right edge of body |
| static const kButtonY = 16.0; // up from bottom edge of body |
| @@ -88,11 +87,12 @@ class RenderScaffold extends RenderBox { |
| double bodyPosition = 0.0; |
| if (_slots[ScaffoldSlots.toolbar] != null) { |
| RenderBox toolbar = _slots[ScaffoldSlots.toolbar]; |
| - toolbar.layout(new BoxConstraints.tight(new Size(size.width, kToolbarHeight))); |
| + var toolbarHeight = kToolBarHeight + kNotificationAreaHeight; |
|
Hixie
2015/06/10 17:57:13
double, not var.
hansmuller
2015/06/10 18:06:24
Done.
|
| + toolbar.layout(new BoxConstraints.tight(new Size(size.width, toolbarHeight))); |
| assert(toolbar.parentData is BoxParentData); |
| - toolbar.parentData.position = Point.origin; |
| - bodyPosition = kToolbarHeight; |
| - bodyHeight -= kToolbarHeight; |
| + toolbar.parentData.position = new Point(0.0, bodyPosition); |
|
Hixie
2015/06/10 17:57:13
Go back to Point.origin, unless there's reason to
hansmuller
2015/06/10 18:06:24
Done.
|
| + bodyPosition += toolbarHeight; |
| + bodyHeight -= toolbarHeight; |
| } |
| if (_slots[ScaffoldSlots.statusBar] != null) { |
| RenderBox statusbar = _slots[ScaffoldSlots.statusBar]; |