summaryrefslogtreecommitdiff
path: root/modules/controlcenter/network
diff options
context:
space:
mode:
Diffstat (limited to 'modules/controlcenter/network')
-rw-r--r--modules/controlcenter/network/EthernetPane.qml45
-rw-r--r--modules/controlcenter/network/NetworkingPane.qml70
-rw-r--r--modules/controlcenter/network/WirelessPane.qml45
3 files changed, 27 insertions, 133 deletions
diff --git a/modules/controlcenter/network/EthernetPane.qml b/modules/controlcenter/network/EthernetPane.qml
index 6a50cde..fc979c3 100644
--- a/modules/controlcenter/network/EthernetPane.qml
+++ b/modules/controlcenter/network/EthernetPane.qml
@@ -77,40 +77,15 @@ RowLayout {
}
Behavior on paneId {
- SequentialAnimation {
- ParallelAnimation {
- Anim {
+ PaneTransition {
+ target: loader
+ propertyActions: [
+ PropertyAction {
target: loader
- property: "opacity"
- to: 0
- easing.bezierCurve: Appearance.anim.curves.standardAccel
+ property: "targetComponent"
+ value: loader.nextComponent
}
- Anim {
- target: loader
- property: "scale"
- to: 0.8
- easing.bezierCurve: Appearance.anim.curves.standardAccel
- }
- }
- PropertyAction {
- target: loader
- property: "targetComponent"
- value: loader.nextComponent
- }
- ParallelAnimation {
- Anim {
- target: loader
- property: "opacity"
- to: 1
- easing.bezierCurve: Appearance.anim.curves.standardDecel
- }
- Anim {
- target: loader
- property: "scale"
- to: 1
- easing.bezierCurve: Appearance.anim.curves.standardDecel
- }
- }
+ ]
}
}
@@ -153,10 +128,4 @@ RowLayout {
}
}
}
-
- component Anim: NumberAnimation {
- target: loader
- duration: Appearance.anim.durations.normal / 2
- easing.type: Easing.BezierSpline
- }
} \ No newline at end of file
diff --git a/modules/controlcenter/network/NetworkingPane.qml b/modules/controlcenter/network/NetworkingPane.qml
index 55c70d2..127a42a 100644
--- a/modules/controlcenter/network/NetworkingPane.qml
+++ b/modules/controlcenter/network/NetworkingPane.qml
@@ -447,7 +447,7 @@ Item {
property var ethernetPane: root.session.ethernet.active
property var wirelessPane: root.session.network.active
property var pane: ethernetPane || wirelessPane
- property string paneId: ethernetPane ? (ethernetPane.interface || "") : (wirelessPane ? (wirelessPane.ssid || wirelessPane.bssid || "") : "")
+ property string paneId: ethernetPane ? ("eth:" + (ethernetPane.interface || "")) : (wirelessPane ? ("wifi:" + (wirelessPane.ssid || wirelessPane.bssid || "")) : "settings")
property Component targetComponent: settings
property Component nextComponent: settings
@@ -463,16 +463,16 @@ Item {
Connections {
target: root.session.ethernet
function onActiveChanged() {
- nextComponent = getComponentForPane();
- paneId = ethernetPane ? (ethernetPane.interface || "") : (wirelessPane ? (wirelessPane.ssid || wirelessPane.bssid || "") : "");
+ rightPaneItem.nextComponent = rightPaneItem.getComponentForPane();
+ rightPaneItem.paneId = rightPaneItem.ethernetPane ? ("eth:" + (rightPaneItem.ethernetPane.interface || "")) : (rightPaneItem.wirelessPane ? ("wifi:" + (rightPaneItem.wirelessPane.ssid || rightPaneItem.wirelessPane.bssid || "")) : "settings");
}
}
Connections {
target: root.session.network
function onActiveChanged() {
- nextComponent = getComponentForPane();
- paneId = ethernetPane ? (ethernetPane.interface || "") : (wirelessPane ? (wirelessPane.ssid || wirelessPane.bssid || "") : "");
+ rightPaneItem.nextComponent = rightPaneItem.getComponentForPane();
+ rightPaneItem.paneId = rightPaneItem.ethernetPane ? ("eth:" + (rightPaneItem.ethernetPane.interface || "")) : (rightPaneItem.wirelessPane ? ("wifi:" + (rightPaneItem.wirelessPane.ssid || rightPaneItem.wirelessPane.bssid || "")) : "settings");
}
}
@@ -489,57 +489,18 @@ Item {
asynchronous: true
sourceComponent: rightPaneItem.targetComponent
-
- Connections {
- target: rightPaneItem
- function onPaneIdChanged() {
- rightPaneItem.targetComponent = rightPaneItem.nextComponent;
- }
- }
}
Behavior on paneId {
- SequentialAnimation {
- ParallelAnimation {
- Anim {
- target: rightLoader
- property: "opacity"
- to: 0
- easing.bezierCurve: Appearance.anim.curves.standardAccel
- }
- Anim {
- target: rightLoader
- property: "scale"
- to: 0.8
- easing.bezierCurve: Appearance.anim.curves.standardAccel
- }
- }
- PropertyAction {
- target: rightPaneItem
- property: "targetComponent"
- value: rightPaneItem.nextComponent
- }
- ParallelAnimation {
- Anim {
- target: rightLoader
- property: "opacity"
- to: 1
- easing.bezierCurve: Appearance.anim.curves.standardDecel
- }
- Anim {
- target: rightLoader
- property: "scale"
- to: 1
- easing.bezierCurve: Appearance.anim.curves.standardDecel
+ PaneTransition {
+ target: rightLoader
+ propertyActions: [
+ PropertyAction {
+ target: rightPaneItem
+ property: "targetComponent"
+ value: rightPaneItem.nextComponent
}
- }
- }
- }
-
- Connections {
- target: rightPaneItem
- function onPaneIdChanged() {
- rightPaneItem.targetComponent = rightPaneItem.nextComponent;
+ ]
}
}
}
@@ -621,11 +582,6 @@ Item {
z: 1000
}
- component Anim: NumberAnimation {
- duration: Appearance.anim.durations.normal / 2
- easing.type: Easing.BezierSpline
- }
-
function checkSavedProfileForNetwork(ssid: string): void {
if (ssid && ssid.length > 0) {
Nmcli.loadSavedConnections(() => {});
diff --git a/modules/controlcenter/network/WirelessPane.qml b/modules/controlcenter/network/WirelessPane.qml
index 22364a1..0c8f0ae 100644
--- a/modules/controlcenter/network/WirelessPane.qml
+++ b/modules/controlcenter/network/WirelessPane.qml
@@ -76,40 +76,15 @@ RowLayout {
}
Behavior on paneId {
- SequentialAnimation {
- ParallelAnimation {
- Anim {
+ PaneTransition {
+ target: loader
+ propertyActions: [
+ PropertyAction {
target: loader
- property: "opacity"
- to: 0
- easing.bezierCurve: Appearance.anim.curves.standardAccel
+ property: "targetComponent"
+ value: loader.nextComponent
}
- Anim {
- target: loader
- property: "scale"
- to: 0.8
- easing.bezierCurve: Appearance.anim.curves.standardAccel
- }
- }
- PropertyAction {
- target: loader
- property: "targetComponent"
- value: loader.nextComponent
- }
- ParallelAnimation {
- Anim {
- target: loader
- property: "opacity"
- to: 1
- easing.bezierCurve: Appearance.anim.curves.standardDecel
- }
- Anim {
- target: loader
- property: "scale"
- to: 1
- easing.bezierCurve: Appearance.anim.curves.standardDecel
- }
- }
+ ]
}
}
@@ -158,10 +133,4 @@ RowLayout {
session: root.session
z: 1000
}
-
- component Anim: NumberAnimation {
- target: loader
- duration: Appearance.anim.durations.normal / 2
- easing.type: Easing.BezierSpline
- }
} \ No newline at end of file