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

Unified Diff: sky/sdk/lib/framework/components2/scaffold.dart

Issue 1171173003: Right-size the toolbar (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Updated per review feedback 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
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/tool_bar.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..355987db610453716f2b27246504f60390d25a08 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)));
+ double toolbarHeight = kToolBarHeight + kNotificationAreaHeight;
+ toolbar.layout(new BoxConstraints.tight(new Size(size.width, toolbarHeight)));
assert(toolbar.parentData is BoxParentData);
toolbar.parentData.position = Point.origin;
- bodyPosition = kToolbarHeight;
- bodyHeight -= kToolbarHeight;
+ bodyPosition += toolbarHeight;
+ bodyHeight -= toolbarHeight;
}
if (_slots[ScaffoldSlots.statusBar] != null) {
RenderBox statusbar = _slots[ScaffoldSlots.statusBar];
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/tool_bar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698