mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fixes tests, logic, and analyzer warnings due to recent checkins.
- Fix the expectations file for stocks, since floating action button changed how it was being drawn. - Fix edges theme data to not use a rounded rect path for canvas material. - Add debugging hooks for TextStyle, and fix a warning. TBR=eseidel Review URL: https://codereview.chromium.org/1187483003.
This commit is contained in:
parent
dd1df9f5ed
commit
be5a2f8bc5
@ -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';
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
enum MaterialEdge { canvas, card, circle }
|
||||
|
||||
const Map<MaterialEdge, double> edges = const {
|
||||
MaterialEdge.canvas: 0.0,
|
||||
MaterialEdge.canvas: null,
|
||||
MaterialEdge.card: 2.0,
|
||||
MaterialEdge.circle: null,
|
||||
};
|
||||
|
||||
@ -11,11 +11,11 @@ PAINT FOR FRAME #2 ----------------------------------------------
|
||||
2 | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
2 | | paintChild RenderScaffold at Point(0.0, 0.0)
|
||||
2 | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
2 | | | paintChild RenderSizeObserver at Point(0.0, 81.0)
|
||||
2 | | | paintChild RenderDecoratedBox at Point(0.0, 81.0)
|
||||
2 | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
2 | | | | drawRect(Rect.fromLTRB(0.0, 0.0, 800.0, 519.0), Paint(Color(0xfffafafa)))
|
||||
2 | | | | save
|
||||
2 | | | | clipRect(Rect.fromLTRB(0.0, 0.0, 800.0, 519.0))
|
||||
2 | | | | drawRect(Rect.fromLTRB(0.0, 0.0, 800.0, 519.0), Paint(Color(0xffffffff)))
|
||||
2 | | | | save
|
||||
2 | | | | concat([1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0])
|
||||
2 | | | | restore
|
||||
@ -43,7 +43,7 @@ PAINT FOR FRAME #2 ----------------------------------------------
|
||||
2 | | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
2 | | | | | | | paintChild RenderImage at Point(8.0, 8.0)
|
||||
2 | | | | | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
2 | | | paintChild RenderCustomPaint at Point(728.0, 528.0)
|
||||
2 | | | paintChild RenderDecoratedBox at Point(728.0, 528.0)
|
||||
2 | | | | TestDisplayList() constructor: 800.0 x 600.0
|
||||
2 | | | | drawCircle(28.0, 28.0, 28.0, Paint(Color(0xfff44336)))
|
||||
2 | | | | saveLayer(Rect.fromLTRB(0.0, 0.0, 56.0, 56.0), Paint(Color(0xff000000)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user