1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-05 18:42:29 +01:00
ScreenPlay/ScreenPlayUtil/qml/Background.qml
Elias Steurer bb700780ef Move workshop qml files into ScreenPlayWorkshop
Move common qml stuff into ScreenPlayUtil
2022-04-23 14:32:36 +02:00

99 lines
1.8 KiB
QML

import QtQuick
import QtQuick.Controls.Material
import Qt5Compat.GraphicalEffects
import QtQuick.Particles
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
}
}
]
}