Don't use Animators for ListView transitions

They're buggy
This commit is contained in:
miruka
2019-12-01 11:24:20 -04:00
parent 9e9737d8ad
commit 3e214dc26b
4 changed files with 8 additions and 13 deletions

View File

@@ -1,5 +1,4 @@
from dataclasses import dataclass, field
from typing import Optional
import nio

View File

@@ -29,30 +29,25 @@ ListView {
visible: listView.interactive || ! listView.enableFlicking
}
// FIXME: HOpacityAnimator creates flickering
add: Transition {
ParallelAnimation {
HNumberAnimation { property: "opacity"; from: 0; to: 1 }
HXAnimator { from: 100 }
HYAnimator { from: 100 }
HNumberAnimation { property: "opacity"; from: 0; to: 1 }
HNumberAnimation { properties: "x,y"; from: 100 }
}
}
move: Transition {
ParallelAnimation {
// Ensure opacity goes to 1 if add/remove transition is interrupted
HNumberAnimation { property: "opacity"; to: 1 }
HXAnimator {}
HYAnimator {}
HNumberAnimation { property: "opacity"; to: 1 }
HNumberAnimation { properties: "x,y" }
}
}
remove: Transition {
ParallelAnimation {
HNumberAnimation { property: "opacity"; to: 0 }
HXAnimator { to: 100 }
HYAnimator { to: 100 }
HNumberAnimation { property: "opacity"; to: 0 }
HNumberAnimation { properties: "x,y"; to: 100 }
}
}