From 7cd57e2376581af04bf6b61a64bc8b6fca5fdd36 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 6 Mar 2023 11:08:18 -0600 Subject: [PATCH] making labels selectable --- src/qml/presenter/ImageEditor.qml | 23 ++++++++++++++-------- src/qml/presenter/PresentationEditor.qml | 14 +++++++++++++ src/qml/presenter/VideoEditor.qml | 25 +++++++++++++++--------- 3 files changed, 45 insertions(+), 17 deletions(-) diff --git a/src/qml/presenter/ImageEditor.qml b/src/qml/presenter/ImageEditor.qml index 765cbca..f56b652 100644 --- a/src/qml/presenter/ImageEditor.qml +++ b/src/qml/presenter/ImageEditor.qml @@ -1,4 +1,4 @@ -import QtQuick 2.13 +import QtQuick 2.15 import QtQuick.Controls 2.15 as Controls import QtQuick.Dialogs 1.3 import QtQuick.Layouts 1.15 @@ -108,13 +108,6 @@ Item { Layout.preferredHeight: 30 } - Controls.Label { - id: filePathLabel - Layout.preferredWidth: 600 - Layout.alignment: Qt.AlignCenter - text: image.filePath - } - Image { id: imagePreview Layout.preferredWidth: 600 @@ -128,6 +121,20 @@ Item { Layout.fillHeight: true } + Controls.TextArea { + id: filePathLabel + Layout.alignment: Qt.AlignBottom + Layout.fillWidth: true + text: image.filePath + background: Item{} + readOnly: true + HoverHandler { + id: hoverHandler + enabled: false + cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.IBeamCursor + } + } + } } diff --git a/src/qml/presenter/PresentationEditor.qml b/src/qml/presenter/PresentationEditor.qml index a33a885..f0ed964 100644 --- a/src/qml/presenter/PresentationEditor.qml +++ b/src/qml/presenter/PresentationEditor.qml @@ -144,6 +144,20 @@ Item { Layout.fillHeight: true } + Controls.TextArea { + id: filePathLabel + Layout.alignment: Qt.AlignBottom + Layout.fillWidth: true + text: presentation.filePath + background: Item{} + readOnly: true + HoverHandler { + id: hoverHandler + enabled: false + cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.IBeamCursor + } + } + } } diff --git a/src/qml/presenter/VideoEditor.qml b/src/qml/presenter/VideoEditor.qml index da66e5d..d04a57d 100644 --- a/src/qml/presenter/VideoEditor.qml +++ b/src/qml/presenter/VideoEditor.qml @@ -1,4 +1,4 @@ -import QtQuick 2.13 +import QtQuick 2.15 import QtQuick.Controls 2.15 as Controls import QtQuick.Dialogs 1.3 import QtQuick.Layouts 1.15 @@ -110,14 +110,6 @@ Item { Layout.columnSpan: 2 } - Controls.Label { - id: filePathLabel - Layout.columnSpan: 2 - Layout.preferredWidth: 600 - Layout.alignment: Qt.AlignCenter - text: video.filePath - } - MpvObject { id: videoPreview objectName: "mpv" @@ -213,6 +205,21 @@ Item { Layout.fillHeight: true } + Controls.TextArea { + id: filePathLabel + Layout.alignment: Qt.AlignBottom + Layout.fillWidth: true + Layout.columnSpan: 2 + text: video.filePath + background: Item{} + readOnly: true + HoverHandler { + id: hoverHandler + enabled: false + cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.IBeamCursor + } + } + /* } */ } Timer {