From 19e3c71ff2528aa3563c89466684460757d6f024 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 6 Oct 2023 08:34:02 -0500 Subject: [PATCH] small ui tweaks and fixes --- src/qml/presenter/ImageEditor.qml | 37 +++++++++++++++++++++++++++++++ src/qml/presenter/MainWindow.qml | 6 +++-- src/qml/presenter/SongEditor.qml | 8 ++++--- src/qml/presenter/VideoEditor.qml | 7 ++++-- 4 files changed, 51 insertions(+), 7 deletions(-) diff --git a/src/qml/presenter/ImageEditor.qml b/src/qml/presenter/ImageEditor.qml index e49552e..e345a16 100644 --- a/src/qml/presenter/ImageEditor.qml +++ b/src/qml/presenter/ImageEditor.qml @@ -34,12 +34,47 @@ Item { text: image.title padding: 10 onEditingFinished: updateTitle(text); + background: Presenter.TextBackground { + control: imageTitleField + } } Controls.ComboBox { + id: layoutBox model: ["Fill", "Crop", "Height", "Width"] implicitWidth: 100 hoverEnabled: true + background: Presenter.TextBackground { + control: layoutBox + } + + indicator: Kirigami.Icon { + anchors {right: parent.right + verticalCenter: parent.verticalCenter + rightMargin: 2} + source: "arrow-down" + rotation: layoutBox.down ? 180 : 0 + color: layoutBox.pressed ? Kirigami.Theme.focusColor : Kirigami.Theme.textColor + + Behavior on rotation { + NumberAnimation { + easing.type: Easing.OutCubic + duration: 300 + } + } + } + + + contentItem: Text { + leftPadding: 0 + rightPadding: layoutBox.indicator.width + layoutBox.spacing + + text: layoutBox.displayText + font: layoutBox.font + color: layoutBox.pressed ? Kirigami.Theme.focusColor : Kirigami.Theme.textColor; + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } } Controls.ToolSeparator {} @@ -123,6 +158,8 @@ Item { let img = imageProxyModel.getImage(index); root.image = img; console.log(img.filePath.toString()); + footerFirstText = "File path: "; + footerSecondText = image.filePath; } function updateTitle(text) { diff --git a/src/qml/presenter/MainWindow.qml b/src/qml/presenter/MainWindow.qml index d336ae0..abb5740 100644 --- a/src/qml/presenter/MainWindow.qml +++ b/src/qml/presenter/MainWindow.qml @@ -259,7 +259,8 @@ Controls.Page { currentWindow = presentation; editMode = false; refocusPresentation(); - /* footerLeftString = presenting ? "Presenting..." : "Presentation Preview" */ + footerFirstText = presenting ? "Presenting..." : "Presentation Preview"; + footerSecondText = ""; } } else { videoEditor.visible = false; @@ -271,7 +272,8 @@ Controls.Page { currentWindow = presentation; editMode = false; refocusPresentation(); - /* footerLeftString = presenting ? "Presenting..." : "Presentation Preview" */ + footerFirstText = presenting ? "Presenting..." : "Presentation Preview" + footerSecondText = ""; } } diff --git a/src/qml/presenter/SongEditor.qml b/src/qml/presenter/SongEditor.qml index 432b0d5..23fcf68 100644 --- a/src/qml/presenter/SongEditor.qml +++ b/src/qml/presenter/SongEditor.qml @@ -225,14 +225,14 @@ Item { height: parent.height anchors.horizontalCenter: parent.horizontalCenter width: 1 - color: Controls.SplitHandle.hovered ? Kirigami.Theme.hoverColor : Kirigami.Theme.backgroundColor + color: parent.Controls.SplitHandle.hovered ? Kirigami.Theme.hoverColor : Kirigami.Theme.backgroundColor } } ColumnLayout { Controls.SplitView.fillHeight: true Controls.SplitView.preferredWidth: 500 - Controls.SplitView.minimumWidth: 500 + Controls.SplitView.minimumWidth: 300 Controls.Label { id: songTitleLabel @@ -542,8 +542,10 @@ Item { changeSlideFont(song.font, true); changeSlideFontSize(song.fontSize, true) changeSlideText(songProxyModel.modelIndex(index).row); - songList.loadVideo(); console.log("Changing to song: " + song.title + " with ID: " + song.id); + footerFirstText = "Song: "; + footerSecondText = song.title; + songList.loadVideo(); } function updateLyrics(lyrics) { diff --git a/src/qml/presenter/VideoEditor.qml b/src/qml/presenter/VideoEditor.qml index 4762e59..0e20e5a 100644 --- a/src/qml/presenter/VideoEditor.qml +++ b/src/qml/presenter/VideoEditor.qml @@ -56,6 +56,9 @@ Item { padding: 10 checked: video.loop onToggled: updateLoop(!video.loop) + background: Presenter.TextBackground { + control: loopCheckBox + } } Controls.ToolSeparator {} @@ -200,7 +203,7 @@ Item { Layout.preferredWidth: parent.width Layout.alignment: Qt.AlignLeft - RowLayout { + ColumnLayout { Layout.alignment: Qt.AlignLeft Controls.Label { text: "Start Time:" @@ -216,7 +219,7 @@ Item { } } - RowLayout { + ColumnLayout { Layout.alignment: Qt.AlignRight Controls.Label { text: "End Time:"