Fix message hover buttons (React, Edit, Reply) not moving with scroll

Fix #296
This commit is contained in:
Carl Schwan
2021-03-18 01:56:27 +01:00
parent 8e5ca78249
commit b349c2376d
2 changed files with 7 additions and 4 deletions

View File

@@ -46,8 +46,9 @@ Item {
// show hover actions
onHoveredChanged: {
if (hovered && !Kirigami.Settings.isMobile) {
hoverComponent.x = Qt.binding(() => column.mapToItem(page, hoverComponentX, hoverComponentY).x);
hoverComponent.y = Qt.binding(() => column.mapToItem(page, hoverComponentX, hoverComponentY).y);
hoverComponent.parent = controlContainer;
hoverComponent.x = Qt.binding(() => controlContainer.width - hoverComponent.childWidth)
hoverComponent.y = -Kirigami.Units.largeSpacing * 4
hoverComponent.hovered = Qt.binding(() => controlContainer.hovered);
hoverComponent.showEdit = author.id === Controller.activeConnection.localUserId && (model.eventType === "emote" || model.eventType === "message");