diff --git a/plugins/CuraDrive/src/qml/components/BackupListItem.qml b/plugins/CuraDrive/src/qml/components/BackupListItem.qml index 41e3fb0bf6..a3b9770718 100644 --- a/plugins/CuraDrive/src/qml/components/BackupListItem.qml +++ b/plugins/CuraDrive/src/qml/components/BackupListItem.qml @@ -87,7 +87,7 @@ Item anchors.top: dataRow.bottom } - UM.MessageDialog + Cura.MessageDialog { id: confirmDeleteDialog title: catalog.i18nc("@dialog:title", "Delete Backup") @@ -96,7 +96,7 @@ Item onAccepted: CuraDrive.deleteBackup(modelData.backup_id) } - UM.MessageDialog + Cura.MessageDialog { id: confirmRestoreDialog title: catalog.i18nc("@dialog:title", "Restore Backup") diff --git a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml index 587ab61613..9c96fdca9e 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml @@ -256,7 +256,7 @@ Cura.MachineAction } } - UM.MessageDialog + Cura.MessageDialog { id: invalidIPAddressMessageDialog title: catalog.i18nc("@title:window", "Invalid IP address") diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml index d95ca8a88e..6fb0d38ea2 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml @@ -133,7 +133,7 @@ Item } } - UM.MessageDialog + Cura.MessageDialog { id: sendToTopConfirmationDialog onAccepted: OutputDevice.sendJobToTop(printJob.key) @@ -142,7 +142,7 @@ Item title: catalog.i18nc("@window:title", "Move print job to top") } - UM.MessageDialog + Cura.MessageDialog { id: deleteConfirmationDialog onAccepted: OutputDevice.deleteJobFromQueue(printJob.key) @@ -151,7 +151,7 @@ Item title: catalog.i18nc("@window:title", "Delete print job") } - UM.MessageDialog + Cura.MessageDialog { id: abortConfirmationDialog onAccepted: printJob.setState("abort") diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 67a3617033..70fae42162 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -585,7 +585,7 @@ UM.MainWindow } } - UM.MessageDialog + Cura.MessageDialog { id: exitConfirmationDialog title: catalog.i18nc("@title:window %1 is the application name", "Closing %1").arg(CuraApplication.applicationDisplayName) @@ -743,14 +743,14 @@ UM.MainWindow } } - UM.MessageDialog + Cura.MessageDialog { id: packageInstallDialog title: catalog.i18nc("@window:title", "Install Package") standardButtons: StandardButton.Ok } - UM.MessageDialog + Cura.MessageDialog { id: infoMultipleFilesWithGcodeDialog title: catalog.i18nc("@title:window", "Open File(s)") diff --git a/resources/qml/Dialogs/MessageDialog.qml b/resources/qml/Dialogs/MessageDialog.qml new file mode 100644 index 0000000000..0735064548 --- /dev/null +++ b/resources/qml/Dialogs/MessageDialog.qml @@ -0,0 +1,20 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import UM 1.5 as UM +import Cura 1.5 as Cura + +// Wrapper around the UM.MessageBox with the primary/secondarybuttons +// set to Cura.PrimaryButton and Cura.SecondaryButton respectively +UM.MessageDialog +{ + primaryButton: Cura.PrimaryButton + { + text: model.text + } + + secondaryButton: Cura.TertiaryButton + { + text: model.text + } +} \ No newline at end of file diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index 763f199902..4cbde8424d 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -55,7 +55,7 @@ Item onAccepted: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args) } - UM.MessageDialog + Cura.MessageDialog { id: newProjectDialog diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 54b9437a6c..0f8c178767 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -322,7 +322,7 @@ Item onClicked: confirmationDialog.visible = true } - UM.MessageDialog + Cura.MessageDialog { id: confirmationDialog diff --git a/resources/qml/Preferences/Materials/MaterialsPage.qml b/resources/qml/Preferences/Materials/MaterialsPage.qml index 2e4ded685d..c9e6cf07a1 100644 --- a/resources/qml/Preferences/Materials/MaterialsPage.qml +++ b/resources/qml/Preferences/Materials/MaterialsPage.qml @@ -310,7 +310,7 @@ Item } // Dialogs - UM.MessageDialog + Cura.MessageDialog { id: confirmRemoveMaterialDialog title: catalog.i18nc("@title:window", "Confirm Remove") @@ -337,7 +337,7 @@ Item { const result = Cura.ContainerManager.importMaterialContainer(fileUrl); - const messageDialog = Qt.createQmlObject("import UM 1.5 as UM; UM.MessageDialog { onClosed: destroy() }", base); + const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base); messageDialog.standardButtons = Dialog.Ok; messageDialog.title = catalog.i18nc("@title:window", "Import Material"); switch (result.status) @@ -365,7 +365,7 @@ Item { const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, selectedNameFilter, fileUrl); - const messageDialog = Qt.createQmlObject("import UM 1.5 as UM; UM.MessageDialog { onClosed: destroy() }", base); + const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base); messageDialog.title = catalog.i18nc("@title:window", "Export Material"); messageDialog.standardButtons = Dialog.Ok; switch (result.status) diff --git a/resources/qml/Preferences/Materials/MaterialsView.qml b/resources/qml/Preferences/Materials/MaterialsView.qml index d71a6f398f..915d36ff57 100644 --- a/resources/qml/Preferences/Materials/MaterialsView.qml +++ b/resources/qml/Preferences/Materials/MaterialsView.qml @@ -119,7 +119,7 @@ Item width: base.width property real rowHeight: brandTextField.height + UM.Theme.getSize("default_lining").height - UM.MessageDialog + Cura.MessageDialog { id: confirmDiameterChangeDialog diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index f9d5d9c4b3..1ee86f9f0c 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -137,7 +137,7 @@ UM.ManagementPage base.toActivateNewQuality = false; } } - UM.MessageDialog + Cura.MessageDialog { id: messageDialog standardButtons: Dialog.Ok @@ -245,7 +245,7 @@ UM.ManagementPage } // Confirmation dialog for removing a profile - UM.MessageDialog + Cura.MessageDialog { id: confirmRemoveQualityDialog