Add files settings in UI (wip)

This commit is contained in:
Vyn 2024-04-22 15:45:26 +02:00
parent e5328c15d4
commit d8d50582c3
7 changed files with 92 additions and 35 deletions

View file

@ -12,9 +12,21 @@ import Mirai
ColumnLayout {
AppText {
text: "Files"
font.pixelSize: 32
RowLayout {
AppText {
text: "Files"
font.pixelSize: 32
}
Item { Layout.fillWidth: true }
AppIcon {
icon.source: "qrc:/qt/qml/Mirai/src/images/settings.png"
icon.color: colorPalette.selected.textPlaceholder
onClicked: {
filesForm.reset();
filesFormPopup.open();
}
}
}
Item { Layout.preferredHeight: 16 }
@ -82,7 +94,6 @@ ColumnLayout {
AppText {
text: modelData.name
color: {
console.log("ttagg", modelData.name, modelData.color)
return modelData.color
}
padding: 4
@ -117,6 +128,31 @@ ColumnLayout {
}
}
Popup {
parent: Overlay.overlay
id: filesFormPopup
width: parent.width * 0.75
implicitHeight: filesForm.height + padding * 2
x: Math.round((parent.width - width) / 2)
y: Math.round((parent.height * 0.4) / 2)
padding: 8
background: Rectangle {
border.color: colorPalette.selected.modalBorder
border.width: 2
color: colorPalette.selected.pane
radius: 4
}
FilesForm {
id: filesForm
width: parent.width
onConfirmed: (filesPath) => {
filesFormPopup.close()
console.log(filesPath)
backend.saveFilesPath(filesPath)
}
}
}
Popup {
parent: Overlay.overlay
id: tagsFormPopup