From 7adc7f43cc25d8ec1c299a35ab2a548c6c67062e Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Tue, 9 Sep 2025 18:18:44 -0400 Subject: [PATCH] Bluetooth devices icons --- Commons/IconsSets/TablerIcons.qml | 15 ++++++++++++--- Services/BluetoothService.qml | 18 +++++++++--------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/Commons/IconsSets/TablerIcons.qml b/Commons/IconsSets/TablerIcons.qml index 1f03c3c..5364b4c 100644 --- a/Commons/IconsSets/TablerIcons.qml +++ b/Commons/IconsSets/TablerIcons.qml @@ -29,7 +29,7 @@ Singleton { "download-speed": "download", "upload-speed": "upload", "storage": "device-floppy", - "bluetooth": "bluetooth", + "ethernet": "network", "keyboard": "keyboard", "power": "power", @@ -89,8 +89,17 @@ Singleton { "settings-wallpaper-selector": "library-photo", "settings-screen-recorder": "video", "settings-hooks": "link", - "settings-about": "info-square-rounded" - // TODO BT DEVICES + "settings-about": "info-square-rounded", + + "bluetooth": "bluetooth", + "bt-device-generic": "bluetooth", + "bt-device-headphones": "headphones-filled", + "bt-device-mouse": "mouse-2", + "bt-device-keyboard": "bluetooth", + "bt-device-phone": "device-mobile-filled", + "bt-device-watch": "device-watch", + "bt-device-speaker": "device-speaker", + "bt-device-tv": "device-tv", } readonly property var icons: { diff --git a/Services/BluetoothService.qml b/Services/BluetoothService.qml index b029b70..da8e169 100644 --- a/Services/BluetoothService.qml +++ b/Services/BluetoothService.qml @@ -51,36 +51,36 @@ Singleton { function getDeviceIcon(device) { if (!device) { - return "bluetooth" + return "bt-device-generic" } var name = (device.name || device.deviceName || "").toLowerCase() var icon = (device.icon || "").toLowerCase() if (icon.includes("headset") || icon.includes("audio") || name.includes("headphone") || name.includes("airpod") || name.includes("headset") || name.includes("arctis")) { - return "headset" + return "bt-device-headphones" } if (icon.includes("mouse") || name.includes("mouse")) { - return "mouse-2" + return "bt-device-mouse" } if (icon.includes("keyboard") || name.includes("keyboard")) { - return "keyboard" + return "bt-device-keyboard" } if (icon.includes("phone") || name.includes("phone") || name.includes("iphone") || name.includes("android") || name.includes("samsung")) { - return "phone" + return "bt-device-phone" } if (icon.includes("watch") || name.includes("watch")) { - return "smartwatch" + return "bt-device-watch" } if (icon.includes("speaker") || name.includes("speaker")) { - return "speaker" + return "bt-device-speaker" } if (icon.includes("display") || name.includes("tv")) { - return "tv" + return "bt-device-tv" } - return "bluetooth" + return "bt-device-generic" } function canConnect(device) {