aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/bluetooth/BluetoothPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/bluetooth/BluetoothPage.qml')
-rw-r--r--desktop/modules/bluetooth/BluetoothPage.qml50
1 files changed, 45 insertions, 5 deletions
diff --git a/desktop/modules/bluetooth/BluetoothPage.qml b/desktop/modules/bluetooth/BluetoothPage.qml
index 5bfdc0b..a4ba232 100644
--- a/desktop/modules/bluetooth/BluetoothPage.qml
+++ b/desktop/modules/bluetooth/BluetoothPage.qml
@@ -180,12 +180,52 @@ Column {
}
}
- Text {
+ // A failed pairing leaves the real bluetoothctl output here. No timeout:
+ // it stays until dismissed, and the next failure sets it again, so an
+ // identical error reappears rather than staying hidden. Dismissing clears
+ // the source, not a local flag, so it survives this page unloading. The
+ // desktop notification is sent separately and is not touched by this.
+ Rectangle {
width: page.width
visible: page.bt.pairing.error !== ""
- wrapMode: Text.Wrap
- text: page.bt.pairing.error
- font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 3 }
- color: Theme.red
+ implicitHeight: errText.implicitHeight + 16
+ radius: 8
+ color: Qt.alpha(Theme.red, 0.12)
+ border.width: 1
+ border.color: Qt.alpha(Theme.red, 0.35)
+
+ Text {
+ id: errText
+ anchors {
+ left: parent.left; leftMargin: 10
+ right: errClose.left; rightMargin: 8
+ verticalCenter: parent.verticalCenter
+ }
+ wrapMode: Text.Wrap
+ text: page.bt.pairing.error
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 3 }
+ color: Theme.red
+ }
+
+ Text {
+ id: errClose
+ anchors { right: parent.right; rightMargin: 8; verticalCenter: parent.verticalCenter }
+ width: 20
+ height: 20
+ text: "\uf00d"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ font { family: Theme.iconFamily; pixelSize: 13 }
+ color: errCloseArea.containsMouse ? Theme.red : Theme.subtext
+
+ MouseArea {
+ id: errCloseArea
+ anchors.fill: parent
+ anchors.margins: -6
+ hoverEnabled: true
+ cursorShape: Qt.PointingHandCursor
+ onClicked: page.bt.pairing.error = ""
+ }
+ }
}
}