Show discovered devices and shrink bluetooth header buttons
- Scan and Manage are now small icon-only buttons in the header beside the On/Off pill, with hover tooltips via the new PillButton.tooltipText prop (backed by QtQuick.Controls ToolTip). - New discoveredDevices list pulls everything in Bluetooth.devices that isn't paired/connected/bonded/trusted. While scanning, those appear under a 'Discovered' header. Click pairs and connects. - Empty-state text only shows when there are no known and no discovered devices, otherwise it would push down real entries.
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property string text: ""
|
||||
property string iconText: ""
|
||||
property string tooltipText: ""
|
||||
property color foreground: "#cacccc"
|
||||
property color background: "transparent"
|
||||
property color hoverBackground: Qt.rgba(foreground.r, foreground.g, foreground.b, 0.12)
|
||||
@@ -17,6 +19,10 @@ Rectangle {
|
||||
property bool active: false
|
||||
property color activeBackground: Qt.rgba(foreground.r, foreground.g, foreground.b, 0.18)
|
||||
|
||||
ToolTip.visible: tooltipText !== "" && mouseArea.containsMouse
|
||||
ToolTip.text: tooltipText
|
||||
ToolTip.delay: 400
|
||||
|
||||
signal clicked()
|
||||
signal rightClicked()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user