1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-15 06:52:34 +02:00

Add better community stomt widget loading

Add stomt widget fade in animation
This commit is contained in:
Elias 2018-12-05 13:40:28 +01:00
parent 35942c5e57
commit adc14d1e9d
2 changed files with 57 additions and 10 deletions

View File

@ -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")

View File

@ -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"
}
}
]
}