Fix message hover buttons (React, Edit, Reply) not moving with scroll
Fix #296
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
|
||||
// hover actions on a delegate, activated in TimelineContainer.qml
|
||||
Item {
|
||||
QQC2.Popup {
|
||||
id: hoverActions
|
||||
property bool showEdit
|
||||
property bool hovered: false
|
||||
@@ -143,7 +143,9 @@ Kirigami.ScrollablePage {
|
||||
property alias childWidth: hoverActionsRow.width
|
||||
property alias childHeight: hoverActionsRow.height
|
||||
|
||||
RowLayout {
|
||||
background: Item {}
|
||||
|
||||
contentItem: RowLayout {
|
||||
id: hoverActionsRow
|
||||
z: 4
|
||||
spacing: 0
|
||||
|
||||
Reference in New Issue
Block a user