Commit b656316b authored by Adam Barth's avatar Adam Barth

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.
parent dcb0fa43
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment