mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 03:06:00 +08:00
Update WorkSpaceSummaryDialog
CURA 8687
This commit is contained in:
parent
30bd9e7d67
commit
6b85423948
@ -4,7 +4,6 @@
|
|||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 2.9
|
import QtQuick.Controls 2.9
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Window 2.2
|
|
||||||
|
|
||||||
import UM 1.5 as UM
|
import UM 1.5 as UM
|
||||||
import Cura 1.0 as Cura
|
import Cura 1.0 as Cura
|
||||||
@ -14,26 +13,14 @@ UM.Dialog
|
|||||||
id: base
|
id: base
|
||||||
title: catalog.i18nc("@title:window", "Save Project")
|
title: catalog.i18nc("@title:window", "Save Project")
|
||||||
|
|
||||||
minimumWidth: 500 * screenScaleFactor
|
minimumWidth: UM.Theme.getSize("popup_dialog").width
|
||||||
minimumHeight: 400 * screenScaleFactor
|
minimumHeight: UM.Theme.getSize("popup_dialog").height
|
||||||
width: minimumWidth
|
width: minimumWidth
|
||||||
height: minimumHeight
|
height: minimumHeight
|
||||||
|
|
||||||
property int spacerHeight: 10 * screenScaleFactor
|
|
||||||
|
|
||||||
property bool dontShowAgain: true
|
property bool dontShowAgain: true
|
||||||
|
|
||||||
signal yes();
|
onClosing: UM.Preferences.setValue("cura/dialog_on_project_save", !dontShowAgainCheckbox.checked)
|
||||||
|
|
||||||
function accept() { // pressing enter will call this function
|
|
||||||
close();
|
|
||||||
yes();
|
|
||||||
}
|
|
||||||
|
|
||||||
onClosing:
|
|
||||||
{
|
|
||||||
UM.Preferences.setValue("cura/dialog_on_project_save", !dontShowAgainCheckbox.checked)
|
|
||||||
}
|
|
||||||
|
|
||||||
onVisibleChanged:
|
onVisibleChanged:
|
||||||
{
|
{
|
||||||
@ -78,7 +65,7 @@ UM.Dialog
|
|||||||
{
|
{
|
||||||
top: mainHeading.bottom
|
top: mainHeading.bottom
|
||||||
topMargin: UM.Theme.getSize("default_margin").height
|
topMargin: UM.Theme.getSize("default_margin").height
|
||||||
bottom: controls.top
|
bottom: parent.bottom
|
||||||
bottomMargin: UM.Theme.getSize("default_margin").height
|
bottomMargin: UM.Theme.getSize("default_margin").height
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,43 +267,32 @@ UM.Dialog
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item
|
|
||||||
{
|
|
||||||
id: controls
|
|
||||||
width: parent.width
|
|
||||||
height: childrenRect.height
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
CheckBox
|
|
||||||
{
|
|
||||||
id: dontShowAgainCheckbox
|
|
||||||
anchors.left: parent.left
|
|
||||||
text: catalog.i18nc("@action:label", "Don't show project summary on save again")
|
|
||||||
checked: dontShowAgain
|
|
||||||
}
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
id: cancel_button
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
right: ok_button.left
|
|
||||||
rightMargin: UM.Theme.getSize("default_margin").width
|
|
||||||
}
|
|
||||||
text: catalog.i18nc("@action:button","Cancel");
|
|
||||||
enabled: true
|
|
||||||
onClicked: close()
|
|
||||||
}
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
id: ok_button
|
|
||||||
anchors.right: parent.right
|
|
||||||
text: catalog.i18nc("@action:button","Save");
|
|
||||||
enabled: true
|
|
||||||
onClicked:
|
|
||||||
{
|
|
||||||
close()
|
|
||||||
yes()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buttonSpacing: UM.Theme.getSize("thin_margin").width
|
||||||
|
|
||||||
|
leftButtons:
|
||||||
|
[
|
||||||
|
CheckBox
|
||||||
|
{
|
||||||
|
id: dontShowAgainCheckbox
|
||||||
|
anchors.left: parent.left
|
||||||
|
text: catalog.i18nc("@action:label", "Don't show project summary on save again")
|
||||||
|
checked: dontShowAgain
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
rightButtons:
|
||||||
|
[
|
||||||
|
Cura.SecondaryButton
|
||||||
|
{
|
||||||
|
text: catalog.i18nc("@action:button", "Cancel")
|
||||||
|
onClicked: base.reject()
|
||||||
|
},
|
||||||
|
Cura.PrimaryButton
|
||||||
|
{
|
||||||
|
text: catalog.i18nc("@action:button", "Save")
|
||||||
|
onClicked: base.accept()
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ Item
|
|||||||
{
|
{
|
||||||
id: saveWorkspaceDialog
|
id: saveWorkspaceDialog
|
||||||
property var args
|
property var args
|
||||||
onYes: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args)
|
onAccepted: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageDialog
|
UM.MessageDialog
|
||||||
|
@ -52,6 +52,6 @@ Cura.Menu
|
|||||||
id: saveWorkspaceDialog
|
id: saveWorkspaceDialog
|
||||||
property var args
|
property var args
|
||||||
property var deviceId
|
property var deviceId
|
||||||
onYes: UM.OutputDeviceManager.requestWriteToDevice(deviceId, PrintInformation.jobName, args)
|
onAccepted: UM.OutputDeviceManager.requestWriteToDevice(deviceId, PrintInformation.jobName, args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user