diff --git a/smsapp/qml/ConversationList.qml b/smsapp/qml/ConversationList.qml --- a/smsapp/qml/ConversationList.qml +++ b/smsapp/qml/ConversationList.qml @@ -30,9 +30,29 @@ Kirigami.ScrollablePage { + ToolTip { + id: noDevicesWarning + visible: !devicesCombo.enabled + text: "⚠️ " + i18n("No devices available") + " ⚠️" + + Button { + // We need an invisible button in order to support a hovering tooltip + anchors.centerIn: parent + width: parent.width + height: parent.height + hoverEnabled: true + opacity: 0 + + ToolTip.visible: hovered + ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval + ToolTip.text: i18n("No new messages can be sent or received, but you can browse cached content") + } + } + footer: ComboBox { id: devicesCombo enabled: count > 0 + displayText: !enabled ? i18n("No devices available") : undefined model: DevicesSortProxyModel { id: devicesModel //TODO: make it possible to filter if they can do sms @@ -43,12 +63,6 @@ } textRole: "display" } - - Label { - text: i18n("No devices available") - anchors.centerIn: parent - visible: !devicesCombo.enabled - } readonly property QtObject device: devicesCombo.currentIndex >= 0 ? devicesModel.data(devicesModel.index(devicesCombo.currentIndex, 0), DevicesModel.DeviceRole) : null