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

@ -33,6 +33,7 @@
- Reducable room sidepane, swipe to show full-window
- Fixes
- Quickly posting with another account leads to sync stop
- CPU usage
- `code` not colored in room subtitle
- In the "Leave me" room, "join > Hi > left" aren't combined

View File

@ -6,7 +6,7 @@ aiofiles >= 0.4.0, < 0.5
appdirs >= 1.4.3, < 2
filetype >= 1.0.5, < 2
html_sanitizer >= 1.7.3, < 2
lxml >= 4.4.1, < 5
lxml >= 4.4.2, < 5
mistune >= 0.8.4, < 0.9
dataclasses >= 0.6, < 0.7; python_version < "3.7"
pyfastcopy >= 1.0.3, < 2; python_version < "3.8"

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 }
}
}