1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-14 22:42:34 +02:00
ScreenPlay/ScreenPlayUtil/qml/Background.qml
2023-02-02 15:25:26 +01:00

93 lines
1.8 KiB
QML

import QtQuick
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
Rectangle {
id: element
anchors.fill: parent
color: Material.theme === Material.Light ? "white" : Qt.darker(Material.background)
state: "init"
Rectangle {
id: bgCommunity
anchors.fill: parent
}
Rectangle {
id: bgWorkshop
color: "#161C1D"
anchors.fill: parent
}
states: [
State {
name: "init"
PropertyChanges {
target: bgCommunity
opacity: 0
}
PropertyChanges {
target: bgWorkshop
opacity: 0
}
},
State {
name: "create"
PropertyChanges {
target: bgCommunity
opacity: 0
}
PropertyChanges {
target: bgWorkshop
opacity: 0
}
},
State {
name: "community"
PropertyChanges {
target: bgCommunity
opacity: 1
}
PropertyChanges {
target: bgWorkshop
opacity: 0
}
},
State {
name: "workshop"
PropertyChanges {
target: bgCommunity
opacity: 0
}
PropertyChanges {
target: bgWorkshop
opacity: 1
}
}
]
transitions: [
Transition {
from: "*"
to: "*"
PropertyAnimation {
targets: [bgCommunity, bgWorkshop]
property: "opacity"
duration: 400
easing.type: Easing.InOutQuart
}
}
]
}