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

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

Issue 1166203002: Rename Container's desiredSize argument to width and height arguments. (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 side-by-side diff with in-line comments
Download patch
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 51fce8024d71cf567a1fcc5b67f706a50ced8fe1..3c4fda8626ccc9b03cdf6450a2440a7ee1d14a1a 100644
--- a/sky/sdk/lib/framework/components2/scaffold.dart
+++ b/sky/sdk/lib/framework/components2/scaffold.dart
@@ -80,8 +80,8 @@ class RenderScaffold extends RenderBox {
static const kToolbarHeight = 100.0;
static const kStatusbarHeight = 50.0;
- static const kButtonX = -16.0; // from right edge of body
- static const kButtonY = -16.0; // from bottom edge of body
+ static const kButtonX = 16.0; // left from right edge of body
+ static const kButtonY = 16.0; // up from bottom edge of body
void performLayout() {
double bodyHeight = size.height;
@@ -115,7 +115,7 @@ class RenderScaffold extends RenderBox {
}
if (_slots[ScaffoldSlots.floatingActionButton] != null) {
RenderBox floatingActionButton = _slots[ScaffoldSlots.floatingActionButton];
- Size area = new Size(size.width + kButtonX, size.height + kButtonY);
+ Size area = new Size(size.width - kButtonX, size.height - kButtonY);
floatingActionButton.layout(new BoxConstraints.loose(area));
assert(floatingActionButton.parentData is BoxParentData);
floatingActionButton.parentData.position = (area - floatingActionButton.size).toPoint();

Powered by Google App Engine
This is Rietveld 408576698