Prevent RoomEventDelegate startup position glitch

This commit is contained in:
miruka 2019-05-17 14:24:03 -04:00
parent 19c69b406a
commit 5ab588f40c
2 changed files with 10 additions and 1 deletions

View File

@ -13,7 +13,9 @@
- RoomEventsList scrolling when resizing the window
- UI
- Invite to room
- Accounts delegates background
- SidePane delegates hover effect
- Server selection
- Register/Forgot? for SignIn dialog
- Scaling
@ -32,7 +34,6 @@
- Major features
- E2E
- Device verification
- Member pane
- Edit/delete own devices
- Request room keys from own other devices
- Auto-trust accounts within the same client

View File

@ -85,6 +85,8 @@ HColumnLayout {
onActiveViewChanged:
activeView ? restoreAnimation.start() : hideAnimation.start()
property bool wasHiddenOnce: false
NumberAnimation {
id: hideAnimation
target: roomSidePane
@ -92,7 +94,9 @@ HColumnLayout {
duration: HStyle.animationDuration
from: target.width
to: 0
onStarted: {
target.wasHiddenOnce = true
target.oldWidth = target.width
target.Layout.minimumWidth = 0
}
@ -105,6 +109,10 @@ HColumnLayout {
duration: HStyle.animationDuration
from: 0
to: target.oldWidth
// Prevent RoomEventDelegate positions glitch on startup
onStarted: if (! target.wasHiddenOnce) { complete() }
onStopped: target.Layout.minimumWidth = Qt.binding(
function() { return HStyle.avatar.size }
)