mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Merge pull request #2487 from nextcloud/add-talk-icon
Add a clickable icon for Talk notifications.
This commit is contained in:
commit
48524fc1f4
3 changed files with 31 additions and 1 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
1
theme/reply.svg
Normal 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 |
Loading…
Reference in a new issue