Fix timeline layout for non text messages

Change the target of the hover component and delegate layout to timeline container so it applies to all delegates not just text messages.

BUG: 457689
This commit is contained in:
James Graham
2022-08-22 17:38:50 +00:00
parent 89090690b4
commit 63af4cae77

View File

@@ -58,7 +58,7 @@ QQC2.ItemDelegate {
// updates the global hover component to point to this delegate, and update its position // updates the global hover component to point to this delegate, and update its position
function updateHoverComponent() { function updateHoverComponent() {
if (hoverComponent) { if (hoverComponent) {
hoverComponent.delegate = messageDelegate hoverComponent.delegate = timelineContainer
hoverComponent.bubble = bubble hoverComponent.bubble = bubble
hoverComponent.updateFunction = updateHoverComponent; hoverComponent.updateFunction = updateHoverComponent;
hoverComponent.event = model hoverComponent.event = model
@@ -71,7 +71,7 @@ QQC2.ItemDelegate {
State { State {
name: "alignLeft" name: "alignLeft"
AnchorChanges { AnchorChanges {
target: messageDelegate target: timelineContainer
anchors.horizontalCenter: undefined anchors.horizontalCenter: undefined
anchors.left: parent ? parent.left : undefined anchors.left: parent ? parent.left : undefined
} }
@@ -79,7 +79,7 @@ QQC2.ItemDelegate {
State { State {
name: "alignCenter" name: "alignCenter"
AnchorChanges { AnchorChanges {
target: messageDelegate target: timelineContainer
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
anchors.left: undefined anchors.left: undefined
} }