Add a clickable icon for Talk notifications.

Signed-off-by: Camila <hello@camila.codes>
This commit is contained in:
Camila 2020-09-29 19:22:43 +02:00 committed by Kevin Ottens (Rebase PR Action)
parent 2cb919a684
commit 954544830d
3 changed files with 31 additions and 1 deletions

View File

@ -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 {

View File

@ -162,5 +162,6 @@
<file>theme/colored/Nextcloud-sidebar.svg</file>
<file>theme/add.svg</file>
<file>theme/share.svg</file>
<file>theme/reply.svg</file>
</qresource>
</RCC>

1
theme/reply.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16"><path d="M15 15s-.4-7.8-7-10V1L1 8l7 7v-4c5.1 0 7 4 7 4z"/></svg>

After

Width:  |  Height:  |  Size: 128 B