fix activity processor
All checks were successful
buildbot/DocsGenerator Build finished.
buildbot/LinuxCMakeBuilderQt6 Build finished.

This commit is contained in:
Andrei Yankovich 2025-02-19 16:04:15 +01:00
parent 13a97d860c
commit 7dc8e89946

View File

@ -16,6 +16,7 @@ Pane {
property alias initialItem: stackView.initialItem property alias initialItem: stackView.initialItem
property alias currentItem: stackView.currentItem property alias currentItem: stackView.currentItem
property alias titlesAligh: headerView.titlesAligh property alias titlesAligh: headerView.titlesAligh
property alias depth: stackView.depth
property bool cache: true property bool cache: true
property bool enableHeader: true property bool enableHeader: true
@ -52,93 +53,94 @@ Pane {
} }
contentItem: StackView { contentItem: StackView {
Connections { id: stackView
target: (stackView.currentItem && stackView.currentItem.finish)? stackView.currentItem : null
function onFinish() { Connections {
root.popItem() target: (stackView.currentItem && stackView.currentItem.finish)? stackView.currentItem : null
}
function onFinish() {
root.popItem()
} }
}
padding: 0 padding: 0
id: stackView
implicitWidth: (stackView.currentItem)? stackView.currentItem.implicitWidth: 0 implicitWidth: (stackView.currentItem)? stackView.currentItem.implicitWidth: 0
implicitHeight: (stackView.currentItem)? stackView.currentItem.implicitHeight: 0 implicitHeight: (stackView.currentItem)? stackView.currentItem.implicitHeight: 0
property int durationAnimation: 400 property int durationAnimation: 400
popEnter: Transition { popEnter: Transition {
ParallelAnimation { ParallelAnimation {
NumberAnimation { NumberAnimation {
properties: "opacity" properties: "opacity"
from: 0 from: 0
to: 1 to: 1
duration: stackView.durationAnimation duration: stackView.durationAnimation
}
NumberAnimation {
properties: "x"
from: (stackView.mirrored ? -1 : 1) * -stackView.width
to: 0
duration: stackView.durationAnimation
easing.type: Easing.OutCubic
}
} }
} NumberAnimation {
properties: "x"
popExit: Transition { from: (stackView.mirrored ? -1 : 1) * -stackView.width
ParallelAnimation { to: 0
NumberAnimation { duration: stackView.durationAnimation
properties: "opacity" easing.type: Easing.OutCubic
from: 1
to: 0
duration: stackView.durationAnimation / 2
}
NumberAnimation {
properties: "x"
from: 0
to: (stackView.mirrored ? -1 : 1) * stackView.width
duration: stackView.durationAnimation
easing.type: Easing.OutCubic
}
}
}
pushEnter: Transition {
ParallelAnimation {
NumberAnimation {
properties: "opacity"
from: 0
to: 1
duration: stackView.durationAnimation
}
NumberAnimation {
properties: "x"
from: (stackView.mirrored ? -1 : 1) * stackView.width
to: 0
duration: stackView.durationAnimation
easing.type: Easing.OutCubic
}
}
}
pushExit: Transition {
ParallelAnimation {
NumberAnimation {
properties: "opacity"
from: 1
to: 0
duration: stackView.durationAnimation / 2
}
NumberAnimation {
properties: "x"
from: 0
to: (stackView.mirrored ? -1 : 1) * -stackView.width
duration: stackView.durationAnimation
easing.type: Easing.OutCubic
}
} }
} }
} }
popExit: Transition {
ParallelAnimation {
NumberAnimation {
properties: "opacity"
from: 1
to: 0
duration: stackView.durationAnimation / 2
}
NumberAnimation {
properties: "x"
from: 0
to: (stackView.mirrored ? -1 : 1) * stackView.width
duration: stackView.durationAnimation
easing.type: Easing.OutCubic
}
}
}
pushEnter: Transition {
ParallelAnimation {
NumberAnimation {
properties: "opacity"
from: 0
to: 1
duration: stackView.durationAnimation
}
NumberAnimation {
properties: "x"
from: (stackView.mirrored ? -1 : 1) * stackView.width
to: 0
duration: stackView.durationAnimation
easing.type: Easing.OutCubic
}
}
}
pushExit: Transition {
ParallelAnimation {
NumberAnimation {
properties: "opacity"
from: 1
to: 0
duration: stackView.durationAnimation / 2
}
NumberAnimation {
properties: "x"
from: 0
to: (stackView.mirrored ? -1 : 1) * -stackView.width
duration: stackView.durationAnimation
easing.type: Easing.OutCubic
}
}
}
}
} }
// create new activity from component with model activityModel, after drop this activity will be called callback function // create new activity from component with model activityModel, after drop this activity will be called callback function