Don't use Animators for ListView transitions
They're buggy
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Optional
|
||||
|
||||
import nio
|
||||
|
||||
|
@@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user