Commit 2bc982d6 authored by Adam Barth's avatar Adam Barth

Position the popup menu in stocks2 correctly

This CL pulled an implementation of position: absolute in RenderStackContainer.

R=eseidel@chromium.org, ianh@google.com

Review URL: https://codereview.chromium.org/1166363002.
parent e158527d
...@@ -8,11 +8,6 @@ import 'package:sky/framework/components2/checkbox.dart'; ...@@ -8,11 +8,6 @@ import 'package:sky/framework/components2/checkbox.dart';
import 'package:sky/framework/theme/view_configuration.dart'; import 'package:sky/framework/theme/view_configuration.dart';
class StockMenu extends Component { class StockMenu extends Component {
// static final Style _style = new Style('''
// position: absolute;
// right: 8px;
// top: ${8 + kStatusBarHeight}px;''');
PopupMenuController controller; PopupMenuController controller;
StockMenu({Object key, this.controller, this.autorefresh: false, this.onAutorefreshChanged}) : super(key: key); StockMenu({Object key, this.controller, this.autorefresh: false, this.onAutorefreshChanged}) : super(key: key);
...@@ -26,7 +21,8 @@ class StockMenu extends Component { ...@@ -26,7 +21,8 @@ class StockMenu extends Component {
onChanged: this.onAutorefreshChanged onChanged: this.onAutorefreshChanged
); );
return new PopupMenu( return new StackPositionedChild(
new PopupMenu(
controller: controller, controller: controller,
items: [ items: [
[new Text('Add stock')], [new Text('Add stock')],
...@@ -34,6 +30,9 @@ class StockMenu extends Component { ...@@ -34,6 +30,9 @@ class StockMenu extends Component {
// [new FlexExpandingChild(new Text('Autorefresh')), checkbox], // [new FlexExpandingChild(new Text('Autorefresh')), checkbox],
], ],
level: 4 level: 4
),
right: 8.0,
top: 8.0 + kStatusBarHeight
); );
} }
} }
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