From: Kevin Ottens Date: Mon, 15 Jun 2020 17:08:16 +0000 (+0200) Subject: Make activity items with a link clickable X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~151 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4f7a6cfb1d19dc2fc66aa87b307cb397a79020f3;p=nextcloud-desktop.git Make activity items with a link clickable We then get more items clickable, in particular the bottom one proposing to open the activity application. Now we can click it and it opens the activity application straight away. Signed-off-by: Kevin Ottens --- diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index ddbd5594a..95ee10b6e 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -444,16 +444,22 @@ Window { spacing: 0 MouseArea { - enabled: (path !== "") + enabled: (path !== "" || link !== "") anchors.left: activityItem.left anchors.right: ((shareButton.visible) ? shareButton.left : activityItem.right) height: parent.height anchors.margins: 2 hoverEnabled: true - onClicked: Qt.openUrlExternally(path) + onClicked: { + if (path !== "") { + Qt.openUrlExternally(path) + } else { + Qt.openUrlExternally(link) + } + } ToolTip.visible: hovered ToolTip.delay: 1000 - ToolTip.text: qsTr("Open sync item locally") + ToolTip.text: path !== "" ? qsTr("Open sync item locally") : qsTr("Open URL") Rectangle { anchors.fill: parent color: (parent.containsMouse ? Style.lightHover : "transparent")