From 9b3d01b9a8ab1a0b0c5269ff68051935be4b2a80 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 21 Aug 2020 10:13:22 -0400 Subject: [PATCH] ServerDelegate: add ping icon tooltips --- src/gui/Pages/AddAccount/ServerDelegate.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gui/Pages/AddAccount/ServerDelegate.qml b/src/gui/Pages/AddAccount/ServerDelegate.qml index 6676e100..30ea5737 100644 --- a/src/gui/Pages/AddAccount/ServerDelegate.qml +++ b/src/gui/Pages/AddAccount/ServerDelegate.qml @@ -41,6 +41,16 @@ HTile { Layout.rightMargin: theme.spacing Behavior on colorize { HColorAnimation {} } + + HoverHandler { id: iconHover } + + HToolTip { + visible: iconHover.hovered + text: + model.status === "Failed" ? qsTr("Connection failed") : + model.status === "Pinging" ? qsTr("Contacting...") : + qsTr("%1ms").arg(model.ping) + } } HColumnLayout {