dcontent: anim pane changes
This commit is contained in:
parent
d21d80de9a
commit
baf04ec30f
2 changed files with 44 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
|
|||
import ".."
|
||||
import qs.widgets
|
||||
import qs.config
|
||||
import Quickshell.Bluetooth
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
|
|
@ -38,13 +39,47 @@ RowLayout {
|
|||
Layout.fillHeight: true
|
||||
|
||||
Loader {
|
||||
id: loader
|
||||
|
||||
property bool pane: root.session.bt.active
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.large * 2 + Appearance.padding.normal
|
||||
anchors.leftMargin: Appearance.padding.large * 2
|
||||
anchors.rightMargin: Appearance.padding.large * 2 + Appearance.padding.normal / 2
|
||||
|
||||
asynchronous: true
|
||||
sourceComponent: root.session.bt.active ? details : settings
|
||||
sourceComponent: pane ? details : settings
|
||||
|
||||
Behavior on pane {
|
||||
SequentialAnimation {
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
property: "opacity"
|
||||
to: 0
|
||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||
}
|
||||
Anim {
|
||||
property: "scale"
|
||||
to: 0.7
|
||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||
}
|
||||
}
|
||||
PropertyAction {}
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
property: "opacity"
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
}
|
||||
Anim {
|
||||
property: "scale"
|
||||
to: 1
|
||||
easing.bezierCurve: Appearance.anim.curves.standardDecel
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
InnerBorder {
|
||||
|
|
@ -76,4 +111,10 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
component Anim: NumberAnimation {
|
||||
target: loader
|
||||
duration: Appearance.anim.durations.normal / 2
|
||||
easing.type: Easing.BezierSpline
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ Item {
|
|||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
animate: true
|
||||
text: Icons.getBluetoothIcon(root.device.icon)
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3
|
||||
font.bold: true
|
||||
|
|
@ -37,6 +38,7 @@ Item {
|
|||
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
animate: true
|
||||
text: root.device.name
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.bold: true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue