controlcenter: corrected timing of network panel animations
This commit is contained in:
parent
b54ce46b98
commit
ee33f8f07b
3 changed files with 46 additions and 6 deletions
|
|
@ -57,6 +57,8 @@ RowLayout {
|
|||
|
||||
property var pane: root.session.ethernet.active
|
||||
property string paneId: pane ? (pane.interface || "") : ""
|
||||
property Component targetComponent: settings
|
||||
property Component nextComponent: settings
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.large * 2
|
||||
|
|
@ -67,7 +69,12 @@ RowLayout {
|
|||
|
||||
clip: true
|
||||
asynchronous: true
|
||||
sourceComponent: pane ? details : settings
|
||||
sourceComponent: loader.targetComponent
|
||||
|
||||
Component.onCompleted: {
|
||||
targetComponent = pane ? details : settings;
|
||||
nextComponent = targetComponent;
|
||||
}
|
||||
|
||||
Behavior on paneId {
|
||||
SequentialAnimation {
|
||||
|
|
@ -85,7 +92,11 @@ RowLayout {
|
|||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||
}
|
||||
}
|
||||
PropertyAction {}
|
||||
PropertyAction {
|
||||
target: loader
|
||||
property: "targetComponent"
|
||||
value: loader.nextComponent
|
||||
}
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
target: loader
|
||||
|
|
@ -104,6 +115,7 @@ RowLayout {
|
|||
}
|
||||
|
||||
onPaneChanged: {
|
||||
nextComponent = pane ? details : settings;
|
||||
paneId = pane ? (pane.interface || "") : "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 || "") : "");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ RowLayout {
|
|||
|
||||
property var pane: root.session.network.active
|
||||
property string paneId: pane ? (pane.ssid || pane.bssid || "") : ""
|
||||
property Component targetComponent: settings
|
||||
property Component nextComponent: settings
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.large * 2
|
||||
|
|
@ -66,7 +68,12 @@ RowLayout {
|
|||
|
||||
clip: false
|
||||
asynchronous: true
|
||||
sourceComponent: pane ? details : settings
|
||||
sourceComponent: loader.targetComponent
|
||||
|
||||
Component.onCompleted: {
|
||||
targetComponent = pane ? details : settings;
|
||||
nextComponent = targetComponent;
|
||||
}
|
||||
|
||||
Behavior on paneId {
|
||||
SequentialAnimation {
|
||||
|
|
@ -84,7 +91,11 @@ RowLayout {
|
|||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||
}
|
||||
}
|
||||
PropertyAction {}
|
||||
PropertyAction {
|
||||
target: loader
|
||||
property: "targetComponent"
|
||||
value: loader.nextComponent
|
||||
}
|
||||
ParallelAnimation {
|
||||
Anim {
|
||||
target: loader
|
||||
|
|
@ -103,6 +114,7 @@ RowLayout {
|
|||
}
|
||||
|
||||
onPaneChanged: {
|
||||
nextComponent = pane ? details : settings;
|
||||
paneId = pane ? (pane.ssid || pane.bssid || "") : "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue