Don't use HOpacityAnimator in ListView, flickering

This commit is contained in:
miruka 2019-11-30 16:27:34 -04:00
parent df0020e62c
commit 9e9737d8ad
2 changed files with 12 additions and 6 deletions

View File

@ -20,6 +20,7 @@
- Create room tabs brutal size transition - Create room tabs brutal size transition
- Refactoring - Refactoring
- Use `.pragma library` for utils.js
- Room header elide detection - Room header elide detection
- Use HBox for Profile - Use HBox for Profile
- Banners - Banners

View File

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