mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-06 19:12:30 +01:00
90 lines
2.2 KiB
QML
90 lines
2.2 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Controls.Material
|
|
import Qt5Compat.GraphicalEffects
|
|
import QtQuick.Layouts
|
|
import ScreenPlayWorkshop
|
|
import WorkshopEnums
|
|
import "upload/"
|
|
|
|
Item {
|
|
id: root
|
|
|
|
property Item modalSource
|
|
|
|
ScreenPlayWorkshop {
|
|
id: screenPlayWorkshop
|
|
Component.onCompleted: {
|
|
if (screenPlayWorkshop.init()) {
|
|
stackView.push("qrc:/qml/ScreenPlayWorkshop/qml/SteamWorkshopStartPage.qml", {
|
|
"stackView": stackView,
|
|
"screenPlayWorkshop": screenPlayWorkshop,
|
|
"steamWorkshop": screenPlayWorkshop.steamWorkshop,
|
|
"background": background
|
|
});
|
|
} else {
|
|
popupOffline.open();
|
|
}
|
|
}
|
|
}
|
|
|
|
Background {
|
|
id: background
|
|
anchors.fill: parent
|
|
stackViewDepth: stackView.depth
|
|
}
|
|
|
|
PopupOffline {
|
|
id: popupOffline
|
|
workshop: screenPlayWorkshop
|
|
steam: screenPlayWorkshop.steamWorkshop
|
|
modalSource: root.modalSource
|
|
}
|
|
|
|
StackView {
|
|
id: stackView
|
|
property int duration: 300
|
|
|
|
Connections {
|
|
target: stackView.currentItem
|
|
ignoreUnknownSignals: true
|
|
function onRequestBack() {
|
|
stackView.pop();
|
|
}
|
|
}
|
|
|
|
anchors.fill: parent
|
|
replaceEnter: Transition {
|
|
OpacityAnimator {
|
|
from: 0
|
|
to: 1
|
|
duration: stackView.duration
|
|
easing.type: Easing.InOutQuart
|
|
}
|
|
|
|
ScaleAnimator {
|
|
from: 0.8
|
|
to: 1
|
|
duration: stackView.duration
|
|
easing.type: Easing.InOutQuart
|
|
}
|
|
}
|
|
|
|
replaceExit: Transition {
|
|
OpacityAnimator {
|
|
from: 1
|
|
to: 0
|
|
duration: stackView.duration
|
|
easing.type: Easing.InOutQuart
|
|
}
|
|
|
|
ScaleAnimator {
|
|
from: 1
|
|
to: 0.8
|
|
duration: stackView.duration
|
|
easing.type: Easing.InOutQuart
|
|
}
|
|
}
|
|
}
|
|
}
|