mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Integrate ImagePackDeleteDialog in ImagePackSettingsDialog as delete confirmation
This commit is contained in:
parent
e3fe1703fa
commit
2aefe78a63
1 changed files with 27 additions and 9 deletions
|
@ -32,7 +32,11 @@ ApplicationWindow {
|
||||||
|
|
||||||
ImagePackEditorDialog {
|
ImagePackEditorDialog {
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: packDeleteDialog
|
||||||
|
ImagePackDeleteDialog {}
|
||||||
}
|
}
|
||||||
|
|
||||||
AdaptiveLayout {
|
AdaptiveLayout {
|
||||||
|
@ -189,16 +193,30 @@ ApplicationWindow {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
RowLayout {
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
text: qsTr("Edit")
|
|
||||||
enabled: currentPack.canEdit
|
Button {
|
||||||
onClicked: {
|
text: qsTr("Edit")
|
||||||
var dialog = packEditor.createObject(timelineRoot, {
|
enabled: currentPack.canEdit
|
||||||
"imagePack": currentPack
|
onClicked: {
|
||||||
});
|
var dialog = packEditor.createObject(timelineRoot, {
|
||||||
dialog.show();
|
"imagePack": currentPack
|
||||||
timelineRoot.destroyOnClose(dialog);
|
});
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue