From e5a6b2b6efcb56072146aad5996132070f9c2078 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 6 Aug 2021 04:31:30 +0200 Subject: Allow creating new packs --- resources/qml/dialogs/ImagePackEditorDialog.qml | 8 +++---- resources/qml/dialogs/ImagePackSettingsDialog.qml | 28 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) (limited to 'resources/qml/dialogs') diff --git a/resources/qml/dialogs/ImagePackEditorDialog.qml b/resources/qml/dialogs/ImagePackEditorDialog.qml index 89301215..b839c9e3 100644 --- a/resources/qml/dialogs/ImagePackEditorDialog.qml +++ b/resources/qml/dialogs/ImagePackEditorDialog.qml @@ -186,7 +186,7 @@ ApplicationWindow { ToggleButton { checked: imagePack.isEmotePack - onToggled: imagePack.isEmotePack = checked + onClicked: imagePack.isEmotePack = checked Layout.alignment: Qt.AlignRight } @@ -196,7 +196,7 @@ ApplicationWindow { ToggleButton { checked: imagePack.isStickerPack - onToggled: imagePack.isStickerPack = checked + onClicked: imagePack.isStickerPack = checked Layout.alignment: Qt.AlignRight } @@ -251,7 +251,7 @@ ApplicationWindow { ToggleButton { checked: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.IsEmote) - onToggled: imagePack.setData(imagePack.index(currentImageIndex, 0), text, SingleImagePackModel.IsEmote) + onClicked: imagePack.setData(imagePack.index(currentImageIndex, 0), checked, SingleImagePackModel.IsEmote) Layout.alignment: Qt.AlignRight } @@ -261,7 +261,7 @@ ApplicationWindow { ToggleButton { checked: imagePack.data(imagePack.index(currentImageIndex, 0), SingleImagePackModel.IsSticker) - onToggled: imagePack.setData(imagePack.index(currentImageIndex, 0), text, SingleImagePackModel.IsSticker) + onClicked: imagePack.setData(imagePack.index(currentImageIndex, 0), checked, SingleImagePackModel.IsSticker) Layout.alignment: Qt.AlignRight } diff --git a/resources/qml/dialogs/ImagePackSettingsDialog.qml b/resources/qml/dialogs/ImagePackSettingsDialog.qml index c57867fd..5181619c 100644 --- a/resources/qml/dialogs/ImagePackSettingsDialog.qml +++ b/resources/qml/dialogs/ImagePackSettingsDialog.qml @@ -62,6 +62,34 @@ ApplicationWindow { enabled: !Settings.mobileMode } + footer: ColumnLayout { + Button { + palette: Nheko.colors + onClicked: { + var dialog = packEditor.createObject(timelineRoot, { + "imagePack": packlist.newPack(false) + }); + dialog.show(); + } + width: packlist.width + visible: !packlist.containsAccountPack + text: qsTr("Create account pack") + } + + Button { + palette: Nheko.colors + onClicked: { + var dialog = packEditor.createObject(timelineRoot, { + "imagePack": packlist.newPack(true) + }); + dialog.show(); + } + width: packlist.width + text: qsTr("New room pack") + } + + } + delegate: AvatarListTile { id: packItem -- cgit 1.5.1