on xenial help sign in
As per design-request an alert-state change should animate contentY-change triggered by positionViewAtIndex() method.
c93a6f7Mirco Müller
qml/Launcher/LauncherPanel.qml+20−1
@@ -124,6 +124,12 @@ Rectangle {
124 // need to be smaller than this size to avoid breakage.
124 // need to be smaller than this size to avoid breakage.
125 property int extensionSize: 0
125 property int extensionSize: 0
126
126
127+ QtObject {
128+ id: priv
129+ property real moveToIndexYFrom
130+ property real moveToIndexYTo
131+ }
132+
127 // Setting extensionSize after the list has been populated because it has
133 // Setting extensionSize after the list has been populated because it has
128 // the potential to mess up with the intial positioning in combination
134 // the potential to mess up with the intial positioning in combination
129 // with snapping to the center of the list. This catches all the cases
135 // with snapping to the center of the list. This catches all the cases
@@ -137,6 +143,14 @@ Rectangle {
137 flick(0, clickFlickSpeed)
143 flick(0, clickFlickSpeed)
138 }
144 }
139
145
146+ UbuntuNumberAnimation {
147+ id: moveToIndexAnimation
148+ target: launcherListView
149+ property: "contentY"
150+ from: priv.moveToIndexYFrom
151+ to: priv.moveToIndexYTo
152+ }
153+
140 function peeking(peek) {
154 function peeking(peek) {
141 if (peekingIndex === -1) {
155 if (peekingIndex === -1) {
142 peekingIndex = peek
156 peekingIndex = peek
@@ -153,7 +167,12 @@ Rectangle {
153 if (peekingIndex !== -1) {
167 if (peekingIndex !== -1) {
154 panel.visible = true
168 panel.visible = true
155 launcherListViewItem.clip = false
169 launcherListViewItem.clip = false
170+ if (!dragging) {
171+ priv.moveToIndexYFrom = contentY
156− positionViewAtIndex(peekingIndex, ListView.Center)
172+ positionViewAtIndex(peekingIndex, ListView.Center)
173+ priv.moveToIndexYTo = contentY
174+ moveToIndexAnimation.start()
175+ }
157 } else {
176 } else {
158 launcherListViewItem.clip = true
177 launcherListViewItem.clip = true
159 }
178 }