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/rendering/paragraph.dart

Issue 1187483003: Fix the expectations file for stocks, since floating action button changed how it was being drawn. (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
« no previous file with comments | « no previous file | sky/sdk/lib/framework/theme2/edges.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/rendering/paragraph.dart
diff --git a/sky/sdk/lib/framework/rendering/paragraph.dart b/sky/sdk/lib/framework/rendering/paragraph.dart
index c4b9a88727e67b25385a43a4841e2550a8e7f7bb..16caee3a9d99b5ef995d21a043bd51961bdbe8e1 100644
--- a/sky/sdk/lib/framework/rendering/paragraph.dart
+++ b/sky/sdk/lib/framework/rendering/paragraph.dart
@@ -67,6 +67,21 @@ class TextStyle {
value = 37 * value + textAlign.hashCode;
return value;
}
+
+ String toString([String prefix = '']) {
+ List<String> result = [];
+ if (color != null)
+ result.add('${prefix}color: $color');
+ if (fontSize != null)
+ result.add('${prefix}fontSize: $fontSize');
+ if (fontWeight != null)
+ result.add('${prefix}fontWeight: fontWeight');
+ if (textAlign != null)
+ result.add('${prefix}textAlign: textAlign');
+ if (result.isEmpty)
+ return '${prefix}<no style specified>';
+ return result.join('\n');
+ }
}
// Unfortunately, using full precision floating point here causes bad layouts
@@ -196,5 +211,5 @@ class RenderParagraph extends RenderBox {
// we should probably expose a way to do precise (inter-glpyh) hit testing
- String debugDescribeSettings(String prefix) => '${super.debugDescribeSettings(prefix)}${prefix}color: ${color}\n${prefix}text: ${text}\n';
+ String debugDescribeSettings(String prefix) => '${super.debugDescribeSettings(prefix)}${prefix}style:\n${style.toString("$prefix ")}\n${prefix}text: ${text}\n';
}
« no previous file with comments | « no previous file | sky/sdk/lib/framework/theme2/edges.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698