summary refs log tree commit diff
diff options
context:
space:
mode:
authorFallenValkyrie <e.vanemelen@proton.me>2023-12-07 01:00:06 +0100
committerFallenValkyrie <e.vanemelen@proton.me>2023-12-16 15:48:11 +0100
commit2aefe78a63ef7cbb03f46e20273564c2c74f9464 (patch)
tree638642cdd10ac817996952446f5f077e6a8d9312
parentCreate ImagePackDeleteDialog component (diff)
downloadnheko-2aefe78a63ef7cbb03f46e20273564c2c74f9464.tar.xz
Integrate ImagePackDeleteDialog in ImagePackSettingsDialog as delete confirmation
-rw-r--r--resources/qml/dialogs/ImagePackSettingsDialog.qml36
1 files changed, 27 insertions, 9 deletions
diff --git a/resources/qml/dialogs/ImagePackSettingsDialog.qml b/resources/qml/dialogs/ImagePackSettingsDialog.qml

index 9f807e65..12b4fd37 100644 --- a/resources/qml/dialogs/ImagePackSettingsDialog.qml +++ b/resources/qml/dialogs/ImagePackSettingsDialog.qml
@@ -32,7 +32,11 @@ ApplicationWindow { ImagePackEditorDialog { } + } + Component { + id: packDeleteDialog + ImagePackDeleteDialog {} } AdaptiveLayout { @@ -189,16 +193,30 @@ ApplicationWindow { } - Button { + RowLayout { Layout.alignment: Qt.AlignHCenter - text: qsTr("Edit") - enabled: currentPack.canEdit - onClicked: { - var dialog = packEditor.createObject(timelineRoot, { - "imagePack": currentPack - }); - dialog.show(); - timelineRoot.destroyOnClose(dialog); + + Button { + text: qsTr("Edit") + enabled: currentPack.canEdit + onClicked: { + var dialog = packEditor.createObject(timelineRoot, { + "imagePack": currentPack + }); + dialog.show(); + timelineRoot.destroyOnClose(dialog); + } + } + Button { + text: qsTr("Remove") + enabled: currentPack.canEdit + onClicked: { + var dialog = packDeleteDialog.createObject(timelineRoot, { + "imagePack": currentPack + }); + dialog.open(); + timelineRoot.destroyOnClose(packDeleteDialog); + } } }