wifi & bluetooth dialogs: indeterminate progressbar while scanning

This commit is contained in:
end-4
2025-08-30 22:09:05 +02:00
parent eb0bad1af6
commit 021a49a72d
3 changed files with 38 additions and 6 deletions
@@ -0,0 +1,15 @@
import qs.services
import qs.modules.common
import qs.modules.common.widgets
import QtQuick
import QtQuick.Controls.Material
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import Qt5Compat.GraphicalEffects
ProgressBar {
indeterminate: true
Material.accent: Appearance.colors.colPrimary
}
@@ -19,8 +19,17 @@ WindowDialog {
WindowDialogTitle {
text: Translation.tr("Bluetooth devices")
}
// TODO: add indeterminate progress bar when scanning
WindowDialogSeparator {}
WindowDialogSeparator {
visible: !Bluetooth.defaultAdapter.discovering
}
StyledIndeterminateProgressBar {
visible: Bluetooth.defaultAdapter.discovering
Layout.fillWidth: true
Layout.topMargin: -8
Layout.bottomMargin: -8
Layout.leftMargin: -Appearance.rounding.large
Layout.rightMargin: -Appearance.rounding.large
}
StyledListView {
Layout.fillHeight: true
Layout.fillWidth: true
@@ -13,9 +13,18 @@ WindowDialog {
WindowDialogTitle {
text: Translation.tr("Connect to Wi-Fi")
}
// TODO: add indeterminate progress bar when scanning
WindowDialogSeparator {}
StyledListView {
WindowDialogSeparator {
visible: !Network.wifiScanning
}
StyledIndeterminateProgressBar {
visible: Network.wifiScanning
Layout.fillWidth: true
Layout.topMargin: -8
Layout.bottomMargin: -8
Layout.leftMargin: -Appearance.rounding.large
Layout.rightMargin: -Appearance.rounding.large
}
ListView {
Layout.fillHeight: true
Layout.fillWidth: true
Layout.topMargin: -15
@@ -25,7 +34,6 @@ WindowDialog {
clip: true
spacing: 0
animateAppearance: false
model: ScriptModel {
values: [...Network.wifiNetworks].sort((a, b) => {