forked from Shinonome/dots-hyprland
wifi & bluetooth dialogs: indeterminate progressbar while scanning
This commit is contained in:
@@ -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 {
|
WindowDialogTitle {
|
||||||
text: Translation.tr("Bluetooth devices")
|
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 {
|
StyledListView {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@@ -13,9 +13,18 @@ WindowDialog {
|
|||||||
WindowDialogTitle {
|
WindowDialogTitle {
|
||||||
text: Translation.tr("Connect to Wi-Fi")
|
text: Translation.tr("Connect to Wi-Fi")
|
||||||
}
|
}
|
||||||
// TODO: add indeterminate progress bar when scanning
|
WindowDialogSeparator {
|
||||||
WindowDialogSeparator {}
|
visible: !Network.wifiScanning
|
||||||
StyledListView {
|
}
|
||||||
|
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.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: -15
|
Layout.topMargin: -15
|
||||||
@@ -25,7 +34,6 @@ WindowDialog {
|
|||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
spacing: 0
|
spacing: 0
|
||||||
animateAppearance: false
|
|
||||||
|
|
||||||
model: ScriptModel {
|
model: ScriptModel {
|
||||||
values: [...Network.wifiNetworks].sort((a, b) => {
|
values: [...Network.wifiNetworks].sort((a, b) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user