on xenial help sign in
Some amendments to the state/transitions.
commitf784f7b04805f60ffc7b42a5a0aaf4e4087bb2fb authorNicolas d'Offay <nicolas.doffay@canonical.com> dateWed 2 Oct 2013, 15:07 (13 years ago) parentacc5b0c
1 file changed+13−8
Components/PageHeader.qml+13−8
Components/PageHeader.qml+13−8
@@ -207,25 +207,30 @@ Item {
207207 when: scope.searchInProgress && searchField.text !== ""
208208 PropertyChanges { target: searchIndicator; running: true; opacity: 1 }
209209 PropertyChanges { target: primaryImage; opacity: 0 }
210− }, State {
210+ },
211+ State {
211212 name: "idle"
212− PropertyChanges { target: searchIndicator; running: true; opacity: 1 }
213− PropertyChanges { target: primaryImage; opacity: 0 }
213+ when: !scope.searchInProgress || searchField.text === ""
214+ PropertyChanges { target: searchIndicator; running: false; opacity: 0 }
215+ PropertyChanges { target: primaryImage; opacity: 1 }
214216 }
215217 ]
216218
217219 transitions: [
218220 Transition {
221+ from: "idle"
219222 to: "searching"
220223 SequentialAnimation {
221− NumberAnimation { targets: primaryImage; property: opacity; duration: UbuntuAnimation.SlowDuration; easing.type: Easing.Linear }
222− NumberAnimation { targets: searchIndicator; property: opacity; duration: UbuntuAnimation.SlowDuration; easing.type: Easing.Linear }
224+ NumberAnimation { target: primaryImage; property: opacity; duration: UbuntuAnimation.SlowDuration; easing.type: Easing.Linear }
225+ NumberAnimation { target: searchIndicator; property: opacity; duration: UbuntuAnimation.SlowDuration; easing.type: Easing.Linear }
223226 }
224− }, Transition {
227+ },
228+ Transition {
229+ from: "searching"
225230 to: "idle"
226231 SequentialAnimation {
227− NumberAnimation { targets: searchIndicator; property: opacity; duration: UbuntuAnimation.SlowDuration; easing.type: Easing.Linear }
228− NumberAnimation { targets: primaryImage; property: opacity; duration: UbuntuAnimation.SlowDuration; easing.type: Easing.Linear }
232+ NumberAnimation { target: searchIndicator; property: opacity; duration: UbuntuAnimation.SlowDuration; easing.type: Easing.Linear }
233+ NumberAnimation { target: primaryImage; property: opacity; duration: UbuntuAnimation.SlowDuration; easing.type: Easing.Linear }
229234 }
230235 }
231236 ]