From: Camila Date: Tue, 29 Sep 2020 17:22:43 +0000 (+0200) Subject: Add a clickable icon for Talk notifications. X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~135^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=954544830dd1a1c72684efc26bf1878af38d3c7e;p=nextcloud-desktop.git Add a clickable icon for Talk notifications. Signed-off-by: Camila --- diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index ad4cfc0e7..f5d23b4a6 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -536,7 +536,9 @@ Window { id: activityMouseArea enabled: (path !== "" || link !== "") anchors.left: activityItem.left - anchors.right: ((shareButton.visible) ? shareButton.left : activityItem.right) + anchors.right: (shareButton.visible) ? shareButton.left + : (replyButton.visible) ? replyButton.left + : activityItem.right height: parent.height anchors.margins: 2 hoverEnabled: true @@ -645,6 +647,32 @@ Window { Accessible.name: qsTr("Share") + " " + displayPath Accessible.onPressAction: shareButton.clicked() } + + Button { + id: replyButton + anchors.right: activityItem.right + + Layout.preferredWidth: (objectType == "chat" || objectType == "call") ? parent.height : 0 + Layout.preferredHeight: parent.height + Layout.alignment: Qt.AlignRight + flat: true + hoverEnabled: true + visible: (objectType == "chat" || objectType == "call") ? true : false + display: AbstractButton.IconOnly + icon.source: "qrc:///client/theme/reply.svg" + icon.color: "transparent" + background: Rectangle { + color: parent.hovered ? Style.lightHover : "transparent" + } + ToolTip.visible: hovered + ToolTip.delay: 1000 + ToolTip.text: qsTr("Open Talk") + onClicked: Qt.openUrlExternally(link) + + Accessible.role: Accessible.Button + Accessible.name: qsTr("Open Talk") + " " + link + Accessible.onPressAction: replyButton.clicked() + } } /*add: Transition { diff --git a/theme.qrc b/theme.qrc index 6adcfdc46..df1756d35 100644 --- a/theme.qrc +++ b/theme.qrc @@ -162,5 +162,6 @@ theme/colored/Nextcloud-sidebar.svg theme/add.svg theme/share.svg + theme/reply.svg diff --git a/theme/reply.svg b/theme/reply.svg new file mode 100644 index 000000000..a198103b8 --- /dev/null +++ b/theme/reply.svg @@ -0,0 +1 @@ + \ No newline at end of file