Prevent RoomEventDelegate startup position glitch
This commit is contained in:
@@ -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 }
|
||||
)
|
||||
|
Reference in New Issue
Block a user