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

Unified Diff: samples/swarm/swarm_ui_lib/layout/ViewLayout.dart

Issue 11748016: Make ~/, round, ceil, floor, truncate return ints. Remove toInt. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Checked mode fixes. Created 7 years, 12 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: samples/swarm/swarm_ui_lib/layout/ViewLayout.dart
diff --git a/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart b/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart
index 4b60138752b86a4e8412c739118fe97b513440ac..973e23c603818e73c7754db291af2733a80f76c9 100644
--- a/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart
+++ b/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart
@@ -229,7 +229,7 @@ class ViewLayout {
}
if (style.endsWith('%')) {
num percent = double.parse(style.substring(0, style.length - 1));
- return ((percent / 100) * parentSize).toInt();
+ return ((percent / 100) * parentSize).truncate();
}
return _toPixels(style);
}

Powered by Google App Engine
This is Rietveld 408576698