small changes and the beginning of a TextBackground.qml

This commit is contained in:
Chris Cochrun 2023-09-28 15:17:35 -05:00
parent 9f4d426a8f
commit 7e6e8c71e0
4 changed files with 31 additions and 6 deletions

View file

@ -120,7 +120,7 @@ Item {
Layout.fillHeight: true
text: "Image"
icon.name: "folder-pictures-symbolic"
onClicked: imageFileDialog.open() & backgroundTypePopup.close()
onClicked: updateBackground("image") & backgroundTypePopup.close()
}
}
}
@ -499,10 +499,11 @@ Item {
songProxyModel.songModel.updateAudio(songIndex, file);
}
function updateBackground(background, backgroundType) {
function updateBackground(backgroundType) {
song.backgroundType = backgroundType;
song.background = background;
songProxyModel.songModel.updateBackground(songIndex, background);
const file = fileHelper.loadFile("Pick Background");
song.background = file;
songProxyModel.songModel.updateBackground(songIndex, file);
songProxyModel.songModel.updateBackgroundType(songIndex, backgroundType);
console.log("changed background");
/* if (backgroundType === "image") { */