summaryrefslogtreecommitdiffstats
path: root/basicsuite/qt5-cinematicdemo/content/Background.qml
diff options
context:
space:
mode:
authorKalle Viironen <kalle.viironen@digia.com>2014-02-03 13:37:15 +0200
committerKalle Viironen <kalle.viironen@digia.com>2014-02-03 13:39:10 +0200
commit6eca7933f42af800c64d3ee606ee56cb126970e4 (patch)
tree429fe57d992d18cfe9283e5c6ba071dca88c2163 /basicsuite/qt5-cinematicdemo/content/Background.qml
parente80e8e67554708a69d74bab5c22c6644b419eae1 (diff)
parent203ffaab105b1f868689656bfbdfabb7f55b9e56 (diff)
Merge branch 'dev' into stable
Diffstat (limited to 'basicsuite/qt5-cinematicdemo/content/Background.qml')
-rw-r--r--basicsuite/qt5-cinematicdemo/content/Background.qml39
1 files changed, 39 insertions, 0 deletions
diff --git a/basicsuite/qt5-cinematicdemo/content/Background.qml b/basicsuite/qt5-cinematicdemo/content/Background.qml
new file mode 100644
index 0000000..f0225ba
--- /dev/null
+++ b/basicsuite/qt5-cinematicdemo/content/Background.qml
@@ -0,0 +1,39 @@
+import QtQuick 2.0
+import QtQuick.Particles 2.0
+
+Item {
+ id: root
+
+ anchors.fill: parent
+
+ Image {
+ id: backgroundImage
+ anchors.fill: parent
+ source: settings.showColors ? "images/background3.png" : "images/background.png"
+ Behavior on source {
+ SequentialAnimation {
+ NumberAnimation { target: backgroundImage; property: "opacity"; to: 0; duration: 400; easing.type: Easing.InQuad }
+ PropertyAction { target: backgroundImage; property: "source" }
+ NumberAnimation { target: backgroundImage; property: "opacity"; to: 1; duration: 400; easing.type: Easing.OutQuad }
+ }
+ }
+ }
+
+ // Sky stars particles
+ ParticleSystem {
+ width: parent.width
+ height: 220
+ paused: detailsView.isShown || infoView.isShown || !settings.showShootingStarParticles
+ ImageParticle {
+ source: "images/star.png"
+ rotationVariation: 10
+ }
+ Emitter {
+ anchors.fill: parent
+ emitRate: 4
+ lifeSpan: 5000
+ size: 48
+ sizeVariation: 16
+ }
+ }
+}