small ui tweaks and fixes

This commit is contained in:
Chris Cochrun 2023-10-06 08:34:02 -05:00
parent cec9a93b72
commit 19e3c71ff2
4 changed files with 51 additions and 7 deletions

View file

@ -34,12 +34,47 @@ Item {
text: image.title text: image.title
padding: 10 padding: 10
onEditingFinished: updateTitle(text); onEditingFinished: updateTitle(text);
background: Presenter.TextBackground {
control: imageTitleField
}
} }
Controls.ComboBox { Controls.ComboBox {
id: layoutBox
model: ["Fill", "Crop", "Height", "Width"] model: ["Fill", "Crop", "Height", "Width"]
implicitWidth: 100 implicitWidth: 100
hoverEnabled: true 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 {} Controls.ToolSeparator {}
@ -123,6 +158,8 @@ Item {
let img = imageProxyModel.getImage(index); let img = imageProxyModel.getImage(index);
root.image = img; root.image = img;
console.log(img.filePath.toString()); console.log(img.filePath.toString());
footerFirstText = "File path: ";
footerSecondText = image.filePath;
} }
function updateTitle(text) { function updateTitle(text) {

View file

@ -259,7 +259,8 @@ Controls.Page {
currentWindow = presentation; currentWindow = presentation;
editMode = false; editMode = false;
refocusPresentation(); refocusPresentation();
/* footerLeftString = presenting ? "Presenting..." : "Presentation Preview" */ footerFirstText = presenting ? "Presenting..." : "Presentation Preview";
footerSecondText = "";
} }
} else { } else {
videoEditor.visible = false; videoEditor.visible = false;
@ -271,7 +272,8 @@ Controls.Page {
currentWindow = presentation; currentWindow = presentation;
editMode = false; editMode = false;
refocusPresentation(); refocusPresentation();
/* footerLeftString = presenting ? "Presenting..." : "Presentation Preview" */ footerFirstText = presenting ? "Presenting..." : "Presentation Preview"
footerSecondText = "";
} }
} }

View file

@ -225,14 +225,14 @@ Item {
height: parent.height height: parent.height
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: 1 width: 1
color: Controls.SplitHandle.hovered ? Kirigami.Theme.hoverColor : Kirigami.Theme.backgroundColor color: parent.Controls.SplitHandle.hovered ? Kirigami.Theme.hoverColor : Kirigami.Theme.backgroundColor
} }
} }
ColumnLayout { ColumnLayout {
Controls.SplitView.fillHeight: true Controls.SplitView.fillHeight: true
Controls.SplitView.preferredWidth: 500 Controls.SplitView.preferredWidth: 500
Controls.SplitView.minimumWidth: 500 Controls.SplitView.minimumWidth: 300
Controls.Label { Controls.Label {
id: songTitleLabel id: songTitleLabel
@ -542,8 +542,10 @@ Item {
changeSlideFont(song.font, true); changeSlideFont(song.font, true);
changeSlideFontSize(song.fontSize, true) changeSlideFontSize(song.fontSize, true)
changeSlideText(songProxyModel.modelIndex(index).row); changeSlideText(songProxyModel.modelIndex(index).row);
songList.loadVideo();
console.log("Changing to song: " + song.title + " with ID: " + song.id); console.log("Changing to song: " + song.title + " with ID: " + song.id);
footerFirstText = "Song: ";
footerSecondText = song.title;
songList.loadVideo();
} }
function updateLyrics(lyrics) { function updateLyrics(lyrics) {

View file

@ -56,6 +56,9 @@ Item {
padding: 10 padding: 10
checked: video.loop checked: video.loop
onToggled: updateLoop(!video.loop) onToggled: updateLoop(!video.loop)
background: Presenter.TextBackground {
control: loopCheckBox
}
} }
Controls.ToolSeparator {} Controls.ToolSeparator {}
@ -200,7 +203,7 @@ Item {
Layout.preferredWidth: parent.width Layout.preferredWidth: parent.width
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft
RowLayout { ColumnLayout {
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft
Controls.Label { Controls.Label {
text: "Start Time:" text: "Start Time:"
@ -216,7 +219,7 @@ Item {
} }
} }
RowLayout { ColumnLayout {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
Controls.Label { Controls.Label {
text: "End Time:" text: "End Time:"