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
|
// show hover actions
|
||||||
onHoveredChanged: {
|
onHoveredChanged: {
|
||||||
if (hovered && !Kirigami.Settings.isMobile) {
|
if (hovered && !Kirigami.Settings.isMobile) {
|
||||||
hoverComponent.x = Qt.binding(() => column.mapToItem(page, hoverComponentX, hoverComponentY).x);
|
hoverComponent.parent = controlContainer;
|
||||||
hoverComponent.y = Qt.binding(() => column.mapToItem(page, hoverComponentX, hoverComponentY).y);
|
hoverComponent.x = Qt.binding(() => controlContainer.width - hoverComponent.childWidth)
|
||||||
|
hoverComponent.y = -Kirigami.Units.largeSpacing * 4
|
||||||
hoverComponent.hovered = Qt.binding(() => controlContainer.hovered);
|
hoverComponent.hovered = Qt.binding(() => controlContainer.hovered);
|
||||||
hoverComponent.showEdit = author.id === Controller.activeConnection.localUserId && (model.eventType === "emote" || model.eventType === "message");
|
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
|
// hover actions on a delegate, activated in TimelineContainer.qml
|
||||||
Item {
|
QQC2.Popup {
|
||||||
id: hoverActions
|
id: hoverActions
|
||||||
property bool showEdit
|
property bool showEdit
|
||||||
property bool hovered: false
|
property bool hovered: false
|
||||||
@@ -143,7 +143,9 @@ Kirigami.ScrollablePage {
|
|||||||
property alias childWidth: hoverActionsRow.width
|
property alias childWidth: hoverActionsRow.width
|
||||||
property alias childHeight: hoverActionsRow.height
|
property alias childHeight: hoverActionsRow.height
|
||||||
|
|
||||||
RowLayout {
|
background: Item {}
|
||||||
|
|
||||||
|
contentItem: RowLayout {
|
||||||
id: hoverActionsRow
|
id: hoverActionsRow
|
||||||
z: 4
|
z: 4
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user