Commit 7859a6d5 authored by Nicolas Fella's avatar Nicolas Fella

[kcm] Add placeholdermessage when no devices are paired

Empty lists usually have a message indicating why.
parent cf9972b2
......@@ -37,6 +37,7 @@ ScrollViewKCM {
}
view: ListView {
id: list
clip: true
Kirigami.PlaceholderMessage {
......@@ -50,6 +51,7 @@ ScrollViewKCM {
}
Kirigami.PlaceholderMessage {
id: bluetoothDisabledMessage
visible: BluezQt.Manager.operational && !BluezQt.Manager.bluetoothOperational && !noBluetoothMessage.visible
text: i18n("Bluetooth is disabled")
width: parent.width - (Kirigami.Units.largeSpacing * 4)
......@@ -64,6 +66,13 @@ ScrollViewKCM {
}
}
Kirigami.PlaceholderMessage {
visible: !noBluetoothMessage.visible && !bluetoothDisabledMessage.visible && list.count === 0
text: i18n("No devices paired")
width: parent.width - (Kirigami.Units.largeSpacing * 4)
anchors.centerIn: parent
}
model: BluezQt.Manager.bluetoothOperational ? devicesModel : []
QQC2.BusyIndicator {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment