Prevent RoomEventDelegate startup position glitch
This commit is contained in:
parent
19c69b406a
commit
5ab588f40c
3
TODO.md
3
TODO.md
@ -13,7 +13,9 @@
|
|||||||
- RoomEventsList scrolling when resizing the window
|
- RoomEventsList scrolling when resizing the window
|
||||||
|
|
||||||
- UI
|
- UI
|
||||||
|
- Invite to room
|
||||||
- Accounts delegates background
|
- Accounts delegates background
|
||||||
|
- SidePane delegates hover effect
|
||||||
- Server selection
|
- Server selection
|
||||||
- Register/Forgot? for SignIn dialog
|
- Register/Forgot? for SignIn dialog
|
||||||
- Scaling
|
- Scaling
|
||||||
@ -32,7 +34,6 @@
|
|||||||
- Major features
|
- Major features
|
||||||
- E2E
|
- E2E
|
||||||
- Device verification
|
- Device verification
|
||||||
- Member pane
|
|
||||||
- Edit/delete own devices
|
- Edit/delete own devices
|
||||||
- Request room keys from own other devices
|
- Request room keys from own other devices
|
||||||
- Auto-trust accounts within the same client
|
- Auto-trust accounts within the same client
|
||||||
|
@ -85,6 +85,8 @@ HColumnLayout {
|
|||||||
onActiveViewChanged:
|
onActiveViewChanged:
|
||||||
activeView ? restoreAnimation.start() : hideAnimation.start()
|
activeView ? restoreAnimation.start() : hideAnimation.start()
|
||||||
|
|
||||||
|
property bool wasHiddenOnce: false
|
||||||
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
id: hideAnimation
|
id: hideAnimation
|
||||||
target: roomSidePane
|
target: roomSidePane
|
||||||
@ -92,7 +94,9 @@ HColumnLayout {
|
|||||||
duration: HStyle.animationDuration
|
duration: HStyle.animationDuration
|
||||||
from: target.width
|
from: target.width
|
||||||
to: 0
|
to: 0
|
||||||
|
|
||||||
onStarted: {
|
onStarted: {
|
||||||
|
target.wasHiddenOnce = true
|
||||||
target.oldWidth = target.width
|
target.oldWidth = target.width
|
||||||
target.Layout.minimumWidth = 0
|
target.Layout.minimumWidth = 0
|
||||||
}
|
}
|
||||||
@ -105,6 +109,10 @@ HColumnLayout {
|
|||||||
duration: HStyle.animationDuration
|
duration: HStyle.animationDuration
|
||||||
from: 0
|
from: 0
|
||||||
to: target.oldWidth
|
to: target.oldWidth
|
||||||
|
|
||||||
|
// Prevent RoomEventDelegate positions glitch on startup
|
||||||
|
onStarted: if (! target.wasHiddenOnce) { complete() }
|
||||||
|
|
||||||
onStopped: target.Layout.minimumWidth = Qt.binding(
|
onStopped: target.Layout.minimumWidth = Qt.binding(
|
||||||
function() { return HStyle.avatar.size }
|
function() { return HStyle.avatar.size }
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user