features/adding_quickshell #6
@@ -90,6 +90,24 @@ Item {
|
||||
? sortWifiRows(root.wifiDevice.networks.values.map(root.wifiRow).filter(function(r) { return r && r.ssid }))
|
||||
: []
|
||||
|
||||
// Quickshell's WifiDevice has no "a scan is in flight" signal — only
|
||||
// scannerEnabled, the on/off request, which stays true for as long as
|
||||
// the panel is open rather than pulsing per scan. wifiRows re-deriving
|
||||
// to a new array (as it does on every actual network-list change — see
|
||||
// the comment on wifiRow() above) is the closest available proxy for
|
||||
// "a scan just landed", so pulse briefly off that instead.
|
||||
property bool wifiJustScanned: false
|
||||
onWifiRowsChanged: {
|
||||
root.wifiJustScanned = true
|
||||
wifiScanPulseTimer.restart()
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: wifiScanPulseTimer
|
||||
interval: 1200
|
||||
onTriggered: root.wifiJustScanned = false
|
||||
}
|
||||
|
||||
// Split for the "Known Networks" / "Other Networks" sections. wifiRows
|
||||
// is already sorted connected-first then by signal, so filtering
|
||||
// preserves that order within each group.
|
||||
@@ -1084,6 +1102,32 @@ Item {
|
||||
font.pixelSize: Appearance.fontSize
|
||||
color: Colors.foreground
|
||||
}
|
||||
|
||||
// Spins briefly each time a scan actually lands —
|
||||
// same "still searching" cue as
|
||||
// BluetoothIndicator.qml's spinner, but pulsed via
|
||||
// wifiJustScanned (see above) rather than staying on
|
||||
// for the whole time the panel is open, since
|
||||
// WifiDevice has no per-scan signal of its own to
|
||||
// key off.
|
||||
Text {
|
||||
id: wifiScanSpinner
|
||||
visible: root.wifiDevice !== null && root.wifiDevice.scannerEnabled && root.wifiJustScanned
|
||||
text: "progress_activity"
|
||||
font.family: Appearance.iconFontFamilyRounded
|
||||
font.variableAxes: Appearance.iconFontAxes
|
||||
font.pixelSize: 16
|
||||
color: Colors.muted
|
||||
|
||||
RotationAnimation on rotation {
|
||||
running: wifiScanSpinner.visible
|
||||
loops: Animation.Infinite
|
||||
from: 0
|
||||
to: 360
|
||||
duration: 900
|
||||
}
|
||||
}
|
||||
|
||||
ToggleSwitch {
|
||||
checked: Networking.wifiEnabled
|
||||
onToggled: Networking.wifiEnabled = !Networking.wifiEnabled
|
||||
|
||||
Reference in New Issue
Block a user