@@ -44,18 +44,26 @@ Showable {
4444
4545 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
4646 // use its own values. Need to ask design about this.
47− showAnimation: StandardAnimation {
48− property: "height"
49− to: openedHeight
50− duration: UbuntuAnimation.BriskDuration
51− easing.type: Easing.OutCubic
47+ showAnimation: SequentialAnimation {
48+ StandardAnimation {
49+ property: "height"
50+ to: openedHeight
51+ duration: UbuntuAnimation.BriskDuration
52+ easing.type: Easing.OutCubic
53+ }
54+ // set binding in case units.gu changes while menu open, so height correctly adjusted to fit
55+ ScriptAction { script: root.height = Qt.binding( function(){ return root.openedHeight; } ) }
5256 }
5357
54− hideAnimation: StandardAnimation {
55− property: "height"
56− to: minimizedPanelHeight
57− duration: UbuntuAnimation.BriskDuration
58− easing.type: Easing.OutCubic
58+ hideAnimation: SequentialAnimation {
59+ StandardAnimation {
60+ property: "height"
61+ to: minimizedPanelHeight
62+ duration: UbuntuAnimation.BriskDuration
63+ easing.type: Easing.OutCubic
64+ }
65+ // set binding in case units.gu changes while menu closed, so menu adjusts to fit
66+ ScriptAction { script: root.height = Qt.binding( function(){ return root.minimizedPanelHeight; } ) }
5967 }
6068
6169 height: minimizedPanelHeight