From 6dc30a9ca7a5f59712f22b00ae740f01ecf28255 Mon Sep 17 00:00:00 2001 From: James Graham Date: Sun, 12 Nov 2023 14:20:46 +0000 Subject: [PATCH] Fix hover action position when wide Fix the positioning of the hover actions when the window is wide by using the content x pos --- src/qml/HoverActions.qml | 2 +- src/qml/TimelineDelegate.qml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/qml/HoverActions.qml b/src/qml/HoverActions.qml index d8f990821..faf92c2d9 100644 --- a/src/qml/HoverActions.qml +++ b/src/qml/HoverActions.qml @@ -42,7 +42,7 @@ QQC2.Control { leftPadding: 0 rightPadding: 0 - x: delegate ? delegate.x + delegate.bubbleX : 0 + x: delegate ? delegate.contentX + delegate.bubbleX : 0 y: delegate ? delegate.mapToItem(parent, 0, 0).y + delegate.bubbleY - height + Kirigami.Units.smallSpacing : 0 width: delegate ? delegate.bubbleWidth : Kirigami.Units.gridUnit * 4 diff --git a/src/qml/TimelineDelegate.qml b/src/qml/TimelineDelegate.qml index 5ece332bb..fcc1c05f5 100644 --- a/src/qml/TimelineDelegate.qml +++ b/src/qml/TimelineDelegate.qml @@ -26,6 +26,13 @@ Item { */ property Item contentItem + /** + * @brief The x position of the content item. + * + * @note Used for positioning the hover actions. + */ + property real contentX: contentItemParent.x + /** * @brief Whether the delegate should always stretch to the maximum available width. */