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

Unified Diff: samples/swarm/swarm_ui_lib/view/MeasureText.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « samples/swarm/swarm_ui_lib/view/CompositeView.dart ('k') | samples/swarm/swarm_ui_lib/view/view.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/swarm_ui_lib/view/MeasureText.dart
diff --git a/samples/swarm/swarm_ui_lib/view/MeasureText.dart b/samples/swarm/swarm_ui_lib/view/MeasureText.dart
index d3c40077e01133a8f018f9a18789b77054a4a0b1..3cc1970ab801eb58332b04a05c5d3eca937436f2 100644
--- a/samples/swarm/swarm_ui_lib/view/MeasureText.dart
+++ b/samples/swarm/swarm_ui_lib/view/MeasureText.dart
@@ -45,7 +45,7 @@ class MeasureText {
}
String quickTruncate(String text, num lineWidth, int maxLines) {
- int targetLength = (lineWidth * maxLines / _typicalCharLength).toInt();
+ int targetLength = lineWidth * maxLines ~/ _typicalCharLength;
// Advance to next word break point.
while(targetLength < text.length && !isWhitespace(text[targetLength])) {
targetLength++;
« no previous file with comments | « samples/swarm/swarm_ui_lib/view/CompositeView.dart ('k') | samples/swarm/swarm_ui_lib/view/view.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698