Make the popup menu animation correct

This CL wires up the opacity of the popup menu items and teaches the popup menu
how to draw its background at the right size.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1175353002.
This commit is contained in:
Adam Barth
2015-06-11 10:09:39 -07:00
parent dcb0fa4312
commit b656316b4b

View File

@@ -32,12 +32,12 @@ class StockArrow extends Component {
UINode build() {
// TODO(jackson): This should change colors with the theme
Color color = _colorForPercentChange(percentChange);
const double size = 40.0;
var arrow = new CustomPaint(callback: (sky.Canvas canvas) {
const double kSize = 40.0;
var arrow = new CustomPaint(callback: (sky.Canvas canvas, Size size) {
Paint paint = new Paint()..color = color;
paint.strokeWidth = 1.0;
var padding = paint.strokeWidth * 3.0;
var r = size / 2.0 - padding;
var r = kSize / 2.0 - padding;
canvas.save();
canvas.translate(padding, padding);
@@ -68,8 +68,8 @@ class StockArrow extends Component {
return new Container(
child: arrow,
width: size,
height: size,
width: kSize,
height: kSize,
margin: const EdgeDims.symmetric(horizontal: 5.0));
}