@@ -43,18 +43,28 @@ Showable {
4343
4444 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
4545 // use its own values. Need to ask design about this.
46− showAnimation: StandardAnimation {
47− property: "height"
48− to: openedHeight
49− duration: UbuntuAnimation.BriskDuration
50− easing.type: Easing.OutCubic
46+ showAnimation: SequentialAnimation {
47+ StandardAnimation {
48+ target: root
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; } ) }
5156 }
5257
53− hideAnimation: StandardAnimation {
54− property: "height"
55− to: minimizedPanelHeight
56− duration: UbuntuAnimation.BriskDuration
57− easing.type: Easing.OutCubic
58+ hideAnimation: SequentialAnimation {
59+ StandardAnimation {
60+ target: root
61+ property: "height"
62+ to: minimizedPanelHeight
63+ duration: UbuntuAnimation.BriskDuration
64+ easing.type: Easing.OutCubic
65+ }
66+ // set binding in case units.gu changes while menu closed, so menu adjusts to fit
67+ ScriptAction { script: root.height = Qt.binding( function(){ return root.minimizedPanelHeight; } ) }
5868 }
5969
6070 height: minimizedPanelHeight