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 var pane: root.session.ethernet.active
|
||||||
property string paneId: pane ? (pane.interface || "") : ""
|
property string paneId: pane ? (pane.interface || "") : ""
|
||||||
|
property Component targetComponent: settings
|
||||||
|
property Component nextComponent: settings
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Appearance.padding.large * 2
|
anchors.margins: Appearance.padding.large * 2
|
||||||
|
|
@ -67,7 +69,12 @@ RowLayout {
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
sourceComponent: pane ? details : settings
|
sourceComponent: loader.targetComponent
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
targetComponent = pane ? details : settings;
|
||||||
|
nextComponent = targetComponent;
|
||||||
|
}
|
||||||
|
|
||||||
Behavior on paneId {
|
Behavior on paneId {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
|
|
@ -85,7 +92,11 @@ RowLayout {
|
||||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PropertyAction {}
|
PropertyAction {
|
||||||
|
target: loader
|
||||||
|
property: "targetComponent"
|
||||||
|
value: loader.nextComponent
|
||||||
|
}
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
Anim {
|
Anim {
|
||||||
target: loader
|
target: loader
|
||||||
|
|
@ -104,6 +115,7 @@ RowLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
onPaneChanged: {
|
onPaneChanged: {
|
||||||
|
nextComponent = pane ? details : settings;
|
||||||
paneId = pane ? (pane.interface || "") : "";
|
paneId = pane ? (pane.interface || "") : "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -492,6 +492,12 @@ Item {
|
||||||
property var wirelessPane: root.session.network.active
|
property var wirelessPane: root.session.network.active
|
||||||
property var pane: ethernetPane || wirelessPane
|
property var pane: ethernetPane || wirelessPane
|
||||||
property string paneId: ethernetPane ? (ethernetPane.interface || "") : (wirelessPane ? (wirelessPane.ssid || wirelessPane.bssid || "") : "")
|
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.fill: parent
|
||||||
anchors.margins: Appearance.padding.large * 2
|
anchors.margins: Appearance.padding.large * 2
|
||||||
|
|
@ -502,7 +508,12 @@ Item {
|
||||||
clip: false
|
clip: false
|
||||||
|
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
sourceComponent: pane ? (ethernetPane ? ethernetDetails : wirelessDetails) : settings
|
sourceComponent: loader.targetComponent
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
targetComponent = getComponentForPane();
|
||||||
|
nextComponent = targetComponent;
|
||||||
|
}
|
||||||
|
|
||||||
Behavior on paneId {
|
Behavior on paneId {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
|
|
@ -520,7 +531,11 @@ Item {
|
||||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PropertyAction {}
|
PropertyAction {
|
||||||
|
target: loader
|
||||||
|
property: "targetComponent"
|
||||||
|
value: loader.nextComponent
|
||||||
|
}
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
Anim {
|
Anim {
|
||||||
target: loader
|
target: loader
|
||||||
|
|
@ -539,6 +554,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
onPaneChanged: {
|
onPaneChanged: {
|
||||||
|
nextComponent = getComponentForPane();
|
||||||
paneId = ethernetPane ? (ethernetPane.interface || "") : (wirelessPane ? (wirelessPane.ssid || wirelessPane.bssid || "") : "");
|
paneId = ethernetPane ? (ethernetPane.interface || "") : (wirelessPane ? (wirelessPane.ssid || wirelessPane.bssid || "") : "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ RowLayout {
|
||||||
|
|
||||||
property var pane: root.session.network.active
|
property var pane: root.session.network.active
|
||||||
property string paneId: pane ? (pane.ssid || pane.bssid || "") : ""
|
property string paneId: pane ? (pane.ssid || pane.bssid || "") : ""
|
||||||
|
property Component targetComponent: settings
|
||||||
|
property Component nextComponent: settings
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Appearance.padding.large * 2
|
anchors.margins: Appearance.padding.large * 2
|
||||||
|
|
@ -66,7 +68,12 @@ RowLayout {
|
||||||
|
|
||||||
clip: false
|
clip: false
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
sourceComponent: pane ? details : settings
|
sourceComponent: loader.targetComponent
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
targetComponent = pane ? details : settings;
|
||||||
|
nextComponent = targetComponent;
|
||||||
|
}
|
||||||
|
|
||||||
Behavior on paneId {
|
Behavior on paneId {
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
|
|
@ -84,7 +91,11 @@ RowLayout {
|
||||||
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
easing.bezierCurve: Appearance.anim.curves.standardAccel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PropertyAction {}
|
PropertyAction {
|
||||||
|
target: loader
|
||||||
|
property: "targetComponent"
|
||||||
|
value: loader.nextComponent
|
||||||
|
}
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
Anim {
|
Anim {
|
||||||
target: loader
|
target: loader
|
||||||
|
|
@ -103,6 +114,7 @@ RowLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
onPaneChanged: {
|
onPaneChanged: {
|
||||||
|
nextComponent = pane ? details : settings;
|
||||||
paneId = pane ? (pane.ssid || pane.bssid || "") : "";
|
paneId = pane ? (pane.ssid || pane.bssid || "") : "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue