1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00
ScreenPlay/ScreenPlayWorkshop/qml/SteamWorkshop.qml

93 lines
2.3 KiB
QML
Raw Normal View History

import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Material
2021-07-15 12:07:39 +02:00
import Qt5Compat.GraphicalEffects
import QtQuick.Layouts
import ScreenPlayWorkshop 1.0
import WorkshopEnums 1.0
2021-06-25 12:07:28 +02:00
import "upload/"
Item {
id: root
property Item modalSource
2022-01-16 12:22:57 +01:00
ScreenPlayWorkshop {
id: screenPlayWorkshop
Component.onCompleted: {
if (screenPlayWorkshop.init()) {
stackView.push("qrc:/qml/ScreenPlayWorkshop/qml/SteamWorkshopStartPage.qml", {
"stackView": stackView,
"screenPlayWorkshop": screenPlayWorkshop,
"steamWorkshop": screenPlayWorkshop.steamWorkshop,
2022-01-16 12:22:57 +01:00
"background": background,
// "modalSource": root.modalSource
})
} else {
popupOffline.open()
}
2021-06-25 12:07:28 +02:00
}
}
Background {
id: background
anchors.fill: parent
stackViewDepth: stackView.depth
2021-06-25 12:07:28 +02:00
}
PopupOffline {
id: popupOffline
workshop: screenPlayWorkshop
steam: screenPlayWorkshop.steamWorkshop
2022-01-16 12:22:57 +01:00
modalSource: root.modalSource
2021-06-25 12:07:28 +02:00
}
StackView {
id: stackView
property int duration: 300
2021-06-25 12:07:28 +02:00
Connections {
target: stackView.currentItem
ignoreUnknownSignals: true
function onRequestBack() {
stackView.pop()
2021-06-25 12:07:28 +02:00
}
}
anchors.fill: parent
replaceEnter: Transition {
OpacityAnimator {
from: 0
to: 1
duration: stackView.duration
easing.type: Easing.InOutQuart
2021-06-25 12:07:28 +02:00
}
ScaleAnimator {
from: 0.8
to: 1
duration: stackView.duration
easing.type: Easing.InOutQuart
2021-06-25 12:07:28 +02:00
}
}
replaceExit: Transition {
OpacityAnimator {
from: 1
to: 0
duration: stackView.duration
2021-06-25 12:07:28 +02:00
easing.type: Easing.InOutQuart
}
ScaleAnimator {
from: 1
to: 0.8
duration: stackView.duration
easing.type: Easing.InOutQuart
}
2021-06-25 12:07:28 +02:00
}
}
}