@@ -43,18 +43,28 @@ Showable {
44 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
44 // TODO: Perhaps we need a animation standard for showing/hiding? Each showable seems to
45 // use its own values. Need to ask design about this.
45 // use its own values. Need to ask design about this.
46+ showAnimation: SequentialAnimation {
46− showAnimation: StandardAnimation {
47+ StandardAnimation {
47− property: "height"
49+ property: "height"
48− to: openedHeight
50+ to: openedHeight
49− duration: UbuntuAnimation.BriskDuration
51+ duration: UbuntuAnimation.BriskDuration
50− easing.type: Easing.OutCubic
52+ easing.type: Easing.OutCubic
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; } ) }
58+ hideAnimation: SequentialAnimation {
53− hideAnimation: StandardAnimation {
59+ StandardAnimation {
54− property: "height"
61+ property: "height"
55− to: minimizedPanelHeight
62+ to: minimizedPanelHeight
56− duration: UbuntuAnimation.BriskDuration
63+ duration: UbuntuAnimation.BriskDuration
57− easing.type: Easing.OutCubic
64+ easing.type: Easing.OutCubic
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; } ) }
60 height: minimizedPanelHeight
70 height: minimizedPanelHeight