diff options
author | Ghostkeeper <rubend@tutanota.com> | 2022-02-04 15:24:14 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2022-02-04 15:24:14 +0300 |
commit | 9a3cab1ec2c71ec1a16370015664326324197c16 (patch) | |
tree | 8802c7c36c217f57f3da018c641d29ee0fec9b1d /resources/qml/Cura.qml | |
parent | b18582e1fb2322df5c7a7ff35ef6381bf07b1df8 (diff) |
Change easy dialogs to UM.MessageDialog
A few fields have changed.
There's also a harder one, a generic one that is re-usable. I want to do that one in a separate commit since it'll need to be checked all over the code for its usage.
Contributes to issue CURA-8687.
Diffstat (limited to 'resources/qml/Cura.qml')
-rw-r--r-- | resources/qml/Cura.qml | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index f959e62977..7e347df4ee 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 @@ -253,7 +253,6 @@ UM.MainWindow // Try to install plugin & close. CuraApplication.installPackageViaDragAndDrop(filename); packageInstallDialog.text = catalog.i18nc("@label", "This package will be installed after restarting."); - packageInstallDialog.icon = StandardIcon.Information; packageInstallDialog.open(); } else @@ -586,18 +585,15 @@ UM.MainWindow } } - MessageDialog + UM.MessageDialog { id: exitConfirmationDialog title: catalog.i18nc("@title:window %1 is the application name", "Closing %1").arg(CuraApplication.applicationDisplayName) text: catalog.i18nc("@label %1 is the application name", "Are you sure you want to exit %1?").arg(CuraApplication.applicationDisplayName) - icon: StandardIcon.Question - modality: Qt.ApplicationModal - standardButtons: StandardButton.Yes | StandardButton.No - onYes: CuraApplication.callConfirmExitDialogCallback(true) - onNo: CuraApplication.callConfirmExitDialogCallback(false) + standardButtons: Dialog.Yes | Dialog.No + onAccepted: CuraApplication.callConfirmExitDialogCallback(true) onRejected: CuraApplication.callConfirmExitDialogCallback(false) - onVisibilityChanged: + onClosed: { if (!visible) { @@ -747,20 +743,18 @@ UM.MainWindow } } - MessageDialog + UM.MessageDialog { id: packageInstallDialog title: catalog.i18nc("@window:title", "Install Package"); standardButtons: StandardButton.Ok - modality: Qt.ApplicationModal } - MessageDialog + UM.MessageDialog { id: infoMultipleFilesWithGcodeDialog title: catalog.i18nc("@title:window", "Open File(s)") - icon: StandardIcon.Information - standardButtons: StandardButton.Ok + standardButtons: Dialog.Ok text: catalog.i18nc("@text:window", "We have found one or more G-Code files within the files you have selected. You can only open one G-Code file at a time. If you want to open a G-Code file, please just select only one.") property var selectedMultipleFiles |