forked from Shinonome/dots-hyprland
bluetooth menu: stop scanning when closed, fix null warnings
This commit is contained in:
@@ -181,7 +181,10 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onShowBluetoothDialogChanged: if (showBluetoothDialog) bluetoothDialogLoader.active = true;
|
onShowBluetoothDialogChanged: {
|
||||||
|
if (showBluetoothDialog) bluetoothDialogLoader.active = true;
|
||||||
|
else Bluetooth.defaultAdapter.discovering = false;
|
||||||
|
}
|
||||||
Loader {
|
Loader {
|
||||||
id: bluetoothDialogLoader
|
id: bluetoothDialogLoader
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ DialogListItem {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: Appearance.colors.colOnSurfaceVariant
|
color: Appearance.colors.colOnSurfaceVariant
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: root.device?.name
|
text: root.device?.name || Translation.tr("Unknown device")
|
||||||
}
|
}
|
||||||
StyledText {
|
StyledText {
|
||||||
visible: root.device?.connected || root.device?.paired
|
visible: (root.device?.connected || root.device?.paired) ?? false
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
font.pixelSize: Appearance.font.pixelSize.smaller
|
font.pixelSize: Appearance.font.pixelSize.smaller
|
||||||
color: Appearance.colors.colSubtext
|
color: Appearance.colors.colSubtext
|
||||||
@@ -93,7 +93,7 @@ DialogListItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ActionButton {
|
ActionButton {
|
||||||
visible: root.device?.paired
|
visible: root.device?.paired ?? false
|
||||||
colBackground: Appearance.colors.colError
|
colBackground: Appearance.colors.colError
|
||||||
colBackgroundHover: Appearance.colors.colErrorHover
|
colBackgroundHover: Appearance.colors.colErrorHover
|
||||||
colRipple: Appearance.colors.colErrorActive
|
colRipple: Appearance.colors.colErrorActive
|
||||||
|
|||||||
Reference in New Issue
Block a user