feat(ActivityCenter): Make reply badge more interactive (#11108)

Close #8758
This commit is contained in:
Mikhail Rogachev 2023-06-15 18:33:49 +04:00 committed by GitHub
parent 407179cd10
commit c693e4e273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import QtQuick 2.4
import QtQuick.Layouts 1.4 import QtQuick.Layouts 1.4
import StatusQ.Core 0.1 import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Core.Utils 0.1 as StatusQUtils import StatusQ.Core.Utils 0.1 as StatusQUtils
import utils 1.0 import utils 1.0
@ -17,6 +18,7 @@ Badge {
implicitWidth: layout.implicitWidth + layout.anchors.leftMargin + layout.anchors.rightMargin implicitWidth: layout.implicitWidth + layout.anchors.leftMargin + layout.anchors.rightMargin
implicitHeight: layout.implicitHeight + layout.anchors.topMargin + layout.anchors.bottomMargin implicitHeight: layout.implicitHeight + layout.anchors.topMargin + layout.anchors.bottomMargin
color: hoverArea.containsMouse ? hoverArea.pressed ? Theme.palette.baseColor3 : Theme.palette.baseColor2 : Style.current.transparent
RowLayout { RowLayout {
id: layout id: layout
@ -49,6 +51,7 @@ Badge {
} }
MouseArea { MouseArea {
id: hoverArea
hoverEnabled: true hoverEnabled: true
anchors.fill: layout anchors.fill: layout
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor

View File

@ -35,6 +35,7 @@ ActivityNotificationMessage {
onReplyClicked: { onReplyClicked: {
root.activityCenterStore.switchTo(notification) root.activityCenterStore.switchTo(notification)
root.closeActivityCenter() root.closeActivityCenter()
root.store.messageStore.messageModule.jumpToMessage(model.id)
} }
} }