From adc14d1e9d2283be1088b25864b811d04198f238 Mon Sep 17 00:00:00 2001 From: Elias Date: Wed, 5 Dec 2018 13:40:28 +0100 Subject: [PATCH] Add better community stomt widget loading Add stomt widget fade in animation --- ScreenPlay/qml/Community/Community.qml | 23 +++++++++++--- ScreenPlay/qml/Community/Feedback.qml | 44 +++++++++++++++++++++++--- 2 files changed, 57 insertions(+), 10 deletions(-) diff --git a/ScreenPlay/qml/Community/Community.qml b/ScreenPlay/qml/Community/Community.qml index 62526647..f9bb7101 100644 --- a/ScreenPlay/qml/Community/Community.qml +++ b/ScreenPlay/qml/Community/Community.qml @@ -74,17 +74,30 @@ Item { } } - Feedback { - id: feedback + Component { + id: component_feedback + Feedback { + id: feedback + anchors.fill: parent + } + } + Loader { + id: loader_feedback height: 236 width: 420 anchors { top: txtStomtDescription.bottom - topMargin: 0 horizontalCenter: parent.horizontalCenter } } + Timer { + interval: 500; running: true; repeat: false + onTriggered:loader_feedback.sourceComponent = component_feedback + + } + + Button { id: btnStomt text: qsTr("Open ScreenPlay Stomt page") @@ -338,7 +351,7 @@ Item { onClicked: Qt.openUrlExternally("https://screen-play.app/index.php/blog") } Button { - text: qsTr("Github") + text: qsTr("Source Code") Material.background: Material.Orange Material.foreground: "white" @@ -346,7 +359,7 @@ Item { icon.color: "white" icon.width: 16 icon.height: 16 - onClicked: Qt.openUrlExternally("https://github.com/Aimber/") + onClicked: Qt.openUrlExternally("https://gitlab.com/aimber/ScreenPlay/") } Button { text: qsTr("Workshop") diff --git a/ScreenPlay/qml/Community/Feedback.qml b/ScreenPlay/qml/Community/Feedback.qml index da108723..a7ed3199 100644 --- a/ScreenPlay/qml/Community/Feedback.qml +++ b/ScreenPlay/qml/Community/Feedback.qml @@ -2,12 +2,16 @@ import QtQuick 2.9 import com.stomt.qmlSDK 1.0 Item { + id: feedback height: 236 width: 420 + state: "out" + StomtWidget { - id:stomtWidget + id: stomtWidget + anchors { - top:parent.top + top: parent.top topMargin: 30 horizontalCenter: parent.horizontalCenter } @@ -15,8 +19,38 @@ Item { appKey: "C1IfJAruqWFdkM8e7BMPK3dx1" targetDisplayName: "ScreenPlay" targetImageUrl: "qrc:/assets/images/ScreenPlayIconStomt.png" - + Component.onCompleted: feedback.state = "in" } + + states: [ + State { + name: "out" + + PropertyChanges { + target: stomtWidget + opacity: 0 + anchors.topMargin: 100 + } + }, + State { + name: "in" + PropertyChanges { + target: stomtWidget + opacity: 1 + anchors.topMargin: 30 + } + } + ] + transitions: [ + Transition { + from: "out" + to: "in" + PropertyAnimation { + target: stomtWidget + duration: 300 + easing.type: Easing.InOutQuart + properties: "opacity,anchors.topMargin" + } + } + ] } - -