Restore hover actions for the cpp message delegate

Restore hover actions for the cpp message delegate

BUG: 503843
This commit is contained in:
James Graham
2025-05-09 18:03:23 +01:00
committed by Joshua Goins
parent 3183be460e
commit 0a2af02c5f
6 changed files with 30 additions and 16 deletions

View File

@@ -89,13 +89,6 @@ MessageDelegateBase {
*/
required property bool verified
/**
* @brief The x position of the message bubble.
*
* @note Used for positioning the hover actions.
*/
readonly property real bubbleX: bubble.x + bubble.anchors.leftMargin
/**
* @brief The y position of the message bubble.
*
@@ -110,11 +103,6 @@ MessageDelegateBase {
*/
readonly property alias bubbleWidth: bubble.width
/**
* @brief Whether this message is hovered.
*/
readonly property alias hovered: bubble.hovered
/**
* @brief Open the any message media externally.
*/
@@ -214,6 +202,13 @@ MessageDelegateBase {
radius: Kirigami.Units.cornerRadius
}
// show hover actions
onHoveredChanged: {
if (hovered && !Kirigami.Settings.isMobile) {
root.setHoverActionsToDelegate();
}
}
function setHoverActionsToDelegate() {
if (ListView.view.setHoverActionsToDelegate) {
ListView.view.setHoverActionsToDelegate(root);