Fix hover actions being taken away by scrolling

This commit is contained in:
Devin Lin
2021-03-17 21:12:59 -04:00
parent 525d691cf8
commit dd20df5c26
2 changed files with 34 additions and 21 deletions

View File

@@ -129,13 +129,23 @@ Kirigami.ScrollablePage {
}
// hover actions on a delegate, activated in TimelineContainer.qml
QQC2.Popup {
Connections {
target: page.flickable
function onContentYChanged() {
if (hoverActions.visible) {
hoverActions.updateFunction();
}
}
}
Item {
id: hoverActions
property bool showEdit
property bool hovered: false
visible: (hovered || hoverHandler.hovered) && !Kirigami.Settings.isMobile
property var updateFunction
property var editClicked
property var replyClicked
property var reacted
@@ -143,9 +153,7 @@ Kirigami.ScrollablePage {
property alias childWidth: hoverActionsRow.width
property alias childHeight: hoverActionsRow.height
background: Item {}
contentItem: RowLayout {
RowLayout {
id: hoverActionsRow
z: 4
spacing: 0