mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 14:55:03 -06:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
c9ba269084
17 changed files with 413 additions and 29 deletions
|
@ -16,7 +16,7 @@ UM.MainWindow
|
|||
{
|
||||
id: base
|
||||
//: Cura application window title
|
||||
title: catalog.i18nc("@title:window","Cura");
|
||||
title: catalog.i18nc("@title:window","Ultimaker Cura");
|
||||
viewportRect: Qt.rect(0, 0, (base.width - sidebar.width) / base.width, 1.0)
|
||||
property bool showPrintMonitor: false
|
||||
|
||||
|
|
|
@ -36,8 +36,6 @@ UM.Dialog
|
|||
|
||||
var meshName = backgroundItem.getMeshName(projectFile.toString());
|
||||
backgroundItem.hasMesh(decodeURIComponent(meshName));
|
||||
// always update the job name with the loaded project
|
||||
PrintInformation.setBaseName(meshName);
|
||||
}
|
||||
|
||||
function loadModelFiles(fileUrls)
|
||||
|
|
|
@ -20,11 +20,40 @@ Item
|
|||
property variant minimumPrintTime: PrintInformation.minimumPrintTime;
|
||||
property variant maximumPrintTime: PrintInformation.maximumPrintTime;
|
||||
property bool settingsEnabled: ExtruderManager.activeExtruderStackId || machineExtruderCount.properties.value == 1
|
||||
property bool hasUserSettings;
|
||||
|
||||
Component.onCompleted: PrintInformation.enabled = true
|
||||
Component.onDestruction: PrintInformation.enabled = false
|
||||
UM.I18nCatalog { id: catalog; name: "cura" }
|
||||
|
||||
onVisibleChanged:
|
||||
{
|
||||
if (visible)
|
||||
{
|
||||
base.checkUserSettings()
|
||||
}
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: CuraApplication
|
||||
onSidebarSimpleDiscardOrKeepProfileChanges:
|
||||
{
|
||||
base.hasUserSettings = false
|
||||
}
|
||||
}
|
||||
|
||||
function checkUserSettings(){
|
||||
|
||||
var skip_keys = ["support_enable" ,
|
||||
"infill_sparse_density",
|
||||
"gradual_infill_steps",
|
||||
"adhesion_type",
|
||||
"support_extruder_nr"]
|
||||
|
||||
base.hasUserSettings = Cura.MachineManager.hasUserCustomSettings(skip_keys)
|
||||
}
|
||||
|
||||
ScrollView
|
||||
{
|
||||
visible: Cura.MachineManager.activeMachineName != "" // If no printers added then the view is invisible
|
||||
|
@ -291,6 +320,7 @@ Item
|
|||
implicitWidth: 10 * screenScaleFactor
|
||||
implicitHeight: implicitWidth
|
||||
radius: implicitWidth / 2
|
||||
visible: !hasUserSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -308,6 +338,33 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//If any of settings were changed in custom mode then the Rectangle will
|
||||
//overlap quality slider area. It is used to catch mouse click
|
||||
Rectangle {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: extrudersModelCheckBox.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
width: qualitySlider.width
|
||||
height: qualitySlider.height * 1.5
|
||||
//border.width: UM.Theme.getSize("default_lining").width // dispay overlap zone
|
||||
//border.color: UM.Theme.getColor("lining")
|
||||
|
||||
color: "transparent"
|
||||
|
||||
visible: hasUserSettings
|
||||
enabled: hasUserSettings
|
||||
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
discardOrKeepProfileChangesDialog.show()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
|
@ -346,6 +403,33 @@ Item
|
|||
color: (qualityModel.availableTotalTicks > 0) ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable")
|
||||
horizontalAlignment: Text.AlignRight
|
||||
}
|
||||
|
||||
UM.SimpleButton
|
||||
{
|
||||
id: customisedSettings
|
||||
|
||||
visible: hasUserSettings
|
||||
height: speedSlider.height * 0.8
|
||||
width: speedSlider.height * 0.8
|
||||
|
||||
anchors.verticalCenter: speedSlider.verticalCenter
|
||||
anchors.right: speedSlider.left
|
||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width / 2
|
||||
|
||||
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
|
||||
iconSource: UM.Theme.getIcon("reset");
|
||||
|
||||
onClicked:
|
||||
{
|
||||
discardOrKeepProfileChangesDialog.show()
|
||||
}
|
||||
onEntered:
|
||||
{
|
||||
var content = catalog.i18nc("@tooltip","You have selected a custom profile. If you want to change it, go to custom mode.")
|
||||
base.showTooltip(qualityRow, Qt.point(-UM.Theme.getSize("sidebar_margin").width, customisedSettings.height), content)
|
||||
}
|
||||
onExited: base.hideTooltip()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -661,11 +745,14 @@ Item
|
|||
anchors.topMargin: Math.floor(UM.Theme.getSize("sidebar_margin").height * 1.5)
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.right: infillCellLeft.right
|
||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.verticalCenter: enableSupportCheckBox.verticalCenter
|
||||
|
||||
text: catalog.i18nc("@label", "Generate Support");
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
CheckBox
|
||||
|
@ -711,10 +798,13 @@ Item
|
|||
visible: supportExtruderCombobox.visible
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.right: infillCellLeft.right
|
||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.verticalCenter: supportExtruderCombobox.verticalCenter
|
||||
text: catalog.i18nc("@label", "Support Extruder");
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
ComboBox
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue