diff --git a/src/messagecontent/FetchButtonComponent.qml b/src/messagecontent/FetchButtonComponent.qml index abfdd78cd..ec01ba685 100644 --- a/src/messagecontent/FetchButtonComponent.qml +++ b/src/messagecontent/FetchButtonComponent.qml @@ -2,14 +2,12 @@ // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL import QtQuick -import QtQuick.Controls as QQC2 import QtQuick.Layouts import org.kde.kirigami as Kirigami import org.kde.kirigamiaddons.delegates as Delegates import org.kde.neochat -import org.kde.neochat.chatbar /** * @brief A component to show a reply button for threads in a message bubble. diff --git a/src/messagecontent/ImageComponent.qml b/src/messagecontent/ImageComponent.qml index b9db46562..9a1ad1382 100644 --- a/src/messagecontent/ImageComponent.qml +++ b/src/messagecontent/ImageComponent.qml @@ -2,9 +2,11 @@ // SPDX-FileCopyrightText: 2024 James Graham // SPDX-License-Identifier: GPL-3.0-only +pragma ComponentBehavior: Bound + +import QtCore import QtQuick import QtQuick.Controls as QQC2 -import QtQuick.Layouts import org.kde.kirigami as Kirigami @@ -157,7 +159,7 @@ Item { if (_private.downloaded) { openSavedFile(); } else { - openOnFinished = true; + root.openOnFinished = true; Message.room.downloadFile(root.eventId, StandardPaths.writableLocation(StandardPaths.CacheLocation) + "/" + root.eventId.replace(":", "_").replace("/", "_").replace("+", "_") + Message.room.fileNameToDownload(root.eventId)); } } diff --git a/src/messagecontent/ItineraryComponent.qml b/src/messagecontent/ItineraryComponent.qml index 1446df375..2b4e4ef42 100644 --- a/src/messagecontent/ItineraryComponent.qml +++ b/src/messagecontent/ItineraryComponent.qml @@ -55,7 +55,7 @@ ColumnLayout { QQC2.ToolTip.visible: hovered QQC2.ToolTip.text: text QQC2.ToolTip.delay: Kirigami.Units.toolTipDelay - onClicked: itineraryModel.sendToItinerary() + onClicked: root.itineraryModel.sendToItinerary() visible: itinerary.count > 0 } } diff --git a/src/messagecontent/JourneySectionStopDelegateLineSegment.qml b/src/messagecontent/JourneySectionStopDelegateLineSegment.qml index 926afe557..22a75a0be 100644 --- a/src/messagecontent/JourneySectionStopDelegateLineSegment.qml +++ b/src/messagecontent/JourneySectionStopDelegateLineSegment.qml @@ -46,24 +46,24 @@ Item { Kirigami.ShadowedRectangle { id: line x: root.lineWidth / 2 - y: isDeparture? parent.height-height:0 + y: root.isDeparture ? parent.height-height:0 width: root.lineWidth color: root.lineColor corners { - topRightRadius: isDeparture ? Math.round(width / 2) : 0 - topLeftRadius: isDeparture ? Math.round(width / 2) : 0 + topRightRadius: root.isDeparture ? Math.round(width / 2) : 0 + topLeftRadius: root.isDeparture ? Math.round(width / 2) : 0 - bottomRightRadius: isArrival ? Math.round(width / 2) : 0 - bottomLeftRadius: isArrival ? Math.round(width / 2) : 0 + bottomRightRadius: root.isArrival ? Math.round(width / 2) : 0 + bottomLeftRadius: root.isArrival ? Math.round(width / 2) : 0 } height: - if (isArrival) { - Math.round(parent.height / 2) + root.lineWidth / 2 - } else if (isDeparture) { - Math.round(parent.height / 2) + root.lineWidth / 2 + if (root.isArrival) { + return Math.round(parent.height / 2) + root.lineWidth / 2 + } else if (root.isDeparture) { + return Math.round(parent.height / 2) + root.lineWidth / 2 } else { - parent.height + return parent.height } } diff --git a/src/messagecontent/LinkPreviewComponent.qml b/src/messagecontent/LinkPreviewComponent.qml index 954a1d4e7..99c0798b8 100644 --- a/src/messagecontent/LinkPreviewComponent.qml +++ b/src/messagecontent/LinkPreviewComponent.qml @@ -111,7 +111,7 @@ QQC2.Control { Layout.fillWidth: true Layout.maximumHeight: maximizeButton.checked ? -1 : root.defaultHeight - linkPreviewTitle.height - column.spacing visible: linkPreviewTitle.height + column.spacing + font.pointSize <= root.defaultHeight || maximizeButton.checked - text: linkPreviewer.description + text: root.linkPreviewer.description wrapMode: Text.Wrap elide: Text.ElideRight } diff --git a/src/messagecontent/LiveLocationComponent.qml b/src/messagecontent/LiveLocationComponent.qml index 9e86c043c..94e343944 100644 --- a/src/messagecontent/LiveLocationComponent.qml +++ b/src/messagecontent/LiveLocationComponent.qml @@ -79,7 +79,7 @@ ColumnLayout { } Connections { target: mapView.map - function onCopyrightLinkActivated() { + function onCopyrightLinkActivated(link: string) { Qt.openUrlExternally(link); } }