mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 16:32:33 +02:00
Add nicer animation
This commit is contained in:
parent
900a07a701
commit
b85b16d3eb
@ -11,7 +11,6 @@ Item {
|
||||
|
||||
property string activeMonitorName: ""
|
||||
|
||||
|
||||
onStateChanged: {
|
||||
bgMouseArea.focus = monitors.state == "active" ? true : false
|
||||
}
|
||||
@ -29,11 +28,16 @@ Item {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: monitorsSettingsWrapper
|
||||
color: "white"
|
||||
radius: 3
|
||||
z: 98
|
||||
width: 1000
|
||||
height: 500
|
||||
anchors {
|
||||
fill: parent
|
||||
top: parent.top
|
||||
topMargin: 50
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
margins: 50
|
||||
}
|
||||
|
||||
@ -120,7 +124,6 @@ Item {
|
||||
cacheBuffer: 10000
|
||||
clip: true
|
||||
|
||||
|
||||
anchors {
|
||||
top: parent.top
|
||||
topMargin: 60
|
||||
@ -180,6 +183,11 @@ Item {
|
||||
target: background
|
||||
opacity: 1
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: monitorsSettingsWrapper
|
||||
anchors.topMargin: 50
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "inactive"
|
||||
@ -193,11 +201,18 @@ Item {
|
||||
target: background
|
||||
opacity: 0
|
||||
}
|
||||
PropertyChanges {
|
||||
target: monitorsSettingsWrapper
|
||||
anchors.topMargin: 150
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
from: "active"
|
||||
to: "inactive"
|
||||
reversible: true
|
||||
|
||||
NumberAnimation {
|
||||
target: background
|
||||
@ -206,6 +221,13 @@ Item {
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
|
||||
NumberAnimation {
|
||||
target: monitorsSettingsWrapper
|
||||
property: "anchors.topMargin"
|
||||
duration: 200
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
|
||||
NumberAnimation {
|
||||
target: monitors
|
||||
property: "opacity"
|
||||
|
Loading…
Reference in New Issue
Block a user