diff options
| author | ATMDA <atdma2600@gmail.com> | 2025-11-17 19:44:31 -0500 |
|---|---|---|
| committer | ATMDA <atdma2600@gmail.com> | 2025-11-17 19:44:31 -0500 |
| commit | ee33f8f07bade777e84b3727647a7d5eb89a29e5 (patch) | |
| tree | 7685be31a83d8ede40576beda0f04fd40ea5d3a2 /modules/controlcenter/network/NetworkingPane.qml | |
| parent | controlcenter: corrected spacing between collapsiblesection headers and content (diff) | |
| download | caelestia-shell-ee33f8f07bade777e84b3727647a7d5eb89a29e5.tar.gz caelestia-shell-ee33f8f07bade777e84b3727647a7d5eb89a29e5.tar.bz2 caelestia-shell-ee33f8f07bade777e84b3727647a7d5eb89a29e5.zip | |
controlcenter: corrected timing of network panel animations
Diffstat (limited to 'modules/controlcenter/network/NetworkingPane.qml')
| -rw-r--r-- | modules/controlcenter/network/NetworkingPane.qml | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/modules/controlcenter/network/NetworkingPane.qml b/modules/controlcenter/network/NetworkingPane.qml index 52499d8..47bb7fb 100644 --- a/modules/controlcenter/network/NetworkingPane.qml +++ b/modules/controlcenter/network/NetworkingPane.qml @@ -492,6 +492,12 @@ Item { property var wirelessPane: root.session.network.active property var pane: ethernetPane || wirelessPane property string paneId: ethernetPane ? (ethernetPane.interface || "") : (wirelessPane ? (wirelessPane.ssid || wirelessPane.bssid || "") : "") + property Component targetComponent: settings + property Component nextComponent: settings + + function getComponentForPane() { + return pane ? (ethernetPane ? ethernetDetails : wirelessDetails) : settings; + } anchors.fill: parent anchors.margins: Appearance.padding.large * 2 @@ -502,7 +508,12 @@ Item { clip: false asynchronous: true - sourceComponent: pane ? (ethernetPane ? ethernetDetails : wirelessDetails) : settings + sourceComponent: loader.targetComponent + + Component.onCompleted: { + targetComponent = getComponentForPane(); + nextComponent = targetComponent; + } Behavior on paneId { SequentialAnimation { @@ -520,7 +531,11 @@ Item { easing.bezierCurve: Appearance.anim.curves.standardAccel } } - PropertyAction {} + PropertyAction { + target: loader + property: "targetComponent" + value: loader.nextComponent + } ParallelAnimation { Anim { target: loader @@ -539,6 +554,7 @@ Item { } onPaneChanged: { + nextComponent = getComponentForPane(); paneId = ethernetPane ? (ethernetPane.interface || "") : (wirelessPane ? (wirelessPane.ssid || wirelessPane.bssid || "") : ""); } } |