diff options
546 files changed, 7572 insertions, 9292 deletions
diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000..ece341fbe4 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,5 @@ +# Reporting vulnerabilities + +If you discover a vulnerability, please let us know as soon as possible via `security@ultimaker.com`. +Please do not take advantage of the vulnerability and do not reveal the problem to others. +To allow us to resolve the issue, please do provide us with sufficient information to reproduce the problem. diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index d039a3c68f..fa230866e9 100755 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -1113,7 +1113,8 @@ class BuildVolume(SceneNode): # Use brim width if brim is enabled OR the prime tower has a brim. if adhesion_type == "brim": brim_line_count = skirt_brim_stack.getProperty("brim_line_count", "value") - bed_adhesion_size = skirt_brim_line_width * brim_line_count * initial_layer_line_width_factor / 100.0 + brim_gap = skirt_brim_stack.getProperty("brim_gap", "value") + bed_adhesion_size = brim_gap + skirt_brim_line_width * brim_line_count * initial_layer_line_width_factor / 100.0 for extruder_stack in used_extruders: bed_adhesion_size += extruder_stack.getProperty("skirt_brim_line_width", "value") * extruder_stack.getProperty("initial_layer_line_width_factor", "value") / 100.0 @@ -1214,7 +1215,7 @@ class BuildVolume(SceneNode): return max(min(value, max_value), min_value) _machine_settings = ["machine_width", "machine_depth", "machine_height", "machine_shape", "machine_center_is_zero"] - _skirt_settings = ["adhesion_type", "skirt_gap", "skirt_line_count", "skirt_brim_line_width", "brim_width", "brim_line_count", "raft_margin", "draft_shield_enabled", "draft_shield_dist", "initial_layer_line_width_factor"] + _skirt_settings = ["adhesion_type", "skirt_gap", "skirt_line_count", "skirt_brim_line_width", "brim_gap", "brim_width", "brim_line_count", "raft_margin", "draft_shield_enabled", "draft_shield_dist", "initial_layer_line_width_factor"] _raft_settings = ["adhesion_type", "raft_base_thickness", "raft_interface_layers", "raft_interface_thickness", "raft_surface_layers", "raft_surface_thickness", "raft_airgap", "layer_0_z_overlap"] _extra_z_settings = ["retraction_hop_enabled", "retraction_hop"] _prime_settings = ["extruder_prime_pos_x", "extruder_prime_pos_y", "prime_blob_enable"] diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 1aebb9a2db..4285f9ac1d 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -43,7 +43,7 @@ from UM.Scene.Selection import Selection from UM.Scene.ToolHandle import ToolHandle from UM.Settings.ContainerRegistry import ContainerRegistry from UM.Settings.InstanceContainer import InstanceContainer -from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType +from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType, toIntConversion from UM.Settings.SettingFunction import SettingFunction from UM.Settings.Validator import Validator from UM.View.SelectionPass import SelectionPass # For typing. @@ -382,11 +382,12 @@ class CuraApplication(QtApplication): SettingDefinition.addSupportedProperty("resolve", DefinitionPropertyType.Function, default=None, depends_on="value") - SettingDefinition.addSettingType("extruder", None, str, Validator) - SettingDefinition.addSettingType("optional_extruder", None, str, None) + SettingDefinition.addSettingType("extruder", None, toIntConversion, Validator) + SettingDefinition.addSettingType("optional_extruder", None, toIntConversion, None) SettingDefinition.addSettingType("[int]", None, str, None) + def _initializeSettingFunctions(self): """Adds custom property types, settings types, and extra operators (functions). @@ -679,22 +680,6 @@ class CuraApplication(QtApplication): self._setLoadingHint(self._i18n_catalog.i18nc("@info:progress", "Initializing Active Machine...")) super().setGlobalContainerStack(stack) - showMessageBox = pyqtSignal(str,str, str, str, int, int, - arguments = ["title", "text", "informativeText", "detailedText","buttons", "icon"]) - """A reusable dialogbox""" - - def messageBox(self, title, text, - informativeText = "", - detailedText = "", - buttons = QMessageBox.Ok, - icon = QMessageBox.NoIcon, - callback = None, - callback_arguments = [] - ): - self._message_box_callback = callback - self._message_box_callback_arguments = callback_arguments - self.showMessageBox.emit(title, text, informativeText, detailedText, buttons, icon) - showDiscardOrKeepProfileChanges = pyqtSignal() def discardOrKeepProfileChanges(self) -> bool: diff --git a/cura/Machines/Models/QualitySettingsModel.py b/cura/Machines/Models/QualitySettingsModel.py index 89a996fba1..2051f1748d 100644 --- a/cura/Machines/Models/QualitySettingsModel.py +++ b/cura/Machines/Models/QualitySettingsModel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Ultimaker B.V. +# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import pyqtProperty, pyqtSignal, Qt @@ -9,6 +9,7 @@ from UM import i18nCatalog from UM.Logger import Logger from UM.Qt.ListModel import ListModel from UM.Settings.ContainerRegistry import ContainerRegistry +from UM.Settings.SettingFunction import SettingFunction # To format setting functions differently. import os @@ -173,12 +174,22 @@ class QualitySettingsModel(ListModel): label = definition.label if self._i18n_catalog: label = self._i18n_catalog.i18nc(definition.key + " label", label) + if profile_value_source == "quality_changes": + label = f"<i>{label}</i>" # Make setting name italic if it's derived from the quality-changes profile. + + if isinstance(profile_value, SettingFunction): + if self._i18n_catalog: + profile_value_display = self._i18n_catalog.i18nc("@info:status", "Calculated") + else: + profile_value_display = "Calculated" + else: + profile_value_display = "" if profile_value is None else str(profile_value) items.append({ "key": definition.key, "label": label, "unit": definition.unit, - "profile_value": "" if profile_value is None else str(profile_value), # it is for display only + "profile_value": profile_value_display, "profile_value_source": profile_value_source, "user_value": "" if user_value is None else str(user_value), "category": current_category diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index 450f01fbd5..898b1ea993 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -6,7 +6,7 @@ import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 import QtQuick.Window 2.2 -import UM 1.1 as UM +import UM 1.5 as UM import Cura 1.1 as Cura UM.Dialog @@ -19,9 +19,7 @@ UM.Dialog width: minimumWidth height: Math.max(dialogSummaryItem.height + 2 * buttonsItem.height, minimumHeight) // 2 * button height to also have some extra space around the button relative to the button size - property int comboboxHeight: 15 * screenScaleFactor - property int spacerHeight: 10 * screenScaleFactor - property int doubleSpacerHeight: 20 * screenScaleFactor + property int comboboxHeight: UM.Theme.getSize("default_margin").height onClosing: manager.notifyClosed() onVisibleChanged: @@ -46,10 +44,6 @@ UM.Dialog id: catalog name: "cura" } - SystemPalette - { - id: palette - } ListModel { @@ -68,45 +62,39 @@ UM.Dialog { width: parent.width height: childrenRect.height - spacing: 2 * screenScaleFactor - Label - { - id: titleLabel - text: catalog.i18nc("@action:title", "Summary - Cura Project") - font.pointSize: 18 - } - Rectangle - { - id: separator - color: palette.text - width: parent.width - height: 1 - } - Item // Spacer - { - height: doubleSpacerHeight - width: height - } + spacing: UM.Theme.getSize("default_margin").height - Row + Column { - height: childrenRect.height width: parent.width - Label + height: cildrenRect.height + + UM.Label { - text: catalog.i18nc("@action:label", "Printer settings") - font.bold: true - width: (parent.width / 3) | 0 + id: titleLabel + text: catalog.i18nc("@action:title", "Summary - Cura Project") + font: UM.Theme.getFont("large") } - Item + + Rectangle { - // spacer - height: spacerHeight - width: (parent.width / 3) | 0 + id: separator + color: UM.Theme.getColor("text") + width: parent.width + height: UM.Theme.getSize("default_lining").height } + } + + Item + { + width: parent.width + height: childrenRect.height + UM.TooltipArea { id: machineResolveStrategyTooltip + anchors.top: parent.top + anchors.right: parent.right width: (parent.width / 3) | 0 height: visible ? comboboxHeight : 0 visible: base.visible && machineResolveComboBox.model.count > 1 @@ -157,64 +145,65 @@ UM.Dialog } } } - } - Row - { - width: parent.width - height: childrenRect.height - Label - { - text: catalog.i18nc("@action:label", "Type") - width: (parent.width / 3) | 0 - } - Label + + Column { - text: manager.machineType - width: (parent.width / 3) | 0 + width: parent.width + height: cildrenRect.height + + UM.Label + { + id: printer_settings_label + text: catalog.i18nc("@action:label", "Printer settings") + font: UM.Theme.getFont("default_bold") + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Type") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: manager.machineType + width: (parent.width / 3) | 0 + } + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", manager.isPrinterGroup ? "Printer Group" : "Printer Name") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: manager.machineName + width: (parent.width / 3) | 0 + wrapMode: Text.WordWrap + } + } } } - Row + Item { width: parent.width height: childrenRect.height - Label - { - text: catalog.i18nc("@action:label", manager.isPrinterGroup ? "Printer Group" : "Printer Name") - width: (parent.width / 3) | 0 - } - Label - { - text: manager.machineName - width: (parent.width / 3) | 0 - wrapMode: Text.WordWrap - } - } - Item // Spacer - { - height: doubleSpacerHeight - width: height - } - Row - { - height: childrenRect.height - width: parent.width - Label - { - text: catalog.i18nc("@action:label", "Profile settings") - font.bold: true - width: (parent.width / 3) | 0 - } - Item - { - // spacer - height: spacerHeight - width: (parent.width / 3) | 0 - } UM.TooltipArea { - id: qualityChangesResolveTooltip + anchors.right: parent.right + anchors.top: parent.top width: (parent.width / 3) | 0 height: visible ? comboboxHeight : 0 visible: manager.qualityChangesConflict @@ -232,96 +221,105 @@ UM.Dialog } } } - } - Row - { - width: parent.width - height: childrenRect.height - Label - { - text: catalog.i18nc("@action:label", "Name") - width: (parent.width / 3) | 0 - } - Label - { - text: manager.qualityName - width: (parent.width / 3) | 0 - wrapMode: Text.WordWrap - } - } - Row - { - width: parent.width - height: childrenRect.height - Label - { - text: catalog.i18nc("@action:label", "Intent") - width: (parent.width / 3) | 0 - } - Label - { - text: manager.intentName - width: (parent.width / 3) | 0 - wrapMode: Text.WordWrap - } - } - Row - { - width: parent.width - height: manager.numUserSettings != 0 ? childrenRect.height : 0 - Label - { - text: catalog.i18nc("@action:label", "Not in profile") - width: (parent.width / 3) | 0 - } - Label + + Column { - text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.numUserSettings).arg(manager.numUserSettings) - width: (parent.width / 3) | 0 + width: parent.width + height: cildrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Profile settings") + font: UM.Theme.getFont("default_bold") + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Name") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: manager.qualityName + width: (parent.width / 3) | 0 + wrapMode: Text.WordWrap + } + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Intent") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: manager.intentName + width: (parent.width / 3) | 0 + wrapMode: Text.WordWrap + } + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Not in profile") + visible: manager.numUserSettings != 0 + width: (parent.width / 3) | 0 + } + UM.Label + { + text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", manager.numUserSettings).arg(manager.numUserSettings) + visible: manager.numUserSettings != 0 + width: (parent.width / 3) | 0 + } + } + + Row + { + width: parent.width + height: childrenRect.height + + UM.Label + { + text: catalog.i18nc("@action:label", "Derivative from") + visible: manager.numSettingsOverridenByQualityChanges != 0 + width: (parent.width / 3) | 0 + } + UM.Label + { + text: catalog.i18ncp("@action:label", "%1, %2 override", "%1, %2 overrides", manager.numSettingsOverridenByQualityChanges).arg(manager.qualityType).arg(manager.numSettingsOverridenByQualityChanges) + width: (parent.width / 3) | 0 + visible: manager.numSettingsOverridenByQualityChanges != 0 + wrapMode: Text.WordWrap + } + } } - visible: manager.numUserSettings != 0 } - Row + + Item { width: parent.width - height: manager.numSettingsOverridenByQualityChanges != 0 ? childrenRect.height : 0 - Label - { - text: catalog.i18nc("@action:label", "Derivative from") - width: (parent.width / 3) | 0 - } - Label - { - text: catalog.i18ncp("@action:label", "%1, %2 override", "%1, %2 overrides", manager.numSettingsOverridenByQualityChanges).arg(manager.qualityType).arg(manager.numSettingsOverridenByQualityChanges) - width: (parent.width / 3) | 0 - wrapMode: Text.WordWrap - } - visible: manager.numSettingsOverridenByQualityChanges != 0 - } - Item // Spacer - { - height: doubleSpacerHeight - width: height - } - Row - { height: childrenRect.height - width: parent.width - Label - { - text: catalog.i18nc("@action:label", "Material settings") - font.bold: true - width: (parent.width / 3) | 0 - } - Item - { - // spacer - height: spacerHeight - width: (parent.width / 3) | 0 - } + UM.TooltipArea { id: materialResolveTooltip + anchors.right: parent.right + anchors.top: parent.top width: (parent.width / 3) | 0 height: visible ? comboboxHeight : 0 visible: manager.materialConflict @@ -339,76 +337,91 @@ UM.Dialog } } } - } - Repeater - { - model: manager.materialLabels - delegate: Row + Column { width: parent.width - height: childrenRect.height - Label + height: cildrenRect.height + Row { - text: catalog.i18nc("@action:label", "Name") - width: (parent.width / 3) | 0 + height: childrenRect.height + width: parent.width + spacing: UM.Theme.getSize("narrow_margin").width + + UM.Label + { + text: catalog.i18nc("@action:label", "Material settings") + font: UM.Theme.getFont("default_bold") + width: (parent.width / 3) | 0 + } } - Label + + Repeater { - text: modelData - width: (parent.width / 3) | 0 - wrapMode: Text.WordWrap + model: manager.materialLabels + delegate: Row + { + width: parent.width + height: childrenRect.height + UM.Label + { + text: catalog.i18nc("@action:label", "Name") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: modelData + width: (parent.width / 3) | 0 + wrapMode: Text.WordWrap + } + } } } } - Item // Spacer - { - height: doubleSpacerHeight - width: height - } - - Label - { - text: catalog.i18nc("@action:label", "Setting visibility") - font.bold: true - } - Row + Column { width: parent.width - height: childrenRect.height - Label - { - text: catalog.i18nc("@action:label", "Mode") - width: (parent.width / 3) | 0 - } - Label + height: cildrenRect.height + + UM.Label { - text: manager.activeMode - width: (parent.width / 3) | 0 + text: catalog.i18nc("@action:label", "Setting visibility") + font: UM.Theme.getFont("default_bold") } - } - Row - { - width: parent.width - height: childrenRect.height - visible: manager.hasVisibleSettingsField - Label + Row { - text: catalog.i18nc("@action:label", "Visible settings:") - width: (parent.width / 3) | 0 + width: parent.width + height: childrenRect.height + UM.Label + { + text: catalog.i18nc("@action:label", "Mode") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: manager.activeMode + width: (parent.width / 3) | 0 + } } - Label + Row { - text: catalog.i18nc("@action:label", "%1 out of %2" ).arg(manager.numVisibleSettings).arg(manager.totalNumberOfSettings) - width: (parent.width / 3) | 0 + width: parent.width + height: childrenRect.height + visible: manager.hasVisibleSettingsField + UM.Label + { + text: catalog.i18nc("@action:label", "Visible settings:") + width: (parent.width / 3) | 0 + } + UM.Label + { + text: catalog.i18nc("@action:label", "%1 out of %2" ).arg(manager.numVisibleSettings).arg(manager.totalNumberOfSettings) + width: (parent.width / 3) | 0 + } } } - Item // Spacer - { - height: spacerHeight - width: height - } + Row { width: parent.width @@ -418,12 +431,10 @@ UM.Dialog { width: warningLabel.height height: width - source: UM.Theme.getIcon("Information") - color: palette.text - + color: UM.Theme.getColor("text") } - Label + UM.Label { id: warningLabel text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the build plate.") @@ -432,44 +443,22 @@ UM.Dialog } } } - Item - { - id: buttonsItem - width: parent.width - height: childrenRect.height - anchors.bottom: parent.bottom - anchors.right: parent.right - Button + + buttonSpacing: UM.Theme.getSize("default_margin").width + + rightButtons: [ + Cura.TertiaryButton { - id: cancel_button - text: catalog.i18nc("@action:button","Cancel"); - onClicked: { manager.onCancelButtonClicked() } - enabled: true - anchors.bottom: parent.bottom - anchors.right: ok_button.left - anchors.rightMargin: 2 * screenScaleFactor - } - Button + text: catalog.i18nc("@action:button", "Cancel") + onClicked: reject() + }, + Cura.PrimaryButton { - id: ok_button - anchors.right: parent.right - anchors.bottom: parent.bottom - text: catalog.i18nc("@action:button","Open"); - onClicked: { manager.closeBackend(); manager.onOkButtonClicked() } + text: catalog.i18nc("@action:button", "Open") + onClicked: accept() } - } - + ] - function accept() { - manager.closeBackend(); - manager.onOkButtonClicked(); - base.visible = false; - base.accept(); - } - - function reject() { - manager.onCancelButtonClicked(); - base.visible = false; - base.rejected(); - } + onRejected: manager.onCancelButtonClicked() + onAccepted: manager.onOkButtonClicked() } diff --git a/plugins/CuraDrive/src/qml/components/BackupList.qml b/plugins/CuraDrive/src/qml/components/BackupList.qml index a4a460a885..8392792808 100644 --- a/plugins/CuraDrive/src/qml/components/BackupList.qml +++ b/plugins/CuraDrive/src/qml/components/BackupList.qml @@ -1,39 +1,34 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 -import UM 1.1 as UM +import UM 1.5 as UM -ScrollView +ListView { - property alias model: backupList.model - width: parent.width clip: true - ListView + ScrollBar.vertical: UM.ScrollBar {} + + delegate: Item { - id: backupList - width: parent.width - delegate: Item - { - // Add a margin, otherwise the scrollbar is on top of the right most component - width: parent.width - UM.Theme.getSize("default_margin").width - height: childrenRect.height + // Add a margin, otherwise the scrollbar is on top of the right most component + width: parent.width - UM.Theme.getSize("scrollbar").width + height: childrenRect.height - BackupListItem - { - id: backupListItem - width: parent.width - } + BackupListItem + { + id: backupListItem + width: parent.width + } - Rectangle - { - id: divider - color: UM.Theme.getColor("lining") - height: UM.Theme.getSize("default_lining").height - } + Rectangle + { + id: divider + color: UM.Theme.getColor("lining") + height: UM.Theme.getSize("default_lining").height } } } diff --git a/plugins/CuraDrive/src/qml/components/BackupListItem.qml b/plugins/CuraDrive/src/qml/components/BackupListItem.qml index e35c8351b7..a3b9770718 100644 --- a/plugins/CuraDrive/src/qml/components/BackupListItem.qml +++ b/plugins/CuraDrive/src/qml/components/BackupListItem.qml @@ -1,12 +1,11 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 2.1 import QtQuick.Layouts 1.3 -import QtQuick.Dialogs 1.1 -import UM 1.1 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item @@ -42,28 +41,22 @@ Item onClicked: backupListItem.showDetails = !backupListItem.showDetails } - Label + UM.Label { text: new Date(modelData.generated_time).toLocaleString(UM.Preferences.getValue("general/language")) - color: UM.Theme.getColor("text") elide: Text.ElideRight Layout.minimumWidth: 100 * screenScaleFactor Layout.maximumWidth: 500 * screenScaleFactor Layout.fillWidth: true - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering } - Label + UM.Label { text: modelData.metadata.description - color: UM.Theme.getColor("text") elide: Text.ElideRight Layout.minimumWidth: 100 * screenScaleFactor Layout.maximumWidth: 500 * screenScaleFactor Layout.fillWidth: true - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering } Cura.SecondaryButton @@ -94,21 +87,21 @@ Item anchors.top: dataRow.bottom } - MessageDialog + Cura.MessageDialog { id: confirmDeleteDialog title: catalog.i18nc("@dialog:title", "Delete Backup") text: catalog.i18nc("@dialog:info", "Are you sure you want to delete this backup? This cannot be undone.") - standardButtons: StandardButton.Yes | StandardButton.No - onYes: CuraDrive.deleteBackup(modelData.backup_id) + standardButtons: Dialog.Yes | Dialog.No + onAccepted: CuraDrive.deleteBackup(modelData.backup_id) } - MessageDialog + Cura.MessageDialog { id: confirmRestoreDialog title: catalog.i18nc("@dialog:title", "Restore Backup") text: catalog.i18nc("@dialog:info", "You will need to restart Cura before your backup is restored. Do you want to close Cura now?") - standardButtons: StandardButton.Yes | StandardButton.No - onYes: CuraDrive.restoreBackup(modelData.backup_id) + standardButtons: Dialog.Yes | Dialog.No + onAccepted: CuraDrive.restoreBackup(modelData.backup_id) } } diff --git a/plugins/CuraDrive/src/qml/components/BackupListItemDetailsRow.qml b/plugins/CuraDrive/src/qml/components/BackupListItemDetailsRow.qml index 9e4612fcf8..8ddf8e9d42 100644 --- a/plugins/CuraDrive/src/qml/components/BackupListItemDetailsRow.qml +++ b/plugins/CuraDrive/src/qml/components/BackupListItemDetailsRow.qml @@ -5,7 +5,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.1 import QtQuick.Layouts 1.3 -import UM 1.3 as UM +import UM 1.5 as UM RowLayout { @@ -26,27 +26,21 @@ RowLayout color: UM.Theme.getColor("text") } - Label + UM.Label { id: detailName - color: UM.Theme.getColor("text") elide: Text.ElideRight Layout.minimumWidth: 50 * screenScaleFactor Layout.maximumWidth: 100 * screenScaleFactor Layout.fillWidth: true - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering } - Label + UM.Label { id: detailValue - color: UM.Theme.getColor("text") elide: Text.ElideRight Layout.minimumWidth: 50 * screenScaleFactor Layout.maximumWidth: 100 * screenScaleFactor Layout.fillWidth: true - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering } } diff --git a/plugins/CuraDrive/src/qml/pages/WelcomePage.qml b/plugins/CuraDrive/src/qml/pages/WelcomePage.qml index 418573d7e4..01fbca2229 100644 --- a/plugins/CuraDrive/src/qml/pages/WelcomePage.qml +++ b/plugins/CuraDrive/src/qml/pages/WelcomePage.qml @@ -5,7 +5,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.1 import QtQuick.Window 2.2 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura import "../components" @@ -28,18 +28,14 @@ Column width: Math.round(parent.width / 4) } - Label + UM.Label { id: welcomeTextLabel text: catalog.i18nc("@description", "Backup and synchronize your Cura settings.") width: Math.round(parent.width / 2) - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter wrapMode: Label.WordWrap - renderType: Text.NativeRendering } Cura.PrimaryButton diff --git a/plugins/DigitalLibrary/resources/qml/CreateNewProjectPopup.qml b/plugins/DigitalLibrary/resources/qml/CreateNewProjectPopup.qml index a7297c12fb..74bc52b69e 100644 --- a/plugins/DigitalLibrary/resources/qml/CreateNewProjectPopup.qml +++ b/plugins/DigitalLibrary/resources/qml/CreateNewProjectPopup.qml @@ -1,10 +1,9 @@ -// 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.10 import QtQuick.Window 2.2 -import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 import UM 1.2 as UM import Cura 1.6 as Cura diff --git a/plugins/DigitalLibrary/resources/qml/DigitalFactoryOpenDialog.qml b/plugins/DigitalLibrary/resources/qml/DigitalFactoryOpenDialog.qml index 58958e0069..11c5d687e8 100644 --- a/plugins/DigitalLibrary/resources/qml/DigitalFactoryOpenDialog.qml +++ b/plugins/DigitalLibrary/resources/qml/DigitalFactoryOpenDialog.qml @@ -1,10 +1,9 @@ -// 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.10 import QtQuick.Window 2.2 -import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 import UM 1.2 as UM import Cura 1.6 as Cura diff --git a/plugins/DigitalLibrary/resources/qml/DigitalFactorySaveDialog.qml b/plugins/DigitalLibrary/resources/qml/DigitalFactorySaveDialog.qml index 6d870d0c78..56109dbcbe 100644 --- a/plugins/DigitalLibrary/resources/qml/DigitalFactorySaveDialog.qml +++ b/plugins/DigitalLibrary/resources/qml/DigitalFactorySaveDialog.qml @@ -1,10 +1,9 @@ -// 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.10 import QtQuick.Window 2.2 -import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 import UM 1.2 as UM import Cura 1.6 as Cura diff --git a/plugins/DigitalLibrary/resources/qml/OpenProjectFilesPage.qml b/plugins/DigitalLibrary/resources/qml/OpenProjectFilesPage.qml index 5b237a3e48..5f594cb79e 100644 --- a/plugins/DigitalLibrary/resources/qml/OpenProjectFilesPage.qml +++ b/plugins/DigitalLibrary/resources/qml/OpenProjectFilesPage.qml @@ -1,10 +1,10 @@ -// 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.10 +import Qt.labs.qmlmodels 1.0 +import QtQuick 2.15 import QtQuick.Window 2.2 -import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 import UM 1.2 as UM import Cura 1.6 as Cura @@ -57,51 +57,31 @@ Item border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("lining") - - Cura.TableView + //We can't use Cura's TableView here, since in Cura >= 5.0 this uses QtQuick.TableView, while in Cura < 5.0 this uses QtControls1.TableView. + //So we have to define our own. Once support for 4.13 and earlier is dropped, we can switch to Cura.TableView. + Table { id: filesTableView anchors.fill: parent - model: manager.digitalFactoryFileModel - visible: model.count != 0 && manager.retrievingFileStatus != DF.RetrievalStatus.InProgress - selectionMode: OldControls.SelectionMode.SingleSelection - onDoubleClicked: - { - manager.setSelectedFileIndices([row]); - openFilesButton.clicked(); - } - - OldControls.TableViewColumn - { - id: fileNameColumn - role: "fileName" - title: "Name" - width: Math.round(filesTableView.width / 3) - } + anchors.margins: parent.border.width - OldControls.TableViewColumn + columnHeaders: ["Name", "Uploaded by", "Uploaded at"] + model: TableModel { - id: usernameColumn - role: "username" - title: "Uploaded by" - width: Math.round(filesTableView.width / 3) + TableModelColumn { display: "fileName" } + TableModelColumn { display: "username" } + TableModelColumn { display: "uploadedAt" } + rows: manager.digitalFactoryFileModel.items } - OldControls.TableViewColumn + onCurrentRowChanged: { - role: "uploadedAt" - title: "Uploaded at" + manager.setSelectedFileIndices([currentRow]); } - - Connections + onDoubleClicked: function(row) { - target: filesTableView.selection - function onSelectionChanged() - { - let newSelection = []; - filesTableView.selection.forEach(function(rowIndex) { newSelection.push(rowIndex); }); - manager.setSelectedFileIndices(newSelection); - } + manager.setSelectedFileIndices([row]); + openFilesButton.clicked(); } } @@ -161,7 +141,6 @@ Item { // Make sure no files are selected when the file model changes filesTableView.currentRow = -1 - filesTableView.selection.clear() } } } @@ -187,7 +166,7 @@ Item anchors.bottom: parent.bottom anchors.right: parent.right text: "Open" - enabled: filesTableView.selection.count > 0 + enabled: filesTableView.currentRow >= 0 onClicked: { manager.openSelectedFiles() diff --git a/plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml b/plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml index c66556071f..5cf0d571fe 100644 --- a/plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml +++ b/plugins/DigitalLibrary/resources/qml/SaveProjectFilesPage.qml @@ -1,10 +1,10 @@ -// Copyright (C) 2021 Ultimaker B.V. +//Copyright (C) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. +import Qt.labs.qmlmodels 1.0 import QtQuick 2.10 import QtQuick.Window 2.2 -import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 import UM 1.5 as UM import Cura 1.6 as Cura @@ -86,35 +86,22 @@ Item border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("lining") - - Cura.TableView + //We can't use Cura's TableView here, since in Cura >= 5.0 this uses QtQuick.TableView, while in Cura < 5.0 this uses QtControls1.TableView. + //So we have to define our own. Once support for 4.13 and earlier is dropped, we can switch to Cura.TableView. + Table { id: filesTableView anchors.fill: parent - model: manager.digitalFactoryFileModel - visible: model.count != 0 && manager.retrievingFileStatus != DF.RetrievalStatus.InProgress - selectionMode: OldControls.SelectionMode.NoSelection - - OldControls.TableViewColumn - { - id: fileNameColumn - role: "fileName" - title: "@tableViewColumn:title", "Name" - width: Math.round(filesTableView.width / 3) - } - - OldControls.TableViewColumn - { - id: usernameColumn - role: "username" - title: "Uploaded by" - width: Math.round(filesTableView.width / 3) - } + anchors.margins: parent.border.width - OldControls.TableViewColumn + allowSelection: false + columnHeaders: ["Name", "Uploaded by", "Uploaded at"] + model: TableModel { - role: "uploadedAt" - title: "Uploaded at" + TableModelColumn { display: "fileName" } + TableModelColumn { display: "username" } + TableModelColumn { display: "uploadedAt" } + rows: manager.digitalFactoryFileModel.items } } @@ -173,8 +160,7 @@ Item function onItemsChanged() { // Make sure no files are selected when the file model changes - filesTableView.currentRow = -1 - filesTableView.selection.clear() + filesTableView.currentRow = -1; } } } diff --git a/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml b/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml index 24d4cbfade..89ebd0f215 100644 --- a/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml +++ b/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml @@ -1,11 +1,9 @@ -// Copyright (C) 2022 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. +//Copyright (C) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Window 2.2 -import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.1 import UM 1.2 as UM @@ -224,4 +222,4 @@ Item x: Math.round((parent.width - width) / 2) y: Math.round((parent.height - height) / 2) } -}
\ No newline at end of file +} diff --git a/plugins/DigitalLibrary/resources/qml/Table.qml b/plugins/DigitalLibrary/resources/qml/Table.qml new file mode 100644 index 0000000000..c4aafc1ce4 --- /dev/null +++ b/plugins/DigitalLibrary/resources/qml/Table.qml @@ -0,0 +1,203 @@ +//Copyright (C) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. + +import Qt.labs.qmlmodels 1.0 +import QtQuick 2.15 +import QtQuick.Controls 2.15 + +import UM 1.2 as UM + +/* + * A re-sizeable table of data. + * + * This table combines a list of headers with a TableView to show certain roles in a table. + * The columns of the table can be resized. + * When the table becomes too big, you can scroll through the table. When a column becomes too small, the contents of + * the table are elided. + * The table gets Cura's themeing. + */ +Item +{ + id: tableBase + + required property var columnHeaders //The text to show in the headers of each column. + property alias model: tableView.model //A TableModel to display in this table. To use a ListModel for the rows, use "rows: listModel.items" + property int currentRow: -1 //The selected row index. + property var onDoubleClicked: function(row) {} //Something to execute when double clicked. Accepts one argument: The index of the row that was clicked on. + property bool allowSelection: true //Whether to allow the user to select items. + + Row + { + id: headerBar + Repeater + { + id: headerRepeater + model: columnHeaders + Rectangle + { + //minimumWidth: Math.max(1, Math.round(tableBase.width / headerRepeater.count)) + width: 300 + height: UM.Theme.getSize("section").height + + color: UM.Theme.getColor("secondary") + + Label + { + id: contentText + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("narrow_margin").width + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("narrow_margin").width + + text: modelData + font: UM.Theme.getFont("medium_bold") + color: UM.Theme.getColor("text") + elide: Text.ElideRight + } + Rectangle //Resize handle. + { + anchors + { + right: parent.right + top: parent.top + bottom: parent.bottom + } + width: UM.Theme.getSize("thick_lining").width + + color: UM.Theme.getColor("thick_lining") + + MouseArea + { + anchors.fill: parent + + cursorShape: Qt.SizeHorCursor + drag + { + target: parent + axis: Drag.XAxis + } + onMouseXChanged: + { + if(drag.active) + { + let new_width = parent.parent.width + mouseX; + let sum_widths = mouseX; + for(let i = 0; i < headerBar.children.length; ++i) + { + sum_widths += headerBar.children[i].width; + } + if(sum_widths > tableBase.width) + { + new_width -= sum_widths - tableBase.width; //Limit the total width to not exceed the view. + } + let width_fraction = new_width / tableBase.width; //Scale with the same fraction along with the total width, if the table is resized. + parent.parent.width = Qt.binding(function() { return Math.max(10, Math.round(tableBase.width * width_fraction)) }); + } + } + } + } + + onWidthChanged: + { + tableView.forceLayout(); //Rescale table cells underneath as well. + } + } + } + } + + TableView + { + id: tableView + anchors + { + top: headerBar.bottom + left: parent.left + right: parent.right + bottom: parent.bottom + } + + flickableDirection: Flickable.AutoFlickIfNeeded + clip: true + ScrollBar.vertical: ScrollBar + { + // Vertical ScrollBar, styled similarly to the scrollBar in the settings panel + id: verticalScrollBar + visible: tableView.contentHeight > tableView.height + + background: Rectangle + { + implicitWidth: UM.Theme.getSize("scrollbar").width + radius: Math.round(implicitWidth / 2) + color: UM.Theme.getColor("scrollbar_background") + } + + contentItem: Rectangle + { + id: scrollViewHandle + implicitWidth: UM.Theme.getSize("scrollbar").width + radius: Math.round(implicitWidth / 2) + + color: verticalScrollBar.pressed ? UM.Theme.getColor("scrollbar_handle_down") : verticalScrollBar.hovered ? UM.Theme.getColor("scrollbar_handle_hover") : UM.Theme.getColor("scrollbar_handle") + Behavior on color { ColorAnimation { duration: 50; } } + } + } + columnWidthProvider: function(column) + { + return headerBar.children[column].width; //Cells get the same width as their column header. + } + + delegate: Rectangle + { + implicitHeight: Math.max(1, cellContent.height) + + color: UM.Theme.getColor((tableBase.currentRow == row) ? "primary" : ((row % 2 == 0) ? "main_background" : "viewport_background")) + + Label + { + id: cellContent + width: parent.width + + text: display + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + } + TextMetrics + { + id: cellTextMetrics + text: cellContent.text + font: cellContent.font + elide: cellContent.elide + elideWidth: cellContent.width + } + UM.TooltipArea + { + anchors.fill: parent + + acceptedButtons: Qt.LeftButton + text: (cellTextMetrics.elidedText == cellContent.text) ? "" : cellContent.text //Show full text in tooltip if it was elided. + onClicked: + { + if(tableBase.allowSelection) + { + tableBase.currentRow = row; //Select this row. + } + } + onDoubleClicked: + { + tableBase.onDoubleClicked(row); + } + } + } + + Connections + { + target: model + function onRowCountChanged() + { + tableView.contentY = 0; //When the number of rows is reduced, make sure to scroll back to the start. + } + } + } +}
\ No newline at end of file diff --git a/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml b/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml index b5b6c15f50..c679c4328c 100644 --- a/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml +++ b/plugins/FirmwareUpdater/FirmwareUpdaterMachineAction.qml @@ -1,19 +1,19 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 +import QtQuick.Controls 2.1 import QtQuick.Layouts 1.1 import QtQuick.Window 2.1 import QtQuick.Dialogs 1.2 // For filedialog -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Cura.MachineAction { - anchors.fill: parent; + anchors.fill: parent property bool printerConnected: Cura.MachineManager.printerConnected property var activeOutputDevice: printerConnected ? Cura.MachineManager.printerOutputDevices[0] : null property bool canUpdateFirmware: activeOutputDevice ? activeOutputDevice.activePrinter.canUpdateFirmware : false @@ -25,25 +25,22 @@ Cura.MachineAction UM.I18nCatalog { id: catalog; name: "cura"} spacing: UM.Theme.getSize("default_margin").height - Label + UM.Label { width: parent.width text: catalog.i18nc("@title", "Update Firmware") - wrapMode: Text.WordWrap font.pointSize: 18 } - Label + UM.Label { width: parent.width - wrapMode: Text.WordWrap text: catalog.i18nc("@label", "Firmware is the piece of software running directly on your 3D printer. This firmware controls the step motors, regulates the temperature and ultimately makes your printer work.") } - Label + UM.Label { width: parent.width - wrapMode: Text.WordWrap - text: catalog.i18nc("@label", "The firmware shipping with new printers works, but new versions tend to have more features and improvements."); + text: catalog.i18nc("@label", "The firmware shipping with new printers works, but new versions tend to have more features and improvements.") } Row @@ -52,10 +49,10 @@ Cura.MachineAction width: childrenRect.width spacing: UM.Theme.getSize("default_margin").width property string firmwareName: Cura.MachineManager.activeMachine.getDefaultFirmwareName() - Button + Cura.SecondaryButton { id: autoUpgradeButton - text: catalog.i18nc("@action:button", "Automatically upgrade Firmware"); + text: catalog.i18nc("@action:button", "Automatically upgrade Firmware") enabled: parent.firmwareName != "" && canUpdateFirmware onClicked: { @@ -63,10 +60,10 @@ Cura.MachineAction activeOutputDevice.updateFirmware(parent.firmwareName); } } - Button + Cura.SecondaryButton { id: manualUpgradeButton - text: catalog.i18nc("@action:button", "Upload custom Firmware"); + text: catalog.i18nc("@action:button", "Upload custom Firmware") enabled: canUpdateFirmware onClicked: { @@ -75,20 +72,18 @@ Cura.MachineAction } } - Label + UM.Label { width: parent.width - wrapMode: Text.WordWrap visible: !printerConnected && !updateProgressDialog.visible - text: catalog.i18nc("@label", "Firmware can not be updated because there is no connection with the printer."); + text: catalog.i18nc("@label", "Firmware can not be updated because there is no connection with the printer.") } Label { width: parent.width - wrapMode: Text.WordWrap visible: printerConnected && !canUpdateFirmware - text: catalog.i18nc("@label", "Firmware can not be updated because the connection with the printer does not support upgrading firmware."); + text: catalog.i18nc("@label", "Firmware can not be updated because the connection with the printer does not support upgrading firmware.") } } @@ -122,7 +117,7 @@ Cura.MachineAction { anchors.fill: parent - Label + UM.Label { anchors { @@ -157,12 +152,10 @@ Cura.MachineAction wrapMode: Text.Wrap } - ProgressBar + UM.ProgressBar { id: prog - value: (manager.firmwareUpdater != null) ? manager.firmwareUpdater.firmwareProgress : 0 - minimumValue: 0 - maximumValue: 100 + value: (manager.firmwareUpdater != null) ? manager.firmwareUpdater.firmwareProgress / 100 : 0 indeterminate: { if(manager.firmwareUpdater == null) @@ -173,18 +166,18 @@ Cura.MachineAction } anchors { - left: parent.left; - right: parent.right; + left: parent.left + right: parent.right } } } rightButtons: [ - Button + Cura.SecondaryButton { - text: catalog.i18nc("@action:button","Close"); - enabled: (manager.firmwareUpdater != null) ? manager.firmwareUpdater.firmwareUpdateState != 1 : true; - onClicked: updateProgressDialog.visible = false; + text: catalog.i18nc("@action:button", "Close") + enabled: manager.firmwareUpdater != null ? manager.firmwareUpdater.firmwareUpdateState != 1 : true + onClicked: updateProgressDialog.visible = false } ] } diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index 8d35bd3345..555d9d594e 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -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 math @@ -31,6 +31,8 @@ Position = NamedTuple("Position", [("x", float), ("y", float), ("z", float), ("f class FlavorParser: """This parser is intended to interpret the common firmware codes among all the different flavors""" + MAX_EXTRUDER_COUNT = 16 + def __init__(self) -> None: CuraApplication.getInstance().hideMessageSignal.connect(self._onHideMessage) self._cancelled = False @@ -53,7 +55,7 @@ class FlavorParser: def _clearValues(self) -> None: self._extruder_number = 0 - self._extrusion_length_offset = [0] # type: List[float] + self._extrusion_length_offset = [0] * self.MAX_EXTRUDER_COUNT # type: List[float] self._layer_type = LayerPolygon.Inset0Type self._layer_number = 0 self._previous_z = 0 # type: float @@ -283,8 +285,9 @@ class FlavorParser: return func(position, params, path) return position - def processTCode(self, T: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> Position: + def processTCode(self, global_stack, T: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> Position: self._extruder_number = T + self._filament_diameter = global_stack.extruderList[self._extruder_number].getProperty("material_diameter", "value") if self._extruder_number + 1 > len(position.e): self._extrusion_length_offset.extend([0] * (self._extruder_number - len(position.e) + 1)) position.e.extend([0] * (self._extruder_number - len(position.e) + 1)) @@ -354,7 +357,7 @@ class FlavorParser: Logger.log("d", "Parsing g-code...") - current_position = Position(0, 0, 0, 0, [0]) + current_position = Position(0, 0, 0, 0, [0] * self.MAX_EXTRUDER_COUNT) current_path = [] #type: List[List[float]] min_layer_number = 0 negative_layers = 0 @@ -444,7 +447,7 @@ class FlavorParser: # When changing tool, store the end point of the previous path, then process the code and finally # add another point with the new position of the head. current_path.append([current_position.x, current_position.y, current_position.z, current_position.f, current_position.e[self._extruder_number], LayerPolygon.MoveCombingType]) - current_position = self.processTCode(T, line, current_position, current_path) + current_position = self.processTCode(global_stack, T, line, current_position, current_path) current_path.append([current_position.x, current_position.y, current_position.z, current_position.f, current_position.e[self._extruder_number], LayerPolygon.MoveCombingType]) if line.startswith("M"): diff --git a/plugins/ImageReader/ConfigUI.qml b/plugins/ImageReader/ConfigUI.qml index a3dceed50d..28fd1f9106 100644 --- a/plugins/ImageReader/ConfigUI.qml +++ b/plugins/ImageReader/ConfigUI.qml @@ -1,239 +1,333 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.3 import QtQuick.Window 2.1 -import UM 1.1 as UM +import UM 1.5 as UM +import Cura 1.0 as Cura UM.Dialog { - width: minimumWidth; - minimumWidth: 350 * screenScaleFactor; + title: catalog.i18nc("@title:window", "Convert Image") - height: minimumHeight; - minimumHeight: 250 * screenScaleFactor; - - title: catalog.i18nc("@title:window", "Convert Image...") + minimumWidth: grid.width + 2 * UM.Theme.getSize("default_margin").height + minimumHeight: UM.Theme.getSize("modal_window_minimum").height + width: minimumWidth + height: minimumHeight GridLayout { - UM.I18nCatalog{id: catalog; name: "cura"} - anchors.fill: parent; - Layout.fillWidth: true - columnSpacing: 16 * screenScaleFactor - rowSpacing: 4 * screenScaleFactor - columns: 1 - - UM.TooltipArea { - Layout.fillWidth:true - height: childrenRect.height - text: catalog.i18nc("@info:tooltip","The maximum distance of each pixel from \"Base.\"") - Row { - width: parent.width - - Label { - text: catalog.i18nc("@action:label", "Height (mm)") - width: 150 * screenScaleFactor - anchors.verticalCenter: parent.verticalCenter - } - - TextField { - id: peak_height - objectName: "Peak_Height" - validator: RegExpValidator {regExp: /^\d{0,3}([\,|\.]\d*)?$/} - width: 180 * screenScaleFactor - onTextChanged: { manager.onPeakHeightChanged(text) } - } + UM.I18nCatalog { id: catalog; name: "cura" } + id: grid + columnSpacing: UM.Theme.getSize("narrow_margin").width + rowSpacing: UM.Theme.getSize("narrow_margin").height + columns: 2 + + UM.Label + { + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + text: catalog.i18nc("@action:label", "Height (mm)") + Layout.alignment: Qt.AlignVCenter + + MouseArea { + id: peak_height_label + anchors.fill: parent + hoverEnabled: true + } + } + + Cura.TextField + { + id: peak_height + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + selectByMouse: true + objectName: "Peak_Height" + validator: RegExpValidator { regExp: /^\d{0,3}([\,|\.]\d*)?$/ } + onTextChanged: manager.onPeakHeightChanged(text) + } + + UM.ToolTip + { + text: catalog.i18nc("@info:tooltip", "The maximum distance of each pixel from \"Base.\"") + visible: peak_height.hovered || peak_height_label.containsMouse + targetPoint: Qt.point(peak_height.x + Math.round(peak_height.width / 2), 0) + y: peak_height.y + peak_height.height + UM.Theme.getSize("default_margin").height + } + + UM.Label + { + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + text: catalog.i18nc("@action:label", "Base (mm)") + Layout.alignment: Qt.AlignVCenter + + MouseArea + { + id: base_height_label + anchors.fill: parent + hoverEnabled: true } } - UM.TooltipArea { - Layout.fillWidth:true - height: childrenRect.height - text: catalog.i18nc("@info:tooltip","The base height from the build plate in millimeters.") - Row { - width: parent.width - - Label { - text: catalog.i18nc("@action:label", "Base (mm)") - width: 150 * screenScaleFactor - anchors.verticalCenter: parent.verticalCenter - } - - TextField { - id: base_height - objectName: "Base_Height" - validator: RegExpValidator {regExp: /^\d{0,3}([\,|\.]\d*)?$/} - width: 180 * screenScaleFactor - onTextChanged: { manager.onBaseHeightChanged(text) } - } + Cura.TextField + { + id: base_height + selectByMouse: true + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + objectName: "Base_Height" + validator: RegExpValidator { regExp: /^\d{0,3}([\,|\.]\d*)?$/ } + onTextChanged: manager.onBaseHeightChanged(text) + } + + UM.ToolTip + { + text: catalog.i18nc("@info:tooltip", "The base height from the build plate in millimeters.") + visible: base_height.hovered || base_height_label.containsMouse + targetPoint: Qt.point(base_height.x + Math.round(base_height.width / 2), 0) + y: base_height.y + base_height.height + UM.Theme.getSize("default_margin").height + } + + UM.Label + { + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + text: catalog.i18nc("@action:label", "Width (mm)") + Layout.alignment: Qt.AlignVCenter + + MouseArea { + id: width_label + anchors.fill: parent + hoverEnabled: true } } - UM.TooltipArea { - Layout.fillWidth:true - height: childrenRect.height - text: catalog.i18nc("@info:tooltip","The width in millimeters on the build plate.") - Row { - width: parent.width - - Label { - text: catalog.i18nc("@action:label", "Width (mm)") - width: 150 * screenScaleFactor - anchors.verticalCenter: parent.verticalCenter - } - - TextField { - id: width - objectName: "Width" - focus: true - validator: RegExpValidator {regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/} - width: 180 * screenScaleFactor - onTextChanged: { manager.onWidthChanged(text) } - } + Cura.TextField + { + id: width + selectByMouse: true + objectName: "Width" + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + focus: true + validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ } + onTextChanged: manager.onWidthChanged(text) + } + + UM.ToolTip + { + text: catalog.i18nc("@info:tooltip", "The width in millimeters on the build plate") + visible: width.hovered || width_label.containsMouse + targetPoint: Qt.point(width.x + Math.round(width.width / 2), 0) + y: width.y + width.height + UM.Theme.getSize("default_margin").height + } + + UM.Label + { + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + text: catalog.i18nc("@action:label", "Depth (mm)") + Layout.alignment: Qt.AlignVCenter + + MouseArea { + id: depth_label + anchors.fill: parent + hoverEnabled: true } } - UM.TooltipArea { - Layout.fillWidth:true - height: childrenRect.height - text: catalog.i18nc("@info:tooltip","The depth in millimeters on the build plate") - Row { - width: parent.width - - Label { - text: catalog.i18nc("@action:label", "Depth (mm)") - width: 150 * screenScaleFactor - anchors.verticalCenter: parent.verticalCenter - } - TextField { - id: depth - objectName: "Depth" - focus: true - validator: RegExpValidator {regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/} - width: 180 * screenScaleFactor - onTextChanged: { manager.onDepthChanged(text) } - } + Cura.TextField + { + id: depth + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + selectByMouse: true + objectName: "Depth" + focus: true + validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ } + onTextChanged: manager.onDepthChanged(text) + } + + UM.ToolTip + { + text: catalog.i18nc("@info:tooltip", "The depth in millimeters on the build plate") + visible: depth.hovered || depth_label.containsMouse + targetPoint: Qt.point(depth.x + Math.round(depth.width / 2), 0) + y: depth.y + depth.height + UM.Theme.getSize("default_margin").height + } + + UM.Label + { + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + text: "" + Layout.alignment: Qt.AlignVCenter + + MouseArea { + id: lighter_is_higher_label + anchors.fill: parent + hoverEnabled: true } } - UM.TooltipArea { - Layout.fillWidth:true - height: childrenRect.height - text: catalog.i18nc("@info:tooltip","For lithophanes dark pixels should correspond to thicker locations in order to block more light coming through. For height maps lighter pixels signify higher terrain, so lighter pixels should correspond to thicker locations in the generated 3D model.") - Row { - width: parent.width - - //Empty label so 2 column layout works. - Label { - text: "" - width: 150 * screenScaleFactor - anchors.verticalCenter: parent.verticalCenter - } - ComboBox { - id: lighter_is_higher - objectName: "Lighter_Is_Higher" - model: [ catalog.i18nc("@item:inlistbox","Darker is higher"), catalog.i18nc("@item:inlistbox","Lighter is higher") ] - width: 180 * screenScaleFactor - onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) } - } + Cura.ComboBox + { + id: lighter_is_higher + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + Layout.preferredHeight: UM.Theme.getSize("setting_control").height + objectName: "Lighter_Is_Higher" + textRole: "text" + model: [ + { text: catalog.i18nc("@item:inlistbox", "Darker is higher") }, + { text: catalog.i18nc("@item:inlistbox", "Lighter is higher") } + ] + onCurrentIndexChanged: { manager.onImageColorInvertChanged(currentIndex) } + } + + UM.ToolTip + { + text: catalog.i18nc("@info:tooltip", "For lithophanes dark pixels should correspond to thicker locations in order to block more light coming through. For height maps lighter pixels signify higher terrain, so lighter pixels should correspond to thicker locations in the generated 3D model.") + visible: lighter_is_higher.hovered || lighter_is_higher_label.containsMouse + targetPoint: Qt.point(lighter_is_higher.x + Math.round(lighter_is_higher.width / 2), 0) + y: lighter_is_higher.y + lighter_is_higher.height + UM.Theme.getSize("default_margin").height + } + + UM.Label + { + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + text: catalog.i18nc("@action:label", "Color Model") + Layout.alignment: Qt.AlignVCenter + + MouseArea { + id: color_model_label + anchors.fill: parent + hoverEnabled: true } } - UM.TooltipArea { - Layout.fillWidth:true - height: childrenRect.height - text: catalog.i18nc("@info:tooltip","For lithophanes a simple logarithmic model for translucency is available. For height maps the pixel values correspond to heights linearly.") - Row { - width: parent.width - - Label { - text: "Color Model" - width: 150 * screenScaleFactor - anchors.verticalCenter: parent.verticalCenter - } - ComboBox { - id: color_model - objectName: "ColorModel" - model: [ catalog.i18nc("@item:inlistbox","Linear"), catalog.i18nc("@item:inlistbox","Translucency") ] - width: 180 * screenScaleFactor - onCurrentIndexChanged: { manager.onColorModelChanged(currentIndex) } - } + Cura.ComboBox + { + id: color_model + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + Layout.preferredHeight: UM.Theme.getSize("setting_control").height + objectName: "ColorModel" + textRole: "text" + model: [ + { text: catalog.i18nc("@item:inlistbox", "Linear") }, + { text: catalog.i18nc("@item:inlistbox", "Translucency") } + ] + onCurrentIndexChanged: { manager.onColorModelChanged(currentIndex) } + } + + UM.ToolTip + { + text: catalog.i18nc("@info:tooltip", "For lithophanes a simple logarithmic model for translucency is available. For height maps the pixel values correspond to heights linearly.") + visible: color_model.hovered || color_model_label.containsMouse + targetPoint: Qt.point(color_model.x + Math.round(color_model.width / 2), 0) + y: color_model.y + color_model.height + UM.Theme.getSize("default_margin").height + } + + UM.Label + { + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + text: catalog.i18nc("@action:label", "1mm Transmittance (%)") + Layout.alignment: Qt.AlignVCenter + + MouseArea { + id: transmittance_label + anchors.fill: parent + hoverEnabled: true } } - UM.TooltipArea { - Layout.fillWidth:true - height: childrenRect.height - text: catalog.i18nc("@info:tooltip","The percentage of light penetrating a print with a thickness of 1 millimeter. Lowering this value increases the contrast in dark regions and decreases the contrast in light regions of the image.") - visible: color_model.currentText == catalog.i18nc("@item:inlistbox","Translucency") - Row { - width: parent.width - - Label { - text: catalog.i18nc("@action:label", "1mm Transmittance (%)") - width: 150 * screenScaleFactor - anchors.verticalCenter: parent.verticalCenter - } - TextField { - id: transmittance - objectName: "Transmittance" - focus: true - validator: RegExpValidator {regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/} - width: 180 * screenScaleFactor - onTextChanged: { manager.onTransmittanceChanged(text) } - } + Cura.TextField + { + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + selectByMouse: true + objectName: "Transmittance" + validator: RegExpValidator { regExp: /^[1-9]\d{0,2}([\,|\.]\d*)?$/ } + onTextChanged: manager.onTransmittanceChanged(text) + + UM.ToolTip + { + text: catalog.i18nc("@info:tooltip", "The percentage of light penetrating a print with a thickness of 1 millimeter. Lowering this value increases the contrast in dark regions and decreases the contrast in light regions of the image.") + visible: parent.hovered || transmittance_label.containsMouse + targetPoint: Qt.point(parent.x + Math.round(parent.width / 2), 0) + y: parent.y + parent.height + UM.Theme.getSize("default_margin").height } } - UM.TooltipArea { - Layout.fillWidth:true - height: childrenRect.height - text: catalog.i18nc("@info:tooltip","The amount of smoothing to apply to the image.") - Row { - width: parent.width - - Label { - text: catalog.i18nc("@action:label", "Smoothing") - width: 150 * screenScaleFactor - anchors.verticalCenter: parent.verticalCenter - } - - Item { - width: 180 * screenScaleFactor - height: 20 * screenScaleFactor - Layout.fillWidth: true - - Slider { - id: smoothing - objectName: "Smoothing" - maximumValue: 100.0 - stepSize: 1.0 - width: 180 - onValueChanged: { manager.onSmoothingChanged(value) } - } - } + UM.Label + { + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + text: catalog.i18nc("@action:label", "Smoothing") + Layout.alignment: Qt.AlignVCenter + + MouseArea + { + id: smoothing_label + anchors.fill: parent + hoverEnabled: true } } + + Cura.SpinBox + { + id: smoothing + Layout.fillWidth: true + Layout.minimumWidth: UM.Theme.getSize("setting_control").width + objectName: "Smoothing" + to: 100.0 + stepSize: 1.0 + onValueChanged: manager.onSmoothingChanged(value) + } + + UM.ToolTip + { + text: catalog.i18nc("@info:tooltip", "The amount of smoothing to apply to the image.") + visible: smoothing.hovered || smoothing_label.containsMouse + targetPoint: Qt.point(smoothing.x + Math.round(smoothing.width / 2), 0) + y: smoothing.y + smoothing.height + UM.Theme.getSize("default_margin").height + } } + Item + { + ButtonGroup + { + buttons: [ok_button, cancel_button] + checkedButton: ok_button + } + } + + onAccepted: manager.onOkButtonClicked() + onRejected: manager.onCancelButtonClicked() + + buttonSpacing: UM.Theme.getSize("default_margin").width + rightButtons: [ - Button + Cura.TertiaryButton { - id:ok_button - text: catalog.i18nc("@action:button","OK"); - onClicked: { manager.onOkButtonClicked() } - enabled: true + id: cancel_button + text: catalog.i18nc("@action:button", "Cancel") + onClicked: manager.onCancelButtonClicked() }, - Button + Cura.PrimaryButton { - id:cancel_button - text: catalog.i18nc("@action:button","Cancel"); - onClicked: { manager.onCancelButtonClicked() } - enabled: true + id: ok_button + text: catalog.i18nc("@action:button", "OK") + onClicked: manager.onOkButtonClicked() } ] } diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml index 8c4c00a3a5..7f72fea4c3 100644 --- a/plugins/MachineSettingsAction/MachineSettingsAction.qml +++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml @@ -1,11 +1,11 @@ -// Copyright (c) 2019 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. +//Copyright (c) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -88,7 +88,7 @@ Cura.MachineAction } } - Label + UM.Label { id: machineNameLabel anchors.top: parent.top @@ -97,7 +97,6 @@ Cura.MachineAction text: Cura.MachineManager.activeMachine.name horizontalAlignment: Text.AlignHCenter font: UM.Theme.getFont("large_bold") - renderType: Text.NativeRendering } UM.TabRow @@ -111,6 +110,7 @@ Cura.MachineAction model: tabNameModel delegate: UM.TabRowButton { + checked: model.index == 0 text: model.name } } diff --git a/plugins/Marketplace/Marketplace.py b/plugins/Marketplace/Marketplace.py index 2d98947572..b9632e5fb0 100644 --- a/plugins/Marketplace/Marketplace.py +++ b/plugins/Marketplace/Marketplace.py @@ -31,8 +31,11 @@ class Marketplace(Extension, QObject): # Not entirely the cleanest code, since the localPackage list also checks the server if there are updates # Since that in turn will trigger notifications to be shown, we do need to construct it here and make sure # that it checks for updates... + preferences = CuraApplication.getInstance().getPreferences() + preferences.addPreference("info/automatic_plugin_update_check", True) self._local_package_list = LocalPackageList(self) - self._local_package_list.checkForUpdates(self._package_manager.local_packages) + if preferences.getValue("info/automatic_plugin_update_check"): + self._local_package_list.checkForUpdates(self._package_manager.local_packages) self._package_manager.installedPackagesChanged.connect(self.checkIfRestartNeeded) diff --git a/plugins/Marketplace/resources/qml/LicenseDialog.qml b/plugins/Marketplace/resources/qml/LicenseDialog.qml index 1c99569793..09d7c5b59a 100644 --- a/plugins/Marketplace/resources/qml/LicenseDialog.qml +++ b/plugins/Marketplace/resources/qml/LicenseDialog.qml @@ -14,8 +14,8 @@ UM.Dialog { id: licenseDialog title: catalog.i18nc("@button", "Plugin license agreement") - minimumWidth: UM.Theme.getSize("license_window_minimum").width - minimumHeight: UM.Theme.getSize("license_window_minimum").height + minimumWidth: UM.Theme.getSize("modal_window_minimum").width + minimumHeight: UM.Theme.getSize("modal_window_minimum").height width: minimumWidth height: minimumHeight backgroundColor: UM.Theme.getColor("main_background") diff --git a/plugins/Marketplace/resources/qml/ManagePackagesButton.qml b/plugins/Marketplace/resources/qml/ManagePackagesButton.qml index 92e2196beb..fc9e7d757f 100644 --- a/plugins/Marketplace/resources/qml/ManagePackagesButton.qml +++ b/plugins/Marketplace/resources/qml/ManagePackagesButton.qml @@ -1,7 +1,7 @@ // Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.6 as Cura import QtQuick 2.15 @@ -25,7 +25,7 @@ TabButton radius: Math.round(width * 0.5) } - Cura.ToolTip + UM.ToolTip { id: tooltip diff --git a/plugins/Marketplace/resources/qml/Marketplace.qml b/plugins/Marketplace/resources/qml/Marketplace.qml index 5a30141b32..8fcba852bd 100644 --- a/plugins/Marketplace/resources/qml/Marketplace.qml +++ b/plugins/Marketplace/resources/qml/Marketplace.qml @@ -64,8 +64,8 @@ Window // Page title. Item { - implicitWidth: parent.width - implicitHeight: childrenRect.height + UM.Theme.getSize("default_margin").height + Layout.preferredWidth: parent.width + Layout.preferredHeight: childrenRect.height + UM.Theme.getSize("default_margin").height Label { diff --git a/plugins/Marketplace/resources/qml/PackageCardHeader.qml b/plugins/Marketplace/resources/qml/PackageCardHeader.qml index 013704793f..1c39d4b063 100644 --- a/plugins/Marketplace/resources/qml/PackageCardHeader.qml +++ b/plugins/Marketplace/resources/qml/PackageCardHeader.qml @@ -24,7 +24,7 @@ Item height: UM.Theme.getSize("card").height // card icon - Image + Item { id: packageItem anchors @@ -35,19 +35,36 @@ Item } width: UM.Theme.getSize("card_icon").width height: width - sourceSize.height: height - sourceSize.width: width - source: + + property bool packageHasIcon: packageData.iconUrl != "" + + Image { - if (packageData.iconUrl != "") - { - return packageData.iconUrl - } - switch (packageData.packageType) + visible: parent.packageHasIcon + anchors.fill: parent + source: packageData.iconUrl + sourceSize.height: height + sourceSize.width: width + } + + UM.RecolorImage + { + visible: !parent.packageHasIcon + anchors.fill: parent + sourceSize.height: height + sourceSize.width: width + color: UM.Theme.getColor("text") + source: { - case "plugin": return "../images/Plugin.svg"; - case "material": return "../images/Spool.svg"; - default: return "../images/placeholder.svg"; + switch (packageData.packageType) + { + case "plugin": + return "../images/Plugin.svg"; + case "material": + return "../images/Spool.svg"; + default: + return "../images/placeholder.svg"; + } } } } diff --git a/plugins/Marketplace/resources/qml/PackageDetails.qml b/plugins/Marketplace/resources/qml/PackageDetails.qml index 2599c7f28c..6e5ec0fbf5 100644 --- a/plugins/Marketplace/resources/qml/PackageDetails.qml +++ b/plugins/Marketplace/resources/qml/PackageDetails.qml @@ -6,7 +6,7 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.3 import Cura 1.0 as Cura -import UM 1.0 as UM +import UM 1.5 as UM Item { @@ -38,7 +38,7 @@ Item onClicked: contextStack.pop() //Remove this page, returning to the main package list or whichever thing is beneath it. tooltip: catalog.i18nc("@button:tooltip", "Back") - toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignRight + toolTipContentAlignment: UM.Enums.ContentAlignment.AlignRight leftPadding: UM.Theme.getSize("narrow_margin").width rightPadding: leftPadding iconSource: UM.Theme.getIcon("ArrowLeft") diff --git a/plugins/Marketplace/resources/qml/VerifiedIcon.qml b/plugins/Marketplace/resources/qml/VerifiedIcon.qml index 30ef3080a0..6b9d7b6017 100644 --- a/plugins/Marketplace/resources/qml/VerifiedIcon.qml +++ b/plugins/Marketplace/resources/qml/VerifiedIcon.qml @@ -12,7 +12,7 @@ Control implicitWidth: UM.Theme.getSize("card_tiny_icon").width implicitHeight: UM.Theme.getSize("card_tiny_icon").height - Cura.ToolTip + UM.ToolTip { tooltipText: { diff --git a/plugins/ModelChecker/ModelChecker.qml b/plugins/ModelChecker/ModelChecker.qml index ddeed063b1..41c49c9a25 100644 --- a/plugins/ModelChecker/ModelChecker.qml +++ b/plugins/ModelChecker/ModelChecker.qml @@ -2,43 +2,20 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 - import UM 1.2 as UM -Button +UM.SimpleButton { id: modelCheckerButton - UM.I18nCatalog - { - id: catalog - name: "cura" - } - visible: manager.hasWarnings - tooltip: catalog.i18nc("@info:tooltip", "Some things could be problematic in this print. Click to see tips for adjustment.") onClicked: manager.showWarnings() width: UM.Theme.getSize("save_button_specs_icons").width height: UM.Theme.getSize("save_button_specs_icons").height - + iconSource: "model_checker.svg" anchors.verticalCenter: parent ? parent.verticalCenter : undefined - - style: ButtonStyle - { - background: Item - { - UM.RecolorImage - { - width: UM.Theme.getSize("save_button_specs_icons").width; - height: UM.Theme.getSize("save_button_specs_icons").height; - sourceSize.height: width; - color: control.hovered ? UM.Theme.getColor("text_scene_hover") : UM.Theme.getColor("text_scene"); - source: "model_checker.svg" - } - } - } + color: UM.Theme.getColor("text_scene") + hoverColor: UM.Theme.getColor("text_scene_hover") } diff --git a/plugins/MonitorStage/MonitorMain.qml b/plugins/MonitorStage/MonitorMain.qml index cfd33a70fe..aa717ce95c 100644 --- a/plugins/MonitorStage/MonitorMain.qml +++ b/plugins/MonitorStage/MonitorMain.qml @@ -3,7 +3,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.0 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.0 as Cura // We show a nice overlay on the 3D viewer when the current output device has no monitor view @@ -90,7 +90,7 @@ Rectangle visible: monitorViewComponent.sourceComponent == null // CASE 2: CAN MONITOR & NOT CONNECTED - Label + UM.Label { anchors { @@ -99,14 +99,10 @@ Rectangle visible: isNetworkConfigured && !isConnected text: catalog.i18nc("@info", "Please make sure your printer has a connection:\n- Check if the printer is turned on.\n- Check if the printer is connected to the network.\n- Check if you are signed in to discover cloud-connected printers.") font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - wrapMode: Text.WordWrap - lineHeight: UM.Theme.getSize("monitor_text_line_large").height - lineHeightMode: Text.FixedHeight width: contentWidth } - Label + UM.Label { id: noNetworkLabel anchors @@ -116,11 +112,7 @@ Rectangle visible: !isNetworkConfigured && isNetworkConfigurable text: catalog.i18nc("@info", "Please connect your printer to the network.") font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - wrapMode: Text.WordWrap width: contentWidth - lineHeight: UM.Theme.getSize("monitor_text_line_large").height - lineHeightMode: Text.FixedHeight } Item { @@ -129,7 +121,6 @@ Rectangle left: noNetworkLabel.left } visible: !isNetworkConfigured && isNetworkConfigurable - height: UM.Theme.getSize("monitor_text_line").height width: childrenRect.width UM.RecolorImage @@ -138,8 +129,8 @@ Rectangle anchors.verticalCenter: parent.verticalCenter color: UM.Theme.getColor("text_link") source: UM.Theme.getIcon("LinkExternal") - width: UM.Theme.getSize("monitor_external_link_icon").width - height: UM.Theme.getSize("monitor_external_link_icon").height + width: UM.Theme.getSize("icon_indicator").width + height: UM.Theme.getSize("icon_indicator").height } Label { diff --git a/plugins/PerObjectSettingsTool/PerObjectCategory.qml b/plugins/PerObjectSettingsTool/PerObjectCategory.qml index 58192f0acd..555c661517 100644 --- a/plugins/PerObjectSettingsTool/PerObjectCategory.qml +++ b/plugins/PerObjectSettingsTool/PerObjectCategory.qml @@ -1,62 +1,24 @@ -// Copyright (c) 2015 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Layouts 1.1 - -import UM 1.1 as UM +import QtQuick.Controls 2.1 +import Cura 1.5 as Cura +import UM 1.5 as UM import ".." -Button { +Cura.CategoryButton +{ id: base; - style: ButtonStyle { - background: Item { } - label: Row - { - spacing: UM.Theme.getSize("default_lining").width - - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - height: (label.height / 2) | 0 - width: height - source: control.checked ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight"); - color: control.hovered ? palette.highlight : palette.buttonText - } - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - height: label.height - width: height - source: control.iconSource - color: control.hovered ? palette.highlight : palette.buttonText - } - Label - { - id: label - anchors.verticalCenter: parent.verticalCenter - text: control.text - color: control.hovered ? palette.highlight : palette.buttonText - font.bold: true - } - - SystemPalette { id: palette } - } - } + categoryIcon: definition ? UM.Theme.getIcon(definition.icon) : "" + labelText: definition ? definition.label : "" + expanded: definition ? definition.expanded : false - signal showTooltip(string text); - signal hideTooltip(); + signal showTooltip(string text) + signal hideTooltip() signal contextMenuRequested() - text: definition.label - iconSource: UM.Theme.getIcon(definition.icon) - - checkable: true - checked: definition.expanded - - onClicked: definition.expanded ? settingDefinitionsModel.collapseRecursive(definition.key) : settingDefinitionsModel.expandRecursive(definition.key) + onClicked: expanded ? settingDefinitionsModel.collapseRecursive(definition.key) : settingDefinitionsModel.expandRecursive(definition.key) } diff --git a/plugins/PerObjectSettingsTool/PerObjectItem.qml b/plugins/PerObjectSettingsTool/PerObjectItem.qml index 9700b2265b..b6cf13943b 100644 --- a/plugins/PerObjectSettingsTool/PerObjectItem.qml +++ b/plugins/PerObjectSettingsTool/PerObjectItem.qml @@ -3,25 +3,22 @@ import QtQuick 2.1 import QtQuick.Layouts 1.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 +import QtQuick.Controls 2.1 import UM 1.5 as UM - import Cura 1.0 as Cura UM.TooltipArea { - x: model.depth * UM.Theme.getSize("default_margin").width; - text: model.description; + x: model.depth * UM.Theme.getSize("narrow_margin").width + text: model.description - width: childrenRect.width; - height: childrenRect.height; + width: childrenRect.width + height: childrenRect.height UM.CheckBox { id: check - text: definition.label checked: addedSettingsModel.getVisible(model.key) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 9957171379..a53f051db8 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -1,11 +1,10 @@ -// Copyright (c) 2021 Ultimaker B.V. -// Uranium is released under the terms of the LGPLv3 or higher. +//Copyright (c) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.2 +import QtQuick.Controls 2.15 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura import ".." @@ -76,63 +75,72 @@ Item id: meshTypeButtons spacing: UM.Theme.getSize("default_margin").width - Button + UM.ToolbarButton { id: normalButton text: catalog.i18nc("@label", "Normal model") - iconSource: UM.Theme.getIcon("Infill0"); + toolItem: UM.RecolorImage + { + source: UM.Theme.getIcon("Infill0") + color: UM.Theme.getColor("icon") + } property bool needBorder: true checkable: true onClicked: setMeshType(normalMeshType); - style: UM.Theme.styles.tool_button; z: 4 } - Button + UM.ToolbarButton { id: supportMeshButton text: catalog.i18nc("@label", "Print as support") - iconSource: UM.Theme.getIcon("MeshTypeSupport"); + toolItem: UM.RecolorImage + { + source: UM.Theme.getIcon("MeshTypeSupport") + color: UM.Theme.getColor("icon") + } property bool needBorder: true checkable:true onClicked: setMeshType(supportMeshType) - style: UM.Theme.styles.tool_button; z: 3 } - Button + UM.ToolbarButton { id: overlapMeshButton text: catalog.i18nc("@label", "Modify settings for overlaps") - iconSource: UM.Theme.getIcon("MeshTypeIntersect"); + toolItem: UM.RecolorImage + { + source: UM.Theme.getIcon("MeshTypeIntersect") + color: UM.Theme.getColor("icon") + } property bool needBorder: true checkable:true onClicked: setMeshType(infillMeshType) - style: UM.Theme.styles.tool_button; z: 2 } - Button + UM.ToolbarButton { id: antiOverhangMeshButton text: catalog.i18nc("@label", "Don't support overlaps") - iconSource: UM.Theme.getIcon("BlockSupportOverlaps"); + toolItem: UM.RecolorImage + { + source: UM.Theme.getIcon("BlockSupportOverlaps") + color: UM.Theme.getColor("icon") + } property bool needBorder: true checkable: true onClicked: setMeshType(antiOverhangMeshType) - style: UM.Theme.styles.tool_button; z: 1 } } - Label + UM.Label { id: meshTypeLabel - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") height: UM.Theme.getSize("setting").height - verticalAlignment: Text.AlignVCenter } @@ -179,192 +187,187 @@ Item // It kinda looks ugly otherwise (big panel, no content on it) id: currentSettings property int maximumHeight: 200 * screenScaleFactor - height: Math.min(contents.count * (UM.Theme.getSize("section").height + UM.Theme.getSize("default_lining").height), maximumHeight) + height: Math.min(contents.count * (UM.Theme.getSize("section").height + UM.Theme.getSize("narrow_margin").height + UM.Theme.getSize("default_lining").height), maximumHeight) visible: currentMeshType != "anti_overhang_mesh" - ScrollView + ListView { + id: contents height: parent.height width: UM.Theme.getSize("setting").width + UM.Theme.getSize("default_margin").width - style: UM.Theme.styles.scrollview - ListView - { - id: contents - spacing: UM.Theme.getSize("default_lining").height + ScrollBar.vertical: UM.ScrollBar {} + clip: true + spacing: UM.Theme.getSize("default_lining").height - model: UM.SettingDefinitionsModel + model: UM.SettingDefinitionsModel + { + id: addedSettingsModel + containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" + expanded: [ "*" ] + filter: { - id: addedSettingsModel - containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" - expanded: [ "*" ] - filter: + if (printSequencePropertyProvider.properties.value == "one_at_a_time") { - if (printSequencePropertyProvider.properties.value == "one_at_a_time") - { - return {"settable_per_meshgroup": true} - } - return {"settable_per_mesh": true} - } - exclude: - { - var excluded_settings = [ "support_mesh", "anti_overhang_mesh", "cutting_mesh", "infill_mesh" ] - - if (currentMeshType == "support_mesh") - { - excluded_settings = excluded_settings.concat(base.allCategoriesExceptSupport) - } - return excluded_settings + return {"settable_per_meshgroup": true} } + return {"settable_per_mesh": true} + } + exclude: + { + var excluded_settings = [ "support_mesh", "anti_overhang_mesh", "cutting_mesh", "infill_mesh" ] - visibilityHandler: Cura.PerObjectSettingVisibilityHandler + if (currentMeshType == "support_mesh") { - id: visibility_handler - selectedObjectId: UM.ActiveTool.properties.getValue("SelectedObjectId") + excluded_settings = excluded_settings.concat(base.allCategoriesExceptSupport) } + return excluded_settings + } - // For some reason the model object is updated after removing him from the memory and - // it happens only on Windows. For this reason, set the destroyed value manually. - Component.onDestruction: - { - setDestroyed(true) - } + visibilityHandler: Cura.PerObjectSettingVisibilityHandler + { + id: visibility_handler + selectedObjectId: UM.ActiveTool.properties.getValue("SelectedObjectId") } - delegate: Row + // For some reason the model object is updated after removing him from the memory and + // it happens only on Windows. For this reason, set the destroyed value manually. + Component.onDestruction: { - spacing: - UM.Theme.getSize("default_margin").width - Loader + setDestroyed(true) + } + } + + delegate: Row + { + spacing: - UM.Theme.getSize("default_margin").width + Loader + { + id: settingLoader + width: UM.Theme.getSize("setting").width + height: UM.Theme.getSize("section").height + UM.Theme.getSize("narrow_margin").height + enabled: provider.properties.enabled === "True" + property var definition: model + property var settingDefinitionsModel: addedSettingsModel + property var propertyProvider: provider + property var globalPropertyProvider: inheritStackProvider + property var externalResetHandler: false + + //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 + //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, + //causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely. + asynchronous: model.type != "enum" && model.type != "extruder" + + onLoaded: { - id: settingLoader - width: UM.Theme.getSize("setting").width - height: UM.Theme.getSize("section").height - enabled: provider.properties.enabled === "True" - property var definition: model - property var settingDefinitionsModel: addedSettingsModel - property var propertyProvider: provider - property var globalPropertyProvider: inheritStackProvider - property var externalResetHandler: false - - //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 - //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, - //causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely. - asynchronous: model.type != "enum" && model.type != "extruder" - - onLoaded: - { - settingLoader.item.showRevertButton = false - settingLoader.item.showInheritButton = false - settingLoader.item.showLinkedSettingIcon = false - settingLoader.item.doDepthIndentation = false - settingLoader.item.doQualityUserSettingEmphasis = false - } + settingLoader.item.showRevertButton = false + settingLoader.item.showInheritButton = false + settingLoader.item.showLinkedSettingIcon = false + settingLoader.item.doDepthIndentation = false + settingLoader.item.doQualityUserSettingEmphasis = false + } - sourceComponent: + sourceComponent: + { + switch(model.type) { - switch(model.type) - { - case "int": - return settingTextField - case "[int]": - return settingTextField - case "float": - return settingTextField - case "enum": - return settingComboBox - case "extruder": - return settingExtruder - case "optional_extruder": - return settingOptionalExtruder - case "bool": - return settingCheckBox - case "str": - return settingTextField - case "category": - return settingCategory - default: - return settingUnknown - } + case "int": + return settingTextField + case "[int]": + return settingTextField + case "float": + return settingTextField + case "enum": + return settingComboBox + case "extruder": + return settingExtruder + case "optional_extruder": + return settingOptionalExtruder + case "bool": + return settingCheckBox + case "str": + return settingTextField + case "category": + return settingCategory + default: + return settingUnknown } } + } - Button - { - width: Math.round(UM.Theme.getSize("setting").height / 2) - height: UM.Theme.getSize("setting").height + Button + { + width: Math.round(UM.Theme.getSize("setting").height / 2) + height: UM.Theme.getSize("setting").height - onClicked: addedSettingsModel.setVisible(model.key, false) + onClicked: addedSettingsModel.setVisible(model.key, false) - style: ButtonStyle + background: Item + { + UM.RecolorImage { - background: Item - { - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - width: parent.width - height: width - sourceSize.height: width - color: control.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button") - source: UM.Theme.getIcon("Minus") - } - } + anchors.verticalCenter: parent.verticalCenter + width: parent.width + height: width + sourceSize.height: width + color: parent.hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button") + source: UM.Theme.getIcon("Minus") } } + } - // Specialty provider that only watches global_inherits (we can't filter on what property changed we get events - // so we bypass that to make a dedicated provider). - UM.SettingPropertyProvider - { - id: provider + // Specialty provider that only watches global_inherits (we can't filter on what property changed we get events + // so we bypass that to make a dedicated provider). + UM.SettingPropertyProvider + { + id: provider - containerStackId: UM.ActiveTool.properties.getValue("ContainerID") - key: model.key - watchedProperties: [ "value", "enabled", "validationState" ] - storeIndex: 0 - removeUnusedValue: false - } + containerStackId: UM.ActiveTool.properties.getValue("ContainerID") + key: model.key + watchedProperties: [ "value", "enabled", "validationState" ] + storeIndex: 0 + removeUnusedValue: false + } - UM.SettingPropertyProvider - { - id: inheritStackProvider - containerStackId: UM.ActiveTool.properties.getValue("ContainerID") - key: model.key - watchedProperties: [ "limit_to_extruder" ] - } + UM.SettingPropertyProvider + { + id: inheritStackProvider + containerStackId: UM.ActiveTool.properties.getValue("ContainerID") + key: model.key + watchedProperties: [ "limit_to_extruder" ] + } - Connections - { - target: inheritStackProvider - function onPropertiesChanged() { provider.forcePropertiesChanged() } - } + Connections + { + target: inheritStackProvider + function onPropertiesChanged() { provider.forcePropertiesChanged() } + } - Connections + Connections + { + target: UM.ActiveTool + function onPropertiesChanged() { - target: UM.ActiveTool - function onPropertiesChanged() + // the values cannot be bound with UM.ActiveTool.properties.getValue() calls, + // so here we connect to the signal and update the those values. + if (typeof UM.ActiveTool.properties.getValue("SelectedObjectId") !== "undefined") { - // the values cannot be bound with UM.ActiveTool.properties.getValue() calls, - // so here we connect to the signal and update the those values. - if (typeof UM.ActiveTool.properties.getValue("SelectedObjectId") !== "undefined") + const selectedObjectId = UM.ActiveTool.properties.getValue("SelectedObjectId") + if (addedSettingsModel.visibilityHandler.selectedObjectId != selectedObjectId) { - const selectedObjectId = UM.ActiveTool.properties.getValue("SelectedObjectId") - if (addedSettingsModel.visibilityHandler.selectedObjectId != selectedObjectId) - { - addedSettingsModel.visibilityHandler.selectedObjectId = selectedObjectId - } + addedSettingsModel.visibilityHandler.selectedObjectId = selectedObjectId } - if (typeof UM.ActiveTool.properties.getValue("ContainerID") !== "undefined") + } + if (typeof UM.ActiveTool.properties.getValue("ContainerID") !== "undefined") + { + const containerId = UM.ActiveTool.properties.getValue("ContainerID") + if (provider.containerStackId != containerId) { - const containerId = UM.ActiveTool.properties.getValue("ContainerID") - if (provider.containerStackId != containerId) - { - provider.containerStackId = containerId - } - if (inheritStackProvider.containerStackId != containerId) - { - inheritStackProvider.containerStackId = containerId - } + provider.containerStackId = containerId + } + if (inheritStackProvider.containerStackId != containerId) + { + inheritStackProvider.containerStackId = containerId } } } @@ -422,8 +425,6 @@ Item storeIndex: 0 } - SystemPalette { id: palette } - Component { id: settingTextField diff --git a/plugins/PerObjectSettingsTool/SettingPickDialog.qml b/plugins/PerObjectSettingsTool/SettingPickDialog.qml index 0b03ef5008..950c13809e 100644 --- a/plugins/PerObjectSettingsTool/SettingPickDialog.qml +++ b/plugins/PerObjectSettingsTool/SettingPickDialog.qml @@ -1,6 +1,8 @@ +//Copyright (c) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. + import QtQuick 2.2 -import QtQuick.Controls 1.2 -import QtQuick.Controls.Styles 1.2 +import QtQuick.Controls 2.2 import UM 1.5 as UM import Cura 1.0 as Cura @@ -10,8 +12,11 @@ UM.Dialog { id: settingPickDialog + margin: UM.Theme.getSize("default_margin").width + title: catalog.i18nc("@title:window", "Select Settings to Customize for this model") - width: screenScaleFactor * 360 + width: UM.Theme.getSize("small_popup_dialog").width + backgroundColor: UM.Theme.getColor("background_1") property var additional_excluded_settings @@ -40,9 +45,10 @@ UM.Dialog listview.model.filter = new_filter } - TextField + Cura.TextField { id: filterInput + selectByMouse: true anchors { @@ -69,65 +75,65 @@ UM.Dialog text: catalog.i18nc("@label:checkbox", "Show all") } - ScrollView + ListView { - id: scrollView - + id: listview anchors { top: filterInput.bottom + topMargin: UM.Theme.getSize("default_margin").height left: parent.left right: parent.right bottom: parent.bottom } - ListView + + ScrollBar.vertical: UM.ScrollBar { id: scrollBar } + clip: true + + model: UM.SettingDefinitionsModel { - id: listview - model: UM.SettingDefinitionsModel + id: definitionsModel + containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" + visibilityHandler: UM.SettingPreferenceVisibilityHandler {} + expanded: [ "*" ] + exclude: { - id: definitionsModel - containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" - visibilityHandler: UM.SettingPreferenceVisibilityHandler {} - expanded: [ "*" ] - exclude: - { - var excluded_settings = [ "machine_settings", "command_line_settings", "support_mesh", "anti_overhang_mesh", "cutting_mesh", "infill_mesh" ] - excluded_settings = excluded_settings.concat(settingPickDialog.additional_excluded_settings) - return excluded_settings - } - showAll: toggleShowAll.checked || filterInput.text !== "" + var excluded_settings = [ "machine_settings", "command_line_settings", "support_mesh", "anti_overhang_mesh", "cutting_mesh", "infill_mesh" ] + excluded_settings = excluded_settings.concat(settingPickDialog.additional_excluded_settings) + return excluded_settings } - delegate: Loader - { - id: loader + showAll: toggleShowAll.checked || filterInput.text !== "" + } + delegate: Loader + { + id: loader - width: listview.width - height: model.type != undefined ? UM.Theme.getSize("section").height : 0 + width: listview.width - scrollBar.width + height: model.type != undefined ? UM.Theme.getSize("section").height : 0 - property var definition: model - property var settingDefinitionsModel: definitionsModel + property var definition: model + property var settingDefinitionsModel: definitionsModel - asynchronous: true - source: + asynchronous: true + source: + { + switch(model.type) { - switch(model.type) - { - case "category": - return "PerObjectCategory.qml" - default: - return "PerObjectItem.qml" - } + case "category": + return "PerObjectCategory.qml" + default: + return "PerObjectItem.qml" } } - Component.onCompleted: settingPickDialog.updateFilter() } + Component.onCompleted: settingPickDialog.updateFilter() } rightButtons: [ - Button + Cura.TertiaryButton { text: catalog.i18nc("@action:button", "Close") - onClicked: settingPickDialog.visible = false + onClicked: reject() } ] }
\ No newline at end of file diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index bd94d1fdfd..8ce6e3f94f 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -1,16 +1,13 @@ -// Copyright (c) 2015 Jaime van Kessel, Ultimaker B.V. +// Copyright (c) 2022 Jaime van Kessel, Ultimaker B.V. // The PostProcessingPlugin is released under the terms of the AGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls 2.15 as QQC2 -import QtQuick.Controls.Styles 1.1 +import QtQuick.Controls 2.15 import QtQml.Models 2.15 as Models import QtQuick.Layouts 1.1 -import QtQuick.Dialogs 1.1 import QtQuick.Window 2.2 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura UM.Dialog @@ -18,14 +15,15 @@ UM.Dialog id: dialog title: catalog.i18nc("@title:window", "Post Processing Plugin") - width: 700 * screenScaleFactor; - height: 500 * screenScaleFactor; - minimumWidth: 400 * screenScaleFactor; - minimumHeight: 250 * screenScaleFactor; + width: 700 * screenScaleFactor + height: 500 * screenScaleFactor + minimumWidth: 400 * screenScaleFactor + minimumHeight: 250 * screenScaleFactor onVisibleChanged: { - if(!visible) //Whenever the window is closed (either via the "Close" button or the X on the window frame), we want to update it in the stack. + // Whenever the window is closed (either via the "Close" button or the X on the window frame), we want to update it in the stack. + if (!visible) { manager.writeScriptsToStack() } @@ -36,234 +34,211 @@ UM.Dialog UM.I18nCatalog{id: catalog; name: "cura"} id: base property int columnWidth: Math.round((base.width / 2) - UM.Theme.getSize("default_margin").width) - property int textMargin: Math.round(UM.Theme.getSize("default_margin").width / 2) + property int textMargin: UM.Theme.getSize("narrow_margin").width property string activeScriptName - SystemPalette{ id: palette } - SystemPalette{ id: disabledPalette; colorGroup: SystemPalette.Disabled } + anchors.fill: parent - ExclusiveGroup + ButtonGroup { id: selectedScriptGroup } - Item + Column { id: activeScripts - anchors.left: parent.left width: base.columnWidth height: parent.height - Label + spacing: base.textMargin + + UM.Label { id: activeScriptsHeader text: catalog.i18nc("@label", "Post Processing Scripts") - anchors.top: parent.top - anchors.topMargin: base.textMargin anchors.left: parent.left - anchors.leftMargin: base.textMargin anchors.right: parent.right - anchors.rightMargin: base.textMargin font: UM.Theme.getFont("large_bold") elide: Text.ElideRight } ListView { id: activeScriptsList - anchors { - top: activeScriptsHeader.bottom left: parent.left right: parent.right rightMargin: base.textMargin - topMargin: base.textMargin - leftMargin: UM.Theme.getSize("default_margin").width } + height: Math.min(contentHeight, parent.height - parent.spacing * 2 - activeScriptsHeader.height - addButton.height) //At the window height, start scrolling this one. - height: childrenRect.height + clip: true + ScrollBar.vertical: UM.ScrollBar + { + id: activeScriptsScrollBar + } model: manager.scriptList - delegate: Item + + delegate: Button { - width: parent.width - height: activeScriptButton.height - Button + id: activeScriptButton + + width: parent.width - activeScriptsScrollBar.width + height: UM.Theme.getSize("standard_list_lineheight").height + + ButtonGroup.group: selectedScriptGroup + checkable: true + + checked: { - id: activeScriptButton - text: manager.getScriptLabelByKey(modelData.toString()) - exclusiveGroup: selectedScriptGroup - width: parent.width - height: UM.Theme.getSize("setting").height - checkable: true - - checked: + if (manager.selectedScriptIndex == index) { - if (manager.selectedScriptIndex == index) - { - base.activeScriptName = manager.getScriptLabelByKey(modelData.toString()) - return true - } - else - { - return false - } - } - onClicked: - { - forceActiveFocus() - manager.setSelectedScriptIndex(index) base.activeScriptName = manager.getScriptLabelByKey(modelData.toString()) + return true } - - style: ButtonStyle + else { - background: Rectangle - { - color: activeScriptButton.checked ? palette.highlight : "transparent" - width: parent.width - height: parent.height - } - label: Label - { - wrapMode: Text.Wrap - text: control.text - elide: Text.ElideRight - color: activeScriptButton.checked ? palette.highlightedText : palette.text - } + return false } } - Button + background: Rectangle + { + color: activeScriptButton.checked ? UM.Theme.getColor("background_3") : "transparent" + } + + onClicked: + { + forceActiveFocus() + manager.setSelectedScriptIndex(index) + base.activeScriptName = manager.getScriptLabelByKey(modelData.toString()) + } + + RowLayout { - id: removeButton - text: "x" - width: 20 * screenScaleFactor - height: 20 * screenScaleFactor - anchors.right:parent.right - anchors.rightMargin: base.textMargin - anchors.verticalCenter: parent.verticalCenter - onClicked: manager.removeScriptByIndex(index) - style: ButtonStyle + anchors.fill: parent + + UM.Label { - label: Item + Layout.fillWidth: true + text: manager.getScriptLabelByKey(modelData.toString()) + } + + Item + { + id: downButton + Layout.preferredWidth: height + Layout.fillHeight: true + enabled: index != manager.scriptList.length - 1 + + MouseArea { - UM.RecolorImage + anchors.fill: parent + onClicked: { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: Math.round(control.width / 2.7) - height: Math.round(control.height / 2.7) - sourceSize.height: width - color: palette.text - source: UM.Theme.getIcon("Cancel") + if (manager.selectedScriptIndex == index) + { + manager.setSelectedScriptIndex(index + 1) + } + return manager.moveScript(index, index + 1) } } - } - } - Button - { - id: downButton - text: "" - anchors.right: removeButton.left - anchors.verticalCenter: parent.verticalCenter - enabled: index != manager.scriptList.length - 1 - width: 20 * screenScaleFactor - height: 20 * screenScaleFactor - onClicked: - { - if (manager.selectedScriptIndex == index) + + UM.RecolorImage { - manager.setSelectedScriptIndex(index + 1) + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: height + color: parent.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + source: UM.Theme.getIcon("ChevronSingleDown") } - return manager.moveScript(index, index + 1) } - style: ButtonStyle + Item { - label: Item + id: upButton + Layout.preferredWidth: height + Layout.fillHeight: true + enabled: index != 0 + + MouseArea { - UM.RecolorImage + anchors.fill: parent + onClicked: { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: Math.round(control.width / 2.5) - height: Math.round(control.height / 2.5) - sourceSize.height: width - color: control.enabled ? palette.text : disabledPalette.text - source: UM.Theme.getIcon("ChevronSingleDown") + if (manager.selectedScriptIndex == index) + { + manager.setSelectedScriptIndex(index - 1) + } + return manager.moveScript(index, index - 1) } } - } - } - Button - { - id: upButton - text: "" - enabled: index != 0 - width: 20 * screenScaleFactor - height: 20 * screenScaleFactor - anchors.right: downButton.left - anchors.verticalCenter: parent.verticalCenter - onClicked: - { - if (manager.selectedScriptIndex == index) + + UM.RecolorImage { - manager.setSelectedScriptIndex(index - 1) + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: height + color: upButton.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + source: UM.Theme.getIcon("ChevronSingleUp") } - return manager.moveScript(index, index - 1) } - style: ButtonStyle + + Item { - label: Item - { - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: Math.round(control.width / 2.5) - height: Math.round(control.height / 2.5) - sourceSize.height: width - color: control.enabled ? palette.text : disabledPalette.text - source: UM.Theme.getIcon("ChevronSingleUp") - } + id: removeButton + Layout.preferredWidth: height + Layout.fillHeight: true + + MouseArea + { + anchors.fill: parent + onClicked: manager.removeScriptByIndex(index) + } + + UM.RecolorImage + { + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: height + color: UM.Theme.getColor("text") + source: UM.Theme.getIcon("Cancel") } } } } } - Button + Cura.SecondaryButton { id: addButton text: catalog.i18nc("@action", "Add a script") - anchors.left: parent.left - anchors.leftMargin: base.textMargin - anchors.top: activeScriptsList.bottom - anchors.topMargin: base.textMargin onClicked: scriptsMenu.open() - style: ButtonStyle - { - label: Label - { - text: control.text - } - } } - QQC2.Menu - { - id: scriptsMenu - width: parent.width + } - Models.Instantiator - { - model: manager.loadedScriptList + Cura.Menu + { + id: scriptsMenu - QQC2.MenuItem - { - text: manager.getScriptLabelByKey(modelData.toString()) - onTriggered: manager.addScriptToList(modelData.toString()) - } + Models.Instantiator + { + model: manager.loadedScriptList - onObjectAdded: scriptsMenu.insertItem(index, object) - onObjectRemoved: scriptsMenu.removeItem(object) + Cura.MenuItem + { + text: manager.getScriptLabelByKey(modelData.toString()) + onTriggered: manager.addScriptToList(modelData.toString()) } + + onObjectAdded: scriptsMenu.insertItem(index, object) + onObjectRemoved: scriptsMenu.removeItem(object) } } @@ -296,9 +271,9 @@ UM.Dialog color: UM.Theme.getColor("text") } - ScrollView + ListView { - id: scrollView + id: listview anchors { top: scriptSpecsHeader.bottom @@ -309,124 +284,114 @@ UM.Dialog bottom: parent.bottom } + ScrollBar.vertical: UM.ScrollBar {} + clip: true visible: manager.selectedScriptDefinitionId != "" - style: UM.Theme.styles.scrollview; + spacing: UM.Theme.getSize("default_lining").height - ListView + model: UM.SettingDefinitionsModel { - id: listview - spacing: UM.Theme.getSize("default_lining").height - model: UM.SettingDefinitionsModel - { - id: definitionsModel - containerId: manager.selectedScriptDefinitionId - showAll: true - } + id: definitionsModel + containerId: manager.selectedScriptDefinitionId + showAll: true + } - delegate: Loader - { - id: settingLoader + delegate: Loader + { + id: settingLoader - width: parent.width - height: + width: listview.width + height: + { + if (provider.properties.enabled == "True" && model.type != undefined) { - if(provider.properties.enabled == "True") - { - if(model.type != undefined) - { - return UM.Theme.getSize("section").height - } - else - { - return 0 - } - } - else - { - return 0 - } + return UM.Theme.getSize("section").height; } - Behavior on height { NumberAnimation { duration: 100 } } - opacity: provider.properties.enabled == "True" ? 1 : 0 - - Behavior on opacity { NumberAnimation { duration: 100 } } - enabled: opacity > 0 + else + { + return 0 + } + } + Behavior on height { NumberAnimation { duration: 100 } } + opacity: provider.properties.enabled == "True" ? 1 : 0 - property var definition: model - property var settingDefinitionsModel: definitionsModel - property var propertyProvider: provider - property var globalPropertyProvider: inheritStackProvider + Behavior on opacity { NumberAnimation { duration: 100 } } + enabled: opacity > 0 - //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 - //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, - //causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely. - asynchronous: model.type != "enum" && model.type != "extruder" + property var definition: model + property var settingDefinitionsModel: definitionsModel + property var propertyProvider: provider + property var globalPropertyProvider: inheritStackProvider - onLoaded: - { - settingLoader.item.showRevertButton = false - settingLoader.item.showInheritButton = false - settingLoader.item.showLinkedSettingIcon = false - settingLoader.item.doDepthIndentation = false - settingLoader.item.doQualityUserSettingEmphasis = false - } + //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 + //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, + //causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely. + asynchronous: model.type != "enum" && model.type != "extruder" - sourceComponent: - { - switch(model.type) - { - case "int": - return settingTextField - case "float": - return settingTextField - case "enum": - return settingComboBox - case "extruder": - return settingExtruder - case "bool": - return settingCheckBox - case "str": - return settingTextField - case "category": - return settingCategory - default: - return settingUnknown - } - } + onLoaded: + { + settingLoader.item.showRevertButton = false + settingLoader.item.showInheritButton = false + settingLoader.item.showLinkedSettingIcon = false + settingLoader.item.doDepthIndentation = false + settingLoader.item.doQualityUserSettingEmphasis = false + } - UM.SettingPropertyProvider + sourceComponent: + { + switch(model.type) { - id: provider - containerStackId: manager.selectedScriptStackId - key: model.key ? model.key : "None" - watchedProperties: [ "value", "enabled", "state", "validationState" ] - storeIndex: 0 + case "int": + return settingTextField + case "float": + return settingTextField + case "enum": + return settingComboBox + case "extruder": + return settingExtruder + case "bool": + return settingCheckBox + case "str": + return settingTextField + case "category": + return settingCategory + default: + return settingUnknown } + } - // Specialty provider that only watches global_inherits (we can't filter on what property changed we get events - // so we bypass that to make a dedicated provider). - UM.SettingPropertyProvider - { - id: inheritStackProvider - containerStack: Cura.MachineManager.activeMachine - key: model.key ? model.key : "None" - watchedProperties: [ "limit_to_extruder" ] - } + UM.SettingPropertyProvider + { + id: provider + containerStackId: manager.selectedScriptStackId + key: model.key ? model.key : "None" + watchedProperties: [ "value", "enabled", "state", "validationState" ] + storeIndex: 0 + } - Connections - { - target: item + // Specialty provider that only watches global_inherits (we can't filter on what property changed we get events + // so we bypass that to make a dedicated provider). + UM.SettingPropertyProvider + { + id: inheritStackProvider + containerStack: Cura.MachineManager.activeMachine + key: model.key ? model.key : "None" + watchedProperties: [ "limit_to_extruder" ] + } - function onShowTooltip(text) - { - tooltip.text = text - var position = settingLoader.mapToItem(settingsPanel, settingsPanel.x, 0) - tooltip.show(position) - tooltip.target.x = position.x + 1 - } + Connections + { + target: item - function onHideTooltip() { tooltip.hide() } + function onShowTooltip(text) + { + tooltip.text = text; + var position = settingLoader.mapToItem(settingsPanel, settingsPanel.x, 0); + tooltip.show(position); + tooltip.target.x = position.x + 1; } + + function onHideTooltip() { tooltip.hide() } } } } @@ -480,10 +445,9 @@ UM.Dialog } } - rightButtons: Button + rightButtons: Cura.TertiaryButton { text: catalog.i18nc("@action:button", "Close") - iconName: "dialog-close" onClicked: dialog.accept() } @@ -515,7 +479,7 @@ UM.Dialog } return tipText } - toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignLeft + toolTipContentAlignment: UM.Enums.ContentAlignment.AlignLeft onClicked: dialog.show() iconSource: "Script.svg" fixedWidthMode: false diff --git a/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py b/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py index 72b26b13f6..91b36389f3 100644 --- a/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py +++ b/plugins/PostProcessingPlugin/scripts/ChangeAtZ.py @@ -298,7 +298,7 @@ class ChangeAtZ(Script): }, "caz_change_retract": { "label": "Change Retraction", - "description": "Indicates you would like to modify retraction properties.", + "description": "Indicates you would like to modify retraction properties. Does not work when using relative extrusion.", "type": "bool", "default_value": false }, diff --git a/plugins/PrepareStage/PrepareMain.qml b/plugins/PrepareStage/PrepareMain.qml index ab3cf0e07c..1347be674d 100644 --- a/plugins/PrepareStage/PrepareMain.qml +++ b/plugins/PrepareStage/PrepareMain.qml @@ -1,10 +1,7 @@ -//Copyright (c) 2020 Ultimaker B.V. +//Copyright (c) 2021 Ultimaker B.V. //Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.4 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.1 -import QtQuick.Controls.Styles 1.1 import UM 1.0 as UM import Cura 1.0 as Cura diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml index cf7665bda6..f0779df98f 100644 --- a/plugins/PrepareStage/PrepareMenu.qml +++ b/plugins/PrepareStage/PrepareMenu.qml @@ -5,7 +5,7 @@ import QtQuick 2.9 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -131,14 +131,10 @@ Item height: UM.Theme.getSize("action_button").height hoverEnabled: true - contentItem: Label + contentItem: UM.Label { text: model.displayText - color: UM.Theme.getColor("text") font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter - width: contentWidth height: parent.height } diff --git a/plugins/PreviewStage/PreviewMain.qml b/plugins/PreviewStage/PreviewMain.qml index 2926f0d012..25e53318dc 100644 --- a/plugins/PreviewStage/PreviewMain.qml +++ b/plugins/PreviewStage/PreviewMain.qml @@ -1,11 +1,7 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.4 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.1 -import QtQuick.Controls.Styles 1.1 - import UM 1.0 as UM import Cura 1.0 as Cura diff --git a/plugins/SimulationView/LayerSlider.qml b/plugins/SimulationView/LayerSlider.qml index d2a22755ae..0a24ca9023 100644 --- a/plugins/SimulationView/LayerSlider.qml +++ b/plugins/SimulationView/LayerSlider.qml @@ -1,10 +1,8 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.2 import QtQuick.Layouts 1.1 -import QtQuick.Controls.Styles 1.1 import UM 1.0 as UM import Cura 1.0 as Cura diff --git a/plugins/SimulationView/PathSlider.qml b/plugins/SimulationView/PathSlider.qml index facdbb6a53..70e5acc4f1 100644 --- a/plugins/SimulationView/PathSlider.qml +++ b/plugins/SimulationView/PathSlider.qml @@ -1,10 +1,8 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.2 import QtQuick.Layouts 1.1 -import QtQuick.Controls.Styles 1.1 import UM 1.0 as UM import Cura 1.0 as Cura diff --git a/plugins/SimulationView/SimulationSliderLabel.qml b/plugins/SimulationView/SimulationSliderLabel.qml index afd02069eb..1c434ae935 100644 --- a/plugins/SimulationView/SimulationSliderLabel.qml +++ b/plugins/SimulationView/SimulationSliderLabel.qml @@ -1,14 +1,15 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. + import QtQuick 2.5 -import QtQuick.Controls 1.2 +import QtQuick.Controls 2.2 import QtQuick.Layouts 1.1 -import QtQuick.Controls.Styles 1.1 import UM 1.0 as UM import Cura 1.0 as Cura -UM.PointingRectangle { +UM.PointingRectangle +{ id: sliderLabelRoot // custom properties @@ -28,47 +29,41 @@ UM.PointingRectangle { borderColor: UM.Theme.getColor("lining") borderWidth: UM.Theme.getSize("default_lining").width - Behavior on height { - NumberAnimation { - duration: 50 - } - } + Behavior on height { NumberAnimation { duration: 50 } } // catch all mouse events so they're not handled by underlying 3D scene - MouseArea { + MouseArea + { anchors.fill: parent } - TextMetrics { + TextMetrics + { id: maxValueMetrics font: valueLabel.font text: maximumValue + 1 // layers are 0 based, add 1 for display value - } - TextField { + TextField + { id: valueLabel - anchors { - verticalCenter: parent.verticalCenter - horizontalCenter: parent.horizontalCenter - alignWhenCentered: false - } + anchors.centerIn: parent - width: maxValueMetrics.width + UM.Theme.getSize("default_margin").width + //width: maxValueMetrics.contentWidth + 2 * UM.Theme.getSize("default_margin").width text: sliderLabelRoot.value + startFrom // the current handle value, add 1 because layers is an array horizontalAlignment: TextInput.AlignHCenter + leftPadding: UM.Theme.getSize("narrow_margin").width + rightPadding: UM.Theme.getSize("narrow_margin").width // key bindings, work when label is currently focused (active handle in LayerSlider) Keys.onUpPressed: sliderLabelRoot.setValue(sliderLabelRoot.value + ((event.modifiers & Qt.ShiftModifier) ? 10 : 1)) Keys.onDownPressed: sliderLabelRoot.setValue(sliderLabelRoot.value - ((event.modifiers & Qt.ShiftModifier) ? 10 : 1)) - - style: TextFieldStyle { - textColor: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering - background: Item { } - } + color: UM.Theme.getColor("text") + font: UM.Theme.getFont("default") + renderType: Text.NativeRendering + background: Item {} + selectByMouse: true onEditingFinished: { @@ -84,16 +79,18 @@ UM.PointingRectangle { } } - validator: IntValidator { + validator: IntValidator + { bottom: startFrom top: sliderLabelRoot.maximumValue + startFrom // +startFrom because maybe we want to start in a different value rather than 0 } } - - BusyIndicator { + BusyIndicator + { id: busyIndicator - anchors { + anchors + { left: parent.right leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2) verticalCenter: parent.verticalCenter diff --git a/plugins/SimulationView/SimulationViewMainComponent.qml b/plugins/SimulationView/SimulationViewMainComponent.qml index af60692273..4fb238f6da 100644 --- a/plugins/SimulationView/SimulationViewMainComponent.qml +++ b/plugins/SimulationView/SimulationViewMainComponent.qml @@ -2,9 +2,6 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.4 -import QtQuick.Controls 1.2 -import QtQuick.Layouts 1.1 -import QtQuick.Controls.Styles 1.1 import UM 1.4 as UM import Cura 1.0 as Cura diff --git a/plugins/SimulationView/SimulationViewMenuComponent.qml b/plugins/SimulationView/SimulationViewMenuComponent.qml index 6dde44c8ae..ba13a75ea7 100644 --- a/plugins/SimulationView/SimulationViewMenuComponent.qml +++ b/plugins/SimulationView/SimulationViewMenuComponent.qml @@ -1,13 +1,12 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.4 -import QtQuick.Controls 1.2 import QtQuick.Layouts 1.1 -import QtQuick.Controls.Styles 1.1 +import QtQuick.Controls 2.1 import QtGraphicalEffects 1.0 -import UM 1.0 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -43,22 +42,19 @@ Cura.ExpandableComponent headerItem: Item { - Label + UM.Label { id: colorSchemeLabel text: catalog.i18nc("@label", "Color scheme") - verticalAlignment: Text.AlignVCenter height: parent.height elide: Text.ElideRight font: UM.Theme.getFont("medium") color: UM.Theme.getColor("text_medium") - renderType: Text.NativeRendering } - Label + UM.Label { text: layerTypeCombobox.currentText - verticalAlignment: Text.AlignVCenter anchors { left: colorSchemeLabel.right @@ -68,8 +64,6 @@ Cura.ExpandableComponent height: parent.height elide: Text.ElideRight font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering } } @@ -99,7 +93,8 @@ Cura.ExpandableComponent spacing: UM.Theme.getSize("layerview_row_spacing").height - ListModel // matches SimulationView.py + // matches SimulationView.py + ListModel { id: layerViewTypes } @@ -132,18 +127,17 @@ Cura.ExpandableComponent }) } - ComboBox + Cura.ComboBox { id: layerTypeCombobox + textRole: "text" + valueRole: "type_id" width: parent.width + implicitHeight: UM.Theme.getSize("setting_control").height model: layerViewTypes visible: !UM.SimulationView.compatibilityMode - style: UM.Theme.styles.combobox - onActivated: - { - UM.Preferences.setValue("layerview/layer_view_type", index); - } + onActivated: UM.Preferences.setValue("layerview/layer_view_type", index) Component.onCompleted: { @@ -165,16 +159,13 @@ Cura.ExpandableComponent } } - Label + UM.Label { id: compatibilityModeLabel text: catalog.i18nc("@label", "Compatibility Mode") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") visible: UM.SimulationView.compatibilityMode height: UM.Theme.getSize("layerview_row").height width: parent.width - renderType: Text.NativeRendering } Item // Spacer @@ -187,7 +178,7 @@ Cura.ExpandableComponent { model: CuraApplication.getExtrudersModel() - CheckBox + UM.CheckBox { id: extrudersModelCheckBox checked: viewSettings.extruder_opacities[index] > 0.5 || viewSettings.extruder_opacities[index] == undefined || viewSettings.extruder_opacities[index] == "" @@ -201,8 +192,6 @@ Cura.ExpandableComponent UM.Preferences.setValue("layerview/extruder_opacities", viewSettings.extruder_opacities.join("|")); } - style: UM.Theme.styles.checkbox - Rectangle { id: swatch @@ -215,12 +204,11 @@ Cura.ExpandableComponent border.color: UM.Theme.getColor("lining") } - Label + UM.Label { text: model.name elide: Text.ElideRight color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") anchors { verticalCenter: parent.verticalCenter @@ -229,7 +217,6 @@ Cura.ExpandableComponent leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width / 2) rightMargin: UM.Theme.getSize("default_margin").width * 2 } - renderType: Text.NativeRendering } } } @@ -277,7 +264,7 @@ Cura.ExpandableComponent } } - CheckBox + UM.CheckBox { id: legendModelCheckBox checked: model.initialValue @@ -285,8 +272,6 @@ Cura.ExpandableComponent height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height width: parent.width - style: UM.Theme.styles.checkbox - Rectangle { anchors.verticalCenter: parent.verticalCenter @@ -299,7 +284,7 @@ Cura.ExpandableComponent visible: viewSettings.show_legend } - Label + UM.Label { text: label font: UM.Theme.getFont("default") @@ -315,24 +300,22 @@ Cura.ExpandableComponent } } - CheckBox + UM.CheckBox { checked: viewSettings.only_show_top_layers onClicked: UM.Preferences.setValue("view/only_show_top_layers", checked ? 1.0 : 0.0) text: catalog.i18nc("@label", "Only Show Top Layers") visible: UM.SimulationView.compatibilityMode - style: UM.Theme.styles.checkbox width: parent.width } - CheckBox + UM.CheckBox { checked: viewSettings.top_layer_count == 5 onClicked: UM.Preferences.setValue("view/top_layer_count", checked ? 5 : 1) text: catalog.i18nc("@label", "Show 5 Detailed Layers On Top") width: parent.width visible: UM.SimulationView.compatibilityMode - style: UM.Theme.styles.checkbox } Repeater @@ -353,7 +336,7 @@ Cura.ExpandableComponent } } - Label + UM.Label { text: label visible: viewSettings.show_legend @@ -362,8 +345,6 @@ Cura.ExpandableComponent height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height width: parent.width color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering Rectangle { anchors.verticalCenter: parent.verticalCenter @@ -388,7 +369,7 @@ Cura.ExpandableComponent width: parent.width height: UM.Theme.getSize("layerview_row").height - Label //Minimum value. + UM.Label //Minimum value. { text: { @@ -419,12 +400,9 @@ Cura.ExpandableComponent return catalog.i18nc("@label","min") } anchors.left: parent.left - color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering } - Label //Unit in the middle. + UM.Label //Unit in the middle. { text: { @@ -456,10 +434,9 @@ Cura.ExpandableComponent anchors.horizontalCenter: parent.horizontalCenter color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") } - Label //Maximum value. + UM.Label //Maximum value. { text: { if (UM.SimulationView.layerActivity && CuraApplication.platformActivity) @@ -490,7 +467,6 @@ Cura.ExpandableComponent anchors.right: parent.right color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml b/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml index fde4a5ea3d..4458b48996 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/CameraButton.qml @@ -3,7 +3,6 @@ import QtQuick 2.3 import QtQuick.Controls 2.4 -import QtQuick.Controls.Styles 1.3 import UM 1.3 as UM import Cura 1.0 as Cura @@ -19,7 +18,7 @@ Button { anchors.fill: parent radius: 0.5 * width - color: parent.enabled ? (parent.hovered ? UM.Theme.getColor("monitor_secondary_button_hover") : "transparent") : UM.Theme.getColor("monitor_icon_disabled") + color: parent.enabled ? (parent.hovered ? UM.Theme.getColor("monitor_card_hover") : "transparent") : UM.Theme.getColor("monitor_icon_disabled") } UM.RecolorImage diff --git a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml index 2843e32da4..e68f552f7b 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/DiscoverUM3Action.qml @@ -1,14 +1,13 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.5 as Cura import QtQuick 2.2 -import QtQuick.Controls 1.1 +import QtQuick.Controls 2.9 import QtQuick.Layouts 1.1 import QtQuick.Window 2.1 -import QtQuick.Dialogs 1.2 Cura.MachineAction { @@ -36,32 +35,27 @@ Cura.MachineAction id: discoverUM3Action spacing: UM.Theme.getSize("default_margin").height - SystemPalette { id: palette } UM.I18nCatalog { id: catalog; name:"cura" } - Label + + UM.Label { id: pageTitle width: parent.width text: catalog.i18nc("@title:window", "Connect to Networked Printer") - wrapMode: Text.WordWrap - renderType: Text.NativeRendering - font.pointSize: 18 } - Label + UM.Label { id: pageDescription width: parent.width - wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: catalog.i18nc("@label", "To print directly to your printer over the network, please make sure your printer is connected to the network using a network cable or by connecting your printer to your WIFI network. If you don't connect Cura with your printer, you can still use a USB drive to transfer g-code files to your printer.") + "\n\n" + catalog.i18nc("@label", "Select your printer from the list below:") } Row { - spacing: UM.Theme.getSize("default_lining").width + spacing: UM.Theme.getSize("thin_margin").width - Button + Cura.SecondaryButton { id: addButton text: catalog.i18nc("@action:button", "Add"); @@ -71,7 +65,7 @@ Cura.MachineAction } } - Button + Cura.SecondaryButton { id: editButton text: catalog.i18nc("@action:button", "Edit") @@ -82,7 +76,7 @@ Cura.MachineAction } } - Button + Cura.SecondaryButton { id: removeButton text: catalog.i18nc("@action:button", "Remove") @@ -90,7 +84,7 @@ Cura.MachineAction onClicked: manager.removeManualDevice(base.selectedDevice.key, base.selectedDevice.ipAddress) } - Button + Cura.SecondaryButton { id: rediscoverButton text: catalog.i18nc("@action:button", "Refresh") @@ -109,70 +103,61 @@ Cura.MachineAction width: Math.round(parent.width * 0.5) spacing: UM.Theme.getSize("default_margin").height - ScrollView + ListView { - id: objectListContainer - frameVisible: true + id: listview + width: parent.width height: base.height - contentRow.y - discoveryTip.height - Rectangle + ScrollBar.vertical: UM.ScrollBar {} + clip: true + + model: manager.foundDevices + currentIndex: -1 + onCurrentIndexChanged: { - parent: viewport - anchors.fill: parent - color: palette.light + base.selectedDevice = listview.model[currentIndex]; + // Only allow connecting if the printer has responded to API query since the last refresh + base.completeProperties = base.selectedDevice != null && base.selectedDevice.getProperty("incomplete") != "true"; } + Component.onCompleted: manager.startDiscovery() - ListView + delegate: UM.Label { - id: listview - model: manager.foundDevices - width: parent.width - currentIndex: -1 - onCurrentIndexChanged: - { - base.selectedDevice = listview.model[currentIndex]; - // Only allow connecting if the printer has responded to API query since the last refresh - base.completeProperties = base.selectedDevice != null && base.selectedDevice.getProperty("incomplete") != "true"; - } - Component.onCompleted: manager.startDiscovery() - delegate: Rectangle - { - height: childrenRect.height - color: ListView.isCurrentItem ? palette.highlight : index % 2 ? palette.base : palette.alternateBase - width: parent.width - Label - { - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.right: parent.right - text: listview.model[index].name - color: parent.ListView.isCurrentItem ? palette.highlightedText : palette.text - elide: Text.ElideRight - renderType: Text.NativeRendering - } + id: printNameLabel + width: listview.width + height: contentHeight + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width - MouseArea + anchors.right: parent.right + text: listview.model[index].name + elide: Text.ElideRight + + MouseArea + { + anchors.fill: parent; + onClicked: { - anchors.fill: parent; - onClicked: + if(!parent.ListView.isCurrentItem) { - if(!parent.ListView.isCurrentItem) - { - parent.ListView.view.currentIndex = index; - } + parent.ListView.view.currentIndex = index; } } } + + background: Rectangle + { + color: parent.ListView.isCurrentItem ? UM.Theme.getColor("background_3") : "transparent" + } } } - Label + UM.Label { id: discoveryTip anchors.left: parent.left anchors.right: parent.right - wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: catalog.i18nc("@label", "If your printer is not listed, read the <a href='%1'>network printing troubleshooting guide</a>").arg("https://ultimaker.com/en/cura/troubleshooting/network?utm_source=cura&utm_medium=software&utm_campaign=manage-network-printer"); onLinkActivated: Qt.openUrlExternally(link) } @@ -183,32 +168,26 @@ Cura.MachineAction width: Math.round(parent.width * 0.5) visible: base.selectedDevice ? true : false spacing: UM.Theme.getSize("default_margin").height - Label + UM.Label { width: parent.width - wrapMode: Text.WordWrap text: base.selectedDevice ? base.selectedDevice.name : "" font: UM.Theme.getFont("large_bold") elide: Text.ElideRight - renderType: Text.NativeRendering } - Grid + GridLayout { visible: base.completeProperties width: parent.width columns: 2 - Label + UM.Label { - width: Math.round(parent.width * 0.5) - wrapMode: Text.WordWrap - renderType: Text.NativeRendering + Layout.fillWidth: true text: catalog.i18nc("@label", "Type") } - Label + UM.Label { - width: Math.round(parent.width * 0.5) - wrapMode: Text.WordWrap - renderType: Text.NativeRendering + Layout.fillWidth: true text: { if (base.selectedDevice) { @@ -217,41 +196,31 @@ Cura.MachineAction return "" } } - Label + UM.Label { - width: Math.round(parent.width * 0.5) - wrapMode: Text.WordWrap - renderType: Text.NativeRendering + Layout.fillWidth: true text: catalog.i18nc("@label", "Firmware version") } - Label + UM.Label { - width: Math.round(parent.width * 0.5) - wrapMode: Text.WordWrap - renderType: Text.NativeRendering + Layout.fillWidth: true text: base.selectedDevice ? base.selectedDevice.firmwareVersion : "" } - Label + UM.Label { - width: Math.round(parent.width * 0.5) - wrapMode: Text.WordWrap - renderType: Text.NativeRendering + Layout.fillWidth: true text: catalog.i18nc("@label", "Address") } - Label + UM.Label { - width: Math.round(parent.width * 0.5) - wrapMode: Text.WordWrap - renderType: Text.NativeRendering + Layout.fillWidth: true text: base.selectedDevice ? base.selectedDevice.ipAddress : "" } } - Label + UM.Label { width: parent.width - wrapMode: Text.WordWrap - renderType: Text.NativeRendering text:{ // The property cluster size does not exist for older UM3 devices. if(!base.selectedDevice || base.selectedDevice.clusterSize == null || base.selectedDevice.clusterSize == 1) @@ -269,16 +238,14 @@ Cura.MachineAction } } - Label + UM.Label { width: parent.width - wrapMode: Text.WordWrap - renderType: Text.NativeRendering visible: base.selectedDevice != null && !base.completeProperties text: catalog.i18nc("@label", "The printer at this address has not yet responded." ) } - Button + Cura.SecondaryButton { text: catalog.i18nc("@action:button", "Connect") enabled: (base.selectedDevice && base.completeProperties && base.selectedDevice.clusterSize > 0) ? true : false @@ -288,18 +255,15 @@ Cura.MachineAction } } - MessageDialog + Cura.MessageDialog { id: invalidIPAddressMessageDialog - x: parent ? (parent.x + (parent.width) / 2) : 0 - y: parent ? (parent.y + (parent.height) / 2) : 0 title: catalog.i18nc("@title:window", "Invalid IP address") text: catalog.i18nc("@text", "Please enter a valid IP address.") - icon: StandardIcon.Warning - standardButtons: StandardButton.Ok + standardButtons: Dialog.Ok } - UM.Dialog + Cura.MessageDialog { id: manualPrinterDialog property string printerKey @@ -307,17 +271,19 @@ Cura.MachineAction title: catalog.i18nc("@title:window", "Printer Address") - minimumWidth: 400 * screenScaleFactor - minimumHeight: 130 * screenScaleFactor - width: minimumWidth - height: minimumHeight + width: UM.Theme.getSize("small_popup_dialog").width + height: UM.Theme.getSize("small_popup_dialog").height + + anchors.centerIn: Overlay.overlay + + standardButtons: Dialog.Yes | Dialog.No signal showDialog(string key, string address) onShowDialog: { printerKey = key; addressText = address; - manualPrinterDialog.show(); + manualPrinterDialog.open(); addressField.selectAll(); addressField.focus = true; } @@ -326,67 +292,45 @@ Cura.MachineAction anchors.fill: parent spacing: UM.Theme.getSize("default_margin").height - Label + UM.Label { text: catalog.i18nc("@label", "Enter the IP address of your printer on the network.") - width: parent.width - wrapMode: Text.WordWrap renderType: Text.NativeRendering } - TextField + Cura.TextField { id: addressField width: parent.width - validator: RegExpValidator - { - regExp: /[a-zA-Z0-9\.\-\_]*/ - } - - onAccepted: btnOk.clicked() + validator: RegExpValidator { regExp: /[a-zA-Z0-9\.\-\_]*/ } } } - rightButtons: [ - Button { - text: catalog.i18nc("@action:button","Cancel") - onClicked: - { - manualPrinterDialog.reject() - manualPrinterDialog.hide() - } - }, - Button { - id: btnOk - text: catalog.i18nc("@action:button", "OK") - onClicked: - { - // Validate the input first - if (!networkingUtil.isValidIP(manualPrinterDialog.addressText)) - { - invalidIPAddressMessageDialog.open() - return - } - - // if the entered IP address has already been discovered, switch the current item to that item - // and do nothing else. - for (var i = 0; i < manager.foundDevices.length; i++) - { - var device = manager.foundDevices[i] - if (device.address == manualPrinterDialog.addressText) - { - currentItemIndex = i - manualPrinterDialog.hide() - return - } - } + onAccepted: + { + // Validate the input first + if (!networkingUtil.isValidIP(manualPrinterDialog.addressText)) + { + // prefent closing of element, as we want to keep the dialog active after a wrongly entered IP adress + manualPrinterDialog.open() + // show invalid ip warning + invalidIPAddressMessageDialog.open(); + return; + } - manager.setManualDevice(manualPrinterDialog.printerKey, manualPrinterDialog.addressText) - manualPrinterDialog.hide() + // if the entered IP address has already been discovered, switch the current item to that item + // and do nothing else. + for (var i = 0; i < manager.foundDevices.length; i++) + { + var device = manager.foundDevices[i] + if (device.address == manualPrinterDialog.addressText) + { + currentItemIndex = i; + return; } - enabled: manualPrinterDialog.addressText.trim() != "" - isDefault: true } - ] + + manager.setManualDevice(manualPrinterDialog.printerKey, manualPrinterDialog.addressText); + } } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/GenericPopUp.qml b/plugins/UM3NetworkPrinting/resources/qml/GenericPopUp.qml index 61981dab2c..580338ae0c 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/GenericPopUp.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/GenericPopUp.qml @@ -3,8 +3,6 @@ import QtQuick 2.2 import QtQuick.Controls 2.0 -import QtQuick.Controls.Styles 1.4 -import QtQuick.Dialogs 1.1 import QtGraphicalEffects 1.0 import UM 1.3 as UM diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml index 598d0ec70a..60e3726a32 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorBuildplateConfiguration.qml @@ -3,7 +3,7 @@ import QtQuick 2.2 import QtQuick.Controls 2.0 -import UM 1.3 as UM +import UM 1.5 as UM /** * This component comprises a buildplate icon and the buildplate name. It is @@ -57,19 +57,15 @@ Item } } - Label + UM.Label { id: buildplateLabel - color: UM.Theme.getColor("text") elide: Text.ElideRight - font: UM.Theme.getFont("default") // 12pt, regular text: buildplate ? buildplate : "" visible: text !== "" // FIXED-LINE-HEIGHT: height: 18 * screenScaleFactor // TODO: Theme! - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorConfigOverrideDialog.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorConfigOverrideDialog.qml index 1fe766d9f7..47586f3925 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorConfigOverrideDialog.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorConfigOverrideDialog.qml @@ -2,10 +2,10 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.3 -import QtQuick.Controls 1.4 +import QtQuick.Controls 2.4 import QtQuick.Layouts 1.3 -import QtQuick.Dialogs 1.2 -import UM 1.3 as UM +import UM 1.5 as UM +import Cura 1.5 as Cura UM.Dialog { @@ -18,12 +18,21 @@ UM.Dialog width: minimumWidth height: minimumHeight title: catalog.i18nc("@title:window", "Configuration Changes") + buttonSpacing: UM.Theme.getSize("narrow_margin").width rightButtons: [ - Button + Cura.TertiaryButton + { + id: cancelButton + text: catalog.i18nc("@action:button", "Cancel") + onClicked: + { + overrideConfirmationDialog.reject() + } + }, + Cura.PrimaryButton { id: overrideButton - anchors.margins: UM.Theme.getSize("default_margin").width text: catalog.i18nc("@action:button", "Override") onClicked: { @@ -50,20 +59,10 @@ UM.Dialog } return true } - }, - Button - { - id: cancelButton - anchors.margins: UM.Theme.getSize("default_margin").width - text: catalog.i18nc("@action:button", "Cancel") - onClicked: - { - overrideConfirmationDialog.reject() - } } ] - Label + UM.Label { anchors { @@ -72,7 +71,6 @@ UM.Dialog bottomMargin: 56 * screenScaleFactor // TODO: Theme! } wrapMode: Text.WordWrap - renderType: Text.NativeRendering text: { if (!printer || !printer.activePrintJob) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml index 34ca3c6df2..03e9477d08 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenu.qml @@ -1,10 +1,10 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.3 -import QtQuick.Controls 2.0 -import QtQuick.Dialogs 1.1 -import UM 1.3 as UM +import QtQuick.Controls 2.15 +import UM 1.5 as UM +import Cura 1.6 as Cura /** * A MonitorInfoBlurb is an extension of the GenericPopUp used to show static information (vs. interactive context @@ -134,32 +134,29 @@ Item } } - MessageDialog { + Cura.MessageDialog + { id: sendToTopConfirmationDialog - Component.onCompleted: visible = false - icon: StandardIcon.Warning - onYes: OutputDevice.sendJobToTop(printJob.key) - standardButtons: StandardButton.Yes | StandardButton.No + onAccepted: OutputDevice.sendJobToTop(printJob.key) + standardButtons: Dialog.Yes | Dialog.No text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to move %1 to the top of the queue?").arg(printJob.name) : "" title: catalog.i18nc("@window:title", "Move print job to top") } - MessageDialog { + Cura.MessageDialog + { id: deleteConfirmationDialog - Component.onCompleted: visible = false - icon: StandardIcon.Warning - onYes: OutputDevice.deleteJobFromQueue(printJob.key) - standardButtons: StandardButton.Yes | StandardButton.No + onAccepted: OutputDevice.deleteJobFromQueue(printJob.key) + standardButtons: Dialog.Yes | Dialog.No text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to delete %1?").arg(printJob.name) : "" title: catalog.i18nc("@window:title", "Delete print job") } - MessageDialog { + Cura.MessageDialog + { id: abortConfirmationDialog - Component.onCompleted: visible = false - icon: StandardIcon.Warning - onYes: printJob.setState("abort") - standardButtons: StandardButton.Yes | StandardButton.No + onAccepted: printJob.setState("abort") + standardButtons: Dialog.Yes | Dialog.No text: printJob && printJob.name ? catalog.i18nc("@label %1 is the name of a print job.", "Are you sure you want to abort %1?").arg(printJob.name) : "" title: catalog.i18nc("@window:title", "Abort print") } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenuButton.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenuButton.qml index 0be3732cef..1c6cfda121 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenuButton.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorContextMenuButton.qml @@ -3,7 +3,7 @@ import QtQuick 2.3 import QtQuick.Controls 2.0 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Button @@ -17,13 +17,12 @@ Button radius: Math.round(0.5 * width) width: base.width } - contentItem: Label { + contentItem: UM.Label + { color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") font.pixelSize: 32 * screenScaleFactor horizontalAlignment: Text.AlignHCenter text: base.text - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering; } height: width hoverEnabled: enabled diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml index ad0e8a6777..f22ac53298 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml @@ -3,7 +3,7 @@ import QtQuick 2.2 import QtQuick.Controls 2.0 -import UM 1.3 as UM +import UM 1.5 as UM /** * This component is a sort of "super icon" which includes a colored SVG image @@ -35,18 +35,16 @@ Item width: size } - Label + UM.Label { id: positionLabel anchors.centerIn: icon font: UM.Theme.getFont("small") - color: UM.Theme.getColor("text") height: Math.round(size / 2) horizontalAlignment: Text.AlignHCenter text: position + 1 - verticalAlignment: Text.AlignVCenter + width: Math.round(size / 2) visible: position >= 0 - renderType: Text.NativeRendering } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml index 65bf4e3a07..2974e5ce6b 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml @@ -2,7 +2,7 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 import QtQuick.Controls 2.0 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.0 as Cura /** @@ -55,10 +55,9 @@ Item visible: !printJob radius: 2 * screenScaleFactor // TODO: Theme! } - Label + UM.Label { text: printJob && printJob.name ? printJob.name : "" - color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular visible: printJob @@ -66,8 +65,6 @@ Item // FIXED-LINE-HEIGHT: width: parent.width height: parent.height - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } } @@ -86,18 +83,15 @@ Item radius: 2 * screenScaleFactor // TODO: Theme! } - Label + UM.Label { text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : "" - color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular visible: printJob // FIXED-LINE-HEIGHT: height: Math.round(18 * screenScaleFactor) // TODO: Theme! - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } } @@ -116,11 +110,10 @@ Item radius: 2 * screenScaleFactor // TODO: Theme! } - Label + UM.Label { id: printerAssignmentLabel anchors.verticalCenter: parent.verticalCenter - color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular text: { @@ -143,8 +136,6 @@ Item // FIXED-LINE-HEIGHT: height: parent.height - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } Row @@ -186,17 +177,15 @@ Item height: Math.round(72 * screenScaleFactor) // TODO: Theme! } - Label { + UM.Label + { text: printJob && printJob.owner ? printJob.owner : "" - color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("medium") // 14pt, regular anchors.top: printerConfiguration.top // FIXED-LINE-HEIGHT: height: Math.round(18 * screenScaleFactor) // TODO: Theme! - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml index 23bcc589b1..65c37ffe16 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobProgressBar.qml @@ -2,9 +2,7 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.3 -import QtQuick.Controls.Styles 1.3 -import QtQuick.Controls 1.4 -import UM 1.3 as UM +import UM 1.5 as UM /** * NOTE: For most labels, a fixed height with vertical alignment is used to make @@ -20,7 +18,7 @@ Item property var printJob: null width: childrenRect.width - height: UM.Theme.getSize("monitor_text_line").height + height: percentLabel.height UM.ProgressBar { @@ -34,36 +32,28 @@ Item width: UM.Theme.getSize("monitor_progress_bar").width } - Label + UM.Label { id: percentLabel anchors { left: progressBar.right - leftMargin: UM.Theme.getSize("monitor_margin").width - verticalCenter: parent.verticalCenter + leftMargin: UM.Theme.getSize("default_margin").width } text: printJob ? Math.round(printJob.progress * 100) + "%" : "0%" color: printJob && printJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") width: contentWidth - font: UM.Theme.getFont("default") // 12pt, regular - - // FIXED-LINE-HEIGHT: - height: UM.Theme.getSize("monitor_text_line").height - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering + wrapMode: Text.NoWrap } - Label + UM.Label { id: statusLabel anchors { left: percentLabel.right - leftMargin: UM.Theme.getSize("monitor_margin").width - verticalCenter: parent.verticalCenter + leftMargin: UM.Theme.getSize("default_margin").width } - color: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") + wrapMode: Text.NoWrap text: { if (!printJob) @@ -117,10 +107,5 @@ Item } } width: contentWidth - - // FIXED-LINE-HEIGHT: - height: UM.Theme.getSize("monitor_text_line").height - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml index 5a4556f1f7..df701b1d1f 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterCard.qml @@ -3,8 +3,7 @@ import QtQuick 2.3 import QtQuick.Controls 2.0 -import QtQuick.Dialogs 1.1 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.0 as Cura /** @@ -64,7 +63,7 @@ Item leftMargin: 36 * screenScaleFactor // TODO: Theme! verticalCenter: parent.verticalCenter } - spacing: 18 * screenScaleFactor // TODO: Theme! + spacing: UM.Theme.getSize("default_margin").width Rectangle { @@ -96,23 +95,18 @@ Item { id: printerNameLabel color: printer ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading") - height: 18 * screenScaleFactor // TODO: Theme! + height: UM.Theme.getSize("default_margin").width width: parent.width - radius: 2 * screenScaleFactor // TODO: Theme! + radius: UM.Theme.getSize("default_radius").width - Label + UM.Label { text: printer && printer.name ? printer.name : "" - color: UM.Theme.getColor("text") elide: Text.ElideRight font: UM.Theme.getFont("large") // 16pt, bold width: parent.width visible: printer - - // FIXED-LINE-HEIGHT: height: parent.height - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } } @@ -120,7 +114,7 @@ Item { color: UM.Theme.getColor("monitor_skeleton_loading") height: 18 * screenScaleFactor // TODO: Theme! - radius: 2 * screenScaleFactor // TODO: Theme! + radius: UM.Theme.getSize("default_radius").width visible: !printer width: 48 * screenScaleFactor // TODO: Theme! } @@ -138,21 +132,20 @@ Item Item { id: managePrinterLink - anchors { + anchors + { top: printerFamilyPill.bottom topMargin: UM.Theme.getSize("narrow_margin").height } height: 18 * screenScaleFactor // TODO: Theme! width: childrenRect.width - Label + UM.Label { id: managePrinterText anchors.verticalCenter: managePrinterLink.verticalCenter color: UM.Theme.getColor("text_link") - font: UM.Theme.getFont("default") text: catalog.i18nc("@label link to Connect and Cloud interfaces", "Manage printer") - renderType: Text.NativeRendering } UM.RecolorImage { @@ -165,22 +158,16 @@ Item } color: UM.Theme.getColor("text_link") source: UM.Theme.getIcon("LinkExternal") - width: 12 * screenScaleFactor - height: 12 * screenScaleFactor + width: UM.Theme.getSize("icon").width + height: UM.Theme.getSize("icon").height } } MouseArea { anchors.fill: managePrinterLink onClicked: OutputDevice.openPrinterControlPanel() - onEntered: - { - manageQueueText.font.underline = true - } - onExited: - { - manageQueueText.font.underline = false - } + onEntered: manageQueueText.font.underline = true + onExited: manageQueueText.font.underline = false } } @@ -332,9 +319,9 @@ Item leftMargin: 36 * screenScaleFactor // TODO: Theme! } height: childrenRect.height - spacing: 18 * screenScaleFactor // TODO: Theme! + spacing: UM.Theme.getSize("default_margin").width - Label + UM.Label { id: printerStatus anchors @@ -371,7 +358,6 @@ Item return "" } visible: text !== "" - renderType: Text.NativeRendering } Item @@ -401,22 +387,18 @@ Item height: printerNameLabel.height + printerFamilyPill.height + 6 * screenScaleFactor // TODO: Theme! visible: printer && printer.activePrintJob && !printerStatus.visible - Label + UM.Label { id: printerJobNameLabel color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") elide: Text.ElideRight + wrapMode: Text.NoWrap font: UM.Theme.getFont("large") // 16pt, bold text: printer && printer.activePrintJob ? printer.activePrintJob.name : catalog.i18nc("@label", "Untitled") width: parent.width - - // FIXED-LINE-HEIGHT: - height: 18 * screenScaleFactor // TODO: Theme! - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } - Label + UM.Label { id: printerJobOwnerLabel anchors @@ -427,14 +409,8 @@ Item } color: printer && printer.activePrintJob && printer.activePrintJob.isActive ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") elide: Text.ElideRight - font: UM.Theme.getFont("default") // 12pt, regular text: printer && printer.activePrintJob ? printer.activePrintJob.owner : catalog.i18nc("@label", "Anonymous") width: parent.width - - // FIXED-LINE-HEIGHT: - height: 18 * screenScaleFactor // TODO: Theme! - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } } @@ -448,59 +424,27 @@ Item visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length === 0 && !printerStatus.visible } - Label + UM.Label { anchors { verticalCenter: parent.verticalCenter } - font: UM.Theme.getFont("default") text: catalog.i18nc("@label:status", "Requires configuration changes") visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible - color: UM.Theme.getColor("text") - - // FIXED-LINE-HEIGHT: - height: 18 * screenScaleFactor // TODO: Theme! - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } } - Button + Cura.SecondaryButton { id: detailsButton anchors { verticalCenter: parent.verticalCenter right: parent.right - rightMargin: 18 * screenScaleFactor // TODO: Theme! - } - background: Rectangle - { - color: UM.Theme.getColor("monitor_secondary_button_shadow") - radius: 2 * screenScaleFactor // Todo: Theme! - Rectangle - { - anchors.fill: parent - anchors.bottomMargin: 2 * screenScaleFactor // TODO: Theme! - color: detailsButton.hovered ? UM.Theme.getColor("monitor_secondary_button_hover") : UM.Theme.getColor("monitor_secondary_button") - radius: 2 * screenScaleFactor // Todo: Theme! - } - } - contentItem: Label - { - anchors.fill: parent - anchors.bottomMargin: 2 * screenScaleFactor // TODO: Theme! - color: UM.Theme.getColor("monitor_secondary_button_text") - font: UM.Theme.getFont("medium") // 14pt, regular - text: catalog.i18nc("@action:button", "Details"); - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - height: 18 * screenScaleFactor // TODO: Theme! - renderType: Text.NativeRendering + rightMargin: UM.Theme.getSize("default_margin").width } - implicitHeight: 32 * screenScaleFactor // TODO: Theme! - implicitWidth: 96 * screenScaleFactor // TODO: Theme! + text: catalog.i18nc("@action:button", "Details") visible: printer && printer.activePrintJob && printer.activePrintJob.configurationChanges.length > 0 && !printerStatus.visible onClicked: base.enabled ? overrideConfirmationDialog.open() : {} enabled: OutputDevice.supportsPrintJobActions diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterPill.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterPill.qml index 4cd9d58cae..d2c9251bec 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterPill.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrinterPill.qml @@ -2,8 +2,7 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.4 -import UM 1.2 as UM +import UM 1.5 as UM /** * A MonitorPrinterPill is a blue-colored tag indicating which printers a print @@ -17,20 +16,19 @@ Item implicitHeight: 18 * screenScaleFactor // TODO: Theme! implicitWidth: Math.max(printerNameLabel.contentWidth + 12 * screenScaleFactor, 36 * screenScaleFactor) // TODO: Theme! - Rectangle { + Rectangle + { id: background anchors.fill: parent color: printerNameLabel.visible ? UM.Theme.getColor("monitor_printer_family_tag") : UM.Theme.getColor("monitor_skeleton_loading") radius: 2 * screenScaleFactor // TODO: Theme! } - Label { + UM.Label + { id: printerNameLabel anchors.centerIn: parent - color: UM.Theme.getColor("text") text: monitorPrinterPill.text - font.pointSize: 10 // TODO: Theme! visible: monitorPrinterPill.text !== "" - renderType: Text.NativeRendering } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml index 1b94625bf0..87b7cab83e 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorQueue.qml @@ -1,10 +1,9 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import UM 1.3 as UM +import QtQuick.Controls 2.15 +import UM 1.5 as UM import Cura 1.0 as Cura /** @@ -18,18 +17,16 @@ Item // they might not need to though. property bool cloudConnection: Cura.MachineManager.activeMachineIsUsingCloudConnection - Label + UM.Label { id: queuedLabel anchors { - left: queuedPrintJobs.left + left: printJobList.left top: parent.top } - color: UM.Theme.getColor("text") font: UM.Theme.getFont("large") text: catalog.i18nc("@label", "Queued") - renderType: Text.NativeRendering } Item @@ -37,7 +34,7 @@ Item id: manageQueueLabel anchors { - right: queuedPrintJobs.right + right: printJobList.right verticalCenter: queuedLabel.verticalCenter } height: 18 * screenScaleFactor // TODO: Theme! @@ -52,7 +49,7 @@ Item width: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!) height: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!) } - Label + UM.Label { id: manageQueueText anchors @@ -64,7 +61,6 @@ Item color: UM.Theme.getColor("text_link") font: UM.Theme.getFont("medium") // 14pt, regular text: catalog.i18nc("@label link to connect manager", "Manage in browser") - renderType: Text.NativeRendering } } @@ -72,14 +68,9 @@ Item { anchors.fill: manageQueueLabel onClicked: OutputDevice.openPrintJobControlPanel() - onEntered: - { - manageQueueText.font.underline = true - } - onExited: - { - manageQueueText.font.underline = false - } + onEntered: manageQueueText.font.underline = true + + onExited: manageQueueText.font.underline = false } Row @@ -87,96 +78,85 @@ Item id: printJobQueueHeadings anchors { - left: queuedPrintJobs.left + left: printJobList.left leftMargin: UM.Theme.getSize("narrow_margin").width top: queuedLabel.bottom topMargin: 24 * screenScaleFactor // TODO: Theme! } spacing: 18 * screenScaleFactor // TODO: Theme! - Label + UM.Label { text: catalog.i18nc("@label", "There are no print jobs in the queue. Slice and send a job to add one.") - color: UM.Theme.getColor("text") font: UM.Theme.getFont("medium") anchors.verticalCenter: parent.verticalCenter - - renderType: Text.NativeRendering visible: printJobList.count === 0 } - Label + UM.Label { text: catalog.i18nc("@label", "Print jobs") - color: UM.Theme.getColor("text") font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter width: 284 * screenScaleFactor // TODO: Theme! (Should match column size) - - renderType: Text.NativeRendering visible: printJobList.count > 0 } - Label + UM.Label { text: catalog.i18nc("@label", "Total print time") - color: UM.Theme.getColor("text") font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter width: UM.Theme.getSize("monitor_column").width - - renderType: Text.NativeRendering visible: printJobList.count > 0 } - Label + UM.Label { text: catalog.i18nc("@label", "Waiting for") - color: UM.Theme.getColor("text") font: UM.Theme.getFont("medium") // 14pt, regular anchors.verticalCenter: parent.verticalCenter width: UM.Theme.getSize("monitor_column").width - - renderType: Text.NativeRendering visible: printJobList.count > 0 } } - ScrollView + ListView { - id: queuedPrintJobs + id: printJobList anchors { bottom: parent.bottom horizontalCenter: parent.horizontalCenter top: printJobQueueHeadings.bottom - topMargin: 12 * screenScaleFactor // TODO: Theme! + topMargin: UM.Theme.getSize("default_margin").width } - style: UM.Theme.styles.scrollview width: parent.width - ListView + ScrollBar.vertical: UM.ScrollBar + { + id: printJobScrollBar + } + spacing: UM.Theme.getSize("narrow_margin").width + clip: true + + delegate: MonitorPrintJobCard { - id: printJobList - anchors.fill: parent - delegate: MonitorPrintJobCard + anchors { - anchors - { - left: parent.left - right: parent.right - } - printJob: modelData + left: parent.left + right: parent.right + rightMargin: printJobScrollBar.width } - model: + printJob: modelData + } + model: + { + if (OutputDevice.receivedData) { - if (OutputDevice.receivedData) - { - return OutputDevice.queuedPrintJobs - } - return [null, null] + return OutputDevice.queuedPrintJobs } - spacing: 6 // TODO: Theme! + return [null, null] } } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml index 5d5b3ceab4..9e73662e1d 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorStage.qml @@ -2,8 +2,6 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 import UM 1.3 as UM import Cura 1.0 as Cura diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenuItem.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenuItem.qml index 3288896572..c7ebf803d5 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenuItem.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenuItem.qml @@ -1,24 +1,24 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 import QtQuick.Controls 2.0 -import QtQuick.Controls.Styles 1.4 -import UM 1.3 as UM +import UM 1.5 as UM -Button { - background: Rectangle { - opacity: parent.down || parent.hovered ? 1 : 0; +Button +{ + background: Rectangle + { + opacity: parent.down || parent.hovered ? 1 : 0 color: UM.Theme.getColor("monitor_context_menu_hover") } - contentItem: Label { - color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled"); + contentItem: UM.Label + { + color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled") text: parent.text - horizontalAlignment: Text.AlignLeft; - verticalAlignment: Text.AlignVCenter; - renderType: Text.NativeRendering; + horizontalAlignment: Text.AlignLeft } - height: visible ? 39 * screenScaleFactor : 0; // TODO: Theme! - hoverEnabled: true; - width: parent.width; + height: visible ? 39 * screenScaleFactor : 0 // TODO: Theme! + hoverEnabled: true + width: parent.width } diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml index dcfed2f7b4..441766a8e7 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml @@ -2,8 +2,7 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 import QtQuick.Window 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls 2.15 as NewControls +import QtQuick.Controls 2.15 import UM 1.1 as UM @@ -84,7 +83,7 @@ UM.Dialog { renderType: Text.NativeRendering; } - NewControls.ComboBox { + ComboBox { id: printerComboBox; currentIndex: 0; Behavior on height { NumberAnimation { duration: 100 } } diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml b/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml index 291e2a14f5..7fce1478a1 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrinterVideoStream.qml @@ -2,8 +2,6 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 import UM 1.3 as UM import Cura 1.0 as Cura diff --git a/plugins/USBPrinting/MonitorItem.qml b/plugins/USBPrinting/MonitorItem.qml index c86353f814..a3c7793fb1 100644 --- a/plugins/USBPrinting/MonitorItem.qml +++ b/plugins/USBPrinting/MonitorItem.qml @@ -3,7 +3,6 @@ import QtQuick 2.10 import QtQuick.Controls 2.0 -import QtQuick.Layouts 1.3 import UM 1.2 as UM import Cura 1.0 as Cura @@ -22,7 +21,10 @@ Component Cura.PrintMonitor { - anchors.fill: parent + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: footerSeparator.top } Rectangle diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 30d8751a4a..4fde50693f 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1092,38 +1092,6 @@ "default_value": "inward_distributed", "limit_to_extruder": "wall_0_extruder_nr" }, - "wall_transition_threshold": { - "label": "Middle Line Threshold", - "description": "The smallest line width, as a factor of the normal line width, below which it will choose to use fewer, but wider lines to fill the available space the wall needs to occupy. Reduce this setting to use more, thinner lines. Increase to use fewer, wider lines. Note that this applies -as if- the entire shape should be filled with wall, so the middle here refers to the middle of the object between two outer edges of the shape, even if there actually is fill or (other) skin in the print instead of wall.", - "type": "float", - "unit": "%", - "default_value": 90, - "minimum_value": "1", - "maximum_value": "99", - "children": - { - "wall_split_middle_threshold": { - "label": "Split Middle Line Threshold", - "description": "The smallest line width, as a factor of the normal line width, above which the middle line (if there is one) will be split into two. Reduce this setting to use more, thinner lines. Increase to use fewer, wider lines. Note that this applies -as if- the entire shape should be filled with wall, so the middle here refers to the middle of the object between two outer edges of the shape, even if there actually is fill or (other) skin in the print instead of wall.", - "type": "float", - "unit": "%", - "default_value": 90, - "value": "wall_transition_threshold", - "minimum_value": "1", - "maximum_value": "99" - }, - "wall_add_middle_threshold": { - "label": "Add Middle Line Threshold", - "description": "The smallest line width, as a factor of the normal line width, above which a middle line (if there wasn't one already) will be added. Reduce this setting to use more, thinner lines. Increase to use fewer, wider lines. Note that this applies -as if- the entire shape should be filled with wall, so the middle here refers to the middle of the object between two outer edges of the shape, even if there actually is fill or (other) skin in the print instead of wall.", - "type": "float", - "unit": "%", - "default_value": 80, - "value": "wall_transition_threshold * 8 / 9", - "minimum_value": "1", - "maximum_value": "99" - } - } - }, "wall_transition_length": { "label": "Wall Transition Length", @@ -1149,8 +1117,8 @@ }, "wall_transition_angle": { - "label": "Wall Transition Angle", - "description": "When transitioning between different numbers of walls as the part becomes thinner, two adjacent walls will join together at this angle. This can make the walls come together faster than what the Wall Transition Length indicates, filling the space better.", + "label": "Wall Transitioning Threshold Angle", + "description": "When to create transitions between even and odd numbers of walls. A wedge shape with an angle greater than this setting will not have transitions and no walls will be printed in the center to fill the remaining space. Reducing this setting reduces the number and length of these center walls, but may leave gaps or overextrude.", "type": "float", "unit": "°", "default_value": 10, @@ -1236,6 +1204,74 @@ "limit_to_extruder": "wall_0_extruder_nr", "settable_per_mesh": true }, + "min_wall_line_width": + { + "label": "Minimum Wall Line Width", + "description": "For thin structures around once or twice the nozzle size, the line widths need to be altered to adhere to the thickness of the model. This setting controls the minimum line width allowed for the walls. The minimum line widths inherently also determine the maximum line widths, since we transition from N to N+1 walls at some geometry thickness where the N walls are wide and the N+1 walls are narrow. The widest possible wall line is twice the Minimum Wall Line Width.", + "unit": "mm", + "minimum_value_warning": ".5 * max(wall_line_width_0, wall_line_width_x)", + "maximum_value_warning": "min(wall_line_width_0, wall_line_width_x)", + "minimum_value_warning_old": "(0.1 + 0.4 * machine_nozzle_size) if inset_direction == \"outside_in\" else 0.1 * machine_nozzle_size", + "maximum_value_warning_old": "2 * machine_nozzle_size", + "default_value": 0.3, + "value": "machine_nozzle_size * .75", + "type": "float", + "settable_per_mesh": true, + "children": + { + "min_even_wall_line_width": + { + "label": "Minimum Even Wall Line Width", + "description": "The minimum line width for normal polygonal walls. This setting determines at which model thickness we switch from printing a single thin wall line, to printing two wall lines. A higher Minimum Even Wall Line Width leads to a higher maximum odd wall line width. The maximum even wall line width is calculated as Outer Wall Line Width + 0.5 * Minimum Odd Wall Line Width.", + "unit": "mm", + "minimum_value_warning": ".5 * max(wall_line_width_0, wall_line_width_x)", + "maximum_value_warning": "min(wall_line_width_0, wall_line_width_x)", + "default_value": 0.3, + "value": "min_wall_line_width", + "type": "float", + "settable_per_mesh": true, + "children": + { + "wall_split_middle_threshold": { + "label": "Split Middle Line Threshold", + "description": "The smallest line width, as a factor of the normal line width, above which the middle line (if there is one) will be split into two. Reduce this setting to use more, thinner lines. Increase to use fewer, wider lines. Note that this applies -as if- the entire shape should be filled with wall, so the middle here refers to the middle of the object between two outer edges of the shape, even if there actually is fill or (other) skin in the print instead of wall.", + "type": "float", + "unit": "%", + "default_value": 50, + "value": "max(1, min(99, 100 * (2 * min_even_wall_line_width - wall_line_width_0) / wall_line_width_0))", + "value_explicit": "100 * (2 * min_even_wall_line_width - wall_line_width_0) / (wall_line_width_0 + wall_line_width_x - wall_line_width_0)", + "minimum_value": "1", + "maximum_value": "99" + } + } + }, + "min_odd_wall_line_width": + { + "label": "Minimum Odd Wall Line Width", + "description": "The minimum line width for middle line gap filler polyline walls. This setting determines at which model thickness we switch from printing two wall lines, to printing two outer walls and a single central wall in the middle. A higher Minimum Odd Wall Line Width leads to a higher maximum even wall line width. The maximum odd wall line width is calculated as 2 * Minimum Even Wall Line Width,", + "unit": "mm", + "minimum_value_warning": ".5 * max(wall_line_width_0, wall_line_width_x)", + "maximum_value_warning": "min(wall_line_width_0, wall_line_width_x)", + "default_value": 0.3, + "value": "min_wall_line_width", + "type": "float", + "settable_per_mesh": true, + "children": + { + "wall_add_middle_threshold": { + "label": "Add Middle Line Threshold", + "description": "The smallest line width, as a factor of the normal line width, above which a middle line (if there wasn't one already) will be added. Reduce this setting to use more, thinner lines. Increase to use fewer, wider lines. Note that this applies -as if- the entire shape should be filled with wall, so the middle here refers to the middle of the object between two outer edges of the shape, even if there actually is fill or (other) skin in the print instead of wall.", + "type": "float", + "unit": "%", + "default_value": 75, + "value": "max(1, min(99, 100 * min_odd_wall_line_width / wall_line_width_x))", + "minimum_value": "1", + "maximum_value": "99" + } + } + } + } + }, "fill_outline_gaps": { "label": "Print Thin Walls", "description": "Print pieces of the model which are horizontally thinner than the nozzle size.", @@ -1260,10 +1296,10 @@ }, "min_bead_width": { - "label": "Minimum Wall Line Width", + "label": "Minimum Thin Wall Line Width", "description": "Width of the wall that will replace thin features (according to the Minimum Feature Size) of the model. If the Minimum Wall Line Width is thinner than the thickness of the feature, the wall will become as thick as the feature itself.", "unit": "mm", - "value": "wall_line_width_0 * (100.0 + wall_split_middle_threshold)/200", + "value": "machine_nozzle_size * .75", "default_value": 0.2, "minimum_value": "0.001", "minimum_value_warning": "min_feature_size", @@ -4366,6 +4402,7 @@ "default_value": "0", "value": "support_extruder_nr", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", + "resolve": "max(extruderValues('support_interface_extruder_nr'))", "settable_per_mesh": false, "settable_per_extruder": false, "children": @@ -4378,6 +4415,7 @@ "default_value": "0", "value": "support_interface_extruder_nr", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", + "resolve": "max(extruderValues('support_roof_extruder_nr'))", "settable_per_mesh": false, "settable_per_extruder": false }, @@ -4389,6 +4427,7 @@ "default_value": "0", "value": "support_interface_extruder_nr", "enabled": "(support_enable or support_meshes_present) and extruders_enabled_count > 1", + "resolve": "max(extruderValues('support_bottom_extruder_nr'))", "settable_per_mesh": false, "settable_per_extruder": false } @@ -5421,6 +5460,7 @@ "default_value": "0", "value": "int(defaultExtruderPosition())", "enabled": "extruders_enabled_count > 1 and (resolveOrValue('adhesion_type') != 'none' or resolveOrValue('prime_tower_brim_enable'))", + "resolve": "max(extruderValues('adhesion_extruder_nr'))", "settable_per_mesh": false, "settable_per_extruder": false, "children": @@ -5444,6 +5484,7 @@ "default_value": "0", "value": "adhesion_extruder_nr", "enabled": "extruders_enabled_count > 1 and resolveOrValue('adhesion_type') == 'raft'", + "resolve": "max(extruderValues('raft_base_extruder_nr'))", "settable_per_mesh": false, "settable_per_extruder": false }, @@ -5455,6 +5496,7 @@ "default_value": "0", "value": "adhesion_extruder_nr", "enabled": "extruders_enabled_count > 1 and resolveOrValue('adhesion_type') == 'raft'", + "resolve": "max(extruderValues('raft_interface_extruder_nr'))", "settable_per_mesh": false, "settable_per_extruder": false }, @@ -5466,6 +5508,7 @@ "default_value": "0", "value": "adhesion_extruder_nr", "enabled": "extruders_enabled_count > 1 and resolveOrValue('adhesion_type') == 'raft'", + "resolve": "max(extruderValues('raft_surface_extruder_nr'))", "settable_per_mesh": false, "settable_per_extruder": false } @@ -6963,7 +7006,6 @@ "type": "bool", "default_value": false, "limit_to_extruder": "wall_0_extruder_nr", - "enabled": false, "settable_per_mesh": true }, "magic_fuzzy_skin_outside_only": @@ -6972,7 +7014,7 @@ "description": "Jitter only the parts' outlines and not the parts' holes.", "type": "bool", "default_value": false, - "enabled": "magic_fuzzy_skin_enabled and False" , + "enabled": "magic_fuzzy_skin_enabled", "limit_to_extruder": "wall_0_extruder_nr", "settable_per_mesh": true }, @@ -6985,7 +7027,7 @@ "default_value": 0.3, "minimum_value": "0.001", "maximum_value_warning": "wall_line_width_0", - "enabled": "magic_fuzzy_skin_enabled and False", + "enabled": "magic_fuzzy_skin_enabled", "limit_to_extruder": "wall_0_extruder_nr", "settable_per_mesh": true }, @@ -7000,7 +7042,7 @@ "minimum_value_warning": "0.1", "maximum_value_warning": "10", "maximum_value": "2 / magic_fuzzy_skin_thickness", - "enabled": "magic_fuzzy_skin_enabled and False", + "enabled": "magic_fuzzy_skin_enabled", "limit_to_extruder": "wall_0_extruder_nr", "settable_per_mesh": true, "children": @@ -7016,7 +7058,7 @@ "minimum_value_warning": "0.1", "maximum_value_warning": "10", "value": "10000 if magic_fuzzy_skin_point_density == 0 else 1 / magic_fuzzy_skin_point_density", - "enabled": "magic_fuzzy_skin_enabled and False", + "enabled": "magic_fuzzy_skin_enabled", "limit_to_extruder": "wall_0_extruder_nr", "settable_per_mesh": true } diff --git a/resources/definitions/snapmaker2.def.json b/resources/definitions/snapmaker2.def.json index 2c749d2b1b..9a26ea21a7 100644 --- a/resources/definitions/snapmaker2.def.json +++ b/resources/definitions/snapmaker2.def.json @@ -29,7 +29,7 @@ "default_value": "M104 S{material_print_temperature_layer_0} ;Set Hotend Temperature\nM140 S{material_bed_temperature_layer_0} ;Set Bed Temperature\nG28 ;home\nG90 ;absolute positioning\nG1 X-10 Y-10 F3000 ;Move to corner \nG1 Z0 F1800 ;Go to zero offset\nM109 S{material_print_temperature_layer_0} ;Wait for Hotend Temperature\nM190 S{material_bed_temperature_layer_0} ;Wait for Bed Temperature\nG92 E0 ;Zero set extruder position\nG1 E20 F200 ;Feed filament to clear nozzle\nG92 E0 ;Zero set extruder position" }, "machine_end_gcode": { - "default_value": "M104 S0 ;Extruder heater off\nM140 S0 ;Heated bed heater off\nG90 ;absolute positioning\nG92 E0 ;Retract the filament\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z{machine_width} E-1 F3000 ;move Z up a bit and retract filament even more\nG1 X0 F3000 ;move X to min endstops, so the head is out of the way\nG1 Y{machine_depth} F3000 ;so the head is out of the way and Plate is moved forward" + "default_value": "M104 S0 ;Extruder heater off\nM140 S0 ;Heated bed heater off\nG90 ;absolute positioning\nG92 E0 ;Retract the filament\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z{machine_height} E-1 F3000 ;move Z up a bit and retract filament even more\nG1 X0 F3000 ;move X to min endstops, so the head is out of the way\nG1 Y{machine_depth} F3000 ;so the head is out of the way and Plate is moved forward" }, "machine_nozzle_size": { "default_value": 0.4 diff --git a/resources/definitions/ultimaker.def.json b/resources/definitions/ultimaker.def.json index e8eae781d1..d062a043f3 100644 --- a/resources/definitions/ultimaker.def.json +++ b/resources/definitions/ultimaker.def.json @@ -47,6 +47,9 @@ "line_width": { "value": "machine_nozzle_size" }, + "wall_thickness": { + "value": "wall_line_width_0 + wall_line_width_x" + }, "infill_before_walls": { "value": "False" }, @@ -67,6 +70,9 @@ }, "bottom_layers": { "value": "math.ceil(round(bottom_thickness / resolveOrValue('layer_height'), 4))" + }, + "xy_offset": { + "value": "-layer_height * 0.2" } } } diff --git a/resources/definitions/ultimaker3.def.json b/resources/definitions/ultimaker3.def.json index 197bfa4513..48bb7b4362 100644 --- a/resources/definitions/ultimaker3.def.json +++ b/resources/definitions/ultimaker3.def.json @@ -166,7 +166,6 @@ "top_bottom_thickness": { "value": "1" }, "travel_avoid_distance": { "value": "3 if extruders_enabled_count > 1 else machine_nozzle_tip_outer_diameter / 2 * 1.5" }, "wall_0_inset": { "value": "0" }, - "wall_thickness": { "value": "1" }, "zig_zaggify_infill": { "value": "gradual_infill_steps == 0" } } } diff --git a/resources/definitions/ultimaker_s3.def.json b/resources/definitions/ultimaker_s3.def.json index 034a2d78d4..83feb98eb2 100644 --- a/resources/definitions/ultimaker_s3.def.json +++ b/resources/definitions/ultimaker_s3.def.json @@ -159,7 +159,6 @@ "travel_avoid_supports": { "value": "True" }, "travel_avoid_distance": { "value": "3 if extruders_enabled_count > 1 else machine_nozzle_tip_outer_diameter / 2 * 1.5" }, "wall_0_inset": { "value": "0" }, - "wall_thickness": { "value": "1" }, "meshfix_maximum_resolution": { "value": "(speed_wall_0 + speed_wall_x) / 60" }, "meshfix_maximum_deviation": { "value": "layer_height / 4" }, "initial_layer_line_width_factor": { "value": "120" }, diff --git a/resources/definitions/ultimaker_s5.def.json b/resources/definitions/ultimaker_s5.def.json index 36aa311c23..c4afee4e3a 100644 --- a/resources/definitions/ultimaker_s5.def.json +++ b/resources/definitions/ultimaker_s5.def.json @@ -161,7 +161,6 @@ "travel_avoid_supports": { "value": "True" }, "travel_avoid_distance": { "value": "3 if extruders_enabled_count > 1 else machine_nozzle_tip_outer_diameter / 2 * 1.5" }, "wall_0_inset": { "value": "0" }, - "wall_thickness": { "value": "1" }, "meshfix_maximum_resolution": { "value": "(speed_wall_0 + speed_wall_x) / 60" }, "meshfix_maximum_deviation": { "value": "layer_height / 4" }, "optimize_wall_printing_order": { "value": "True" }, diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Draft_Print_Quick.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Draft_Print_Quick.inst.cfg index 5028a193e1..3973958201 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Draft_Print_Quick.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Draft_Print_Quick.inst.cfg @@ -18,8 +18,7 @@ speed_wall = =speed_print speed_wall_0 = =speed_wall speed_wall_x = =speed_wall speed_layer_0 = 20 -top_bottom_thickness = =wall_thickness -wall_thickness = =line_width * 2 +top_bottom_thickness = 0.8 infill_sparse_density = 15 jerk_print = 30 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Fast_Print_Accurate.inst.cfg index 39d3455341..ce071c0e9f 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Fast_Print_Accurate.inst.cfg @@ -31,4 +31,3 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Fast_Visual.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Fast_Visual.inst.cfg index 03b3974996..4769a7b237 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Fast_Visual.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Fast_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_High_Visual.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_High_Visual.inst.cfg index 7d2fe3435c..349754543a 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_High_Visual.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_High_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Normal_Quality_Accurate.inst.cfg index 0d2b0df40b..962c23ba33 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Normal_Quality_Accurate.inst.cfg @@ -31,4 +31,3 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Normal_Visual.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Normal_Visual.inst.cfg index 12c05d6a9a..56add13d10 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Normal_Visual.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_ABS_Normal_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_CPEP_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_CPEP_Fast_Print_Accurate.inst.cfg index 36bd136f11..78221f4c28 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_CPEP_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_CPEP_Fast_Print_Accurate.inst.cfg @@ -1,35 +1,34 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s3
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = fast
-material = generic_cpe_plus
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s3 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = fast +material = generic_cpe_plus +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 + diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_CPEP_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_CPEP_Normal_Quality_Accurate.inst.cfg index 92b83b0daa..ae44cf40a5 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_CPEP_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_CPEP_Normal_Quality_Accurate.inst.cfg @@ -1,35 +1,34 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s3
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = normal
-material = generic_cpe_plus
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s3 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = normal +material = generic_cpe_plus +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 + diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_CPE_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_CPE_Fast_Print_Accurate.inst.cfg index 0dd1d9e6cb..19dbd9c52e 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_CPE_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_CPE_Fast_Print_Accurate.inst.cfg @@ -1,35 +1,34 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s3
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = fast
-material = generic_cpe
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s3 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = fast +material = generic_cpe +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 + diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_CPE_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_CPE_Normal_Quality_Accurate.inst.cfg index adf9744b20..545c776b08 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_CPE_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_CPE_Normal_Quality_Accurate.inst.cfg @@ -1,35 +1,34 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s3
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = normal
-material = generic_cpe
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s3 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = normal +material = generic_cpe +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 + diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_Nylon_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_Nylon_Fast_Print_Accurate.inst.cfg index 3b56baa68b..053b3b710a 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_Nylon_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_Nylon_Fast_Print_Accurate.inst.cfg @@ -1,35 +1,34 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s3
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = fast
-material = generic_nylon
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s3 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = fast +material = generic_nylon +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 + diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_Nylon_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_Nylon_Normal_Quality_Accurate.inst.cfg index 8a453f1423..3807904e2e 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_Nylon_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_Nylon_Normal_Quality_Accurate.inst.cfg @@ -1,35 +1,34 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s3
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = normal
-material = generic_nylon
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s3 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = normal +material = generic_nylon +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 + diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PC_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PC_Fast_Print_Accurate.inst.cfg index be3b0e768f..563753fdf3 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PC_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PC_Fast_Print_Accurate.inst.cfg @@ -1,35 +1,34 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s3
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = fast
-material = generic_pc
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s3 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = fast +material = generic_pc +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 + diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PC_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PC_Normal_Quality_Accurate.inst.cfg index 2088491e1e..702b9b5eec 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PC_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PC_Normal_Quality_Accurate.inst.cfg @@ -1,35 +1,34 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s3
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = normal
-material = generic_pc
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s3 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = normal +material = generic_pc +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 + diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PETG_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PETG_Fast_Print_Accurate.inst.cfg index 9396ad1ab1..313a77d86f 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PETG_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PETG_Fast_Print_Accurate.inst.cfg @@ -1,35 +1,34 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s3
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = fast
-material = generic_petg
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s3 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = fast +material = generic_petg +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 + diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PETG_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PETG_Normal_Quality_Accurate.inst.cfg index a8f85b6da3..7dde3d14c2 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PETG_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PETG_Normal_Quality_Accurate.inst.cfg @@ -1,35 +1,34 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s3
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = normal
-material = generic_petg
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s3 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = normal +material = generic_petg +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 + diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Draft_Print_Quick.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Draft_Print_Quick.inst.cfg index 5d869888c5..fc15076461 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Draft_Print_Quick.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Draft_Print_Quick.inst.cfg @@ -18,8 +18,7 @@ speed_wall = =speed_print speed_wall_0 = =speed_wall speed_wall_x = =speed_wall speed_layer_0 = 20 -top_bottom_thickness = =wall_thickness -wall_thickness = =line_width * 2 +top_bottom_thickness = 0.8 infill_sparse_density = 15 jerk_print = 30 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Print_Accurate.inst.cfg index 406b45f226..9cdee1381f 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Print_Accurate.inst.cfg @@ -31,4 +31,3 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Visual.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Visual.inst.cfg index 7b455965b6..22b9c8c868 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Visual.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_High_Visual.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_High_Visual.inst.cfg index 20eef0666e..0d2a6e78dc 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_High_Visual.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_High_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Quality_Accurate.inst.cfg index 3edfa90da5..358d5c517c 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Quality_Accurate.inst.cfg @@ -31,4 +31,3 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Visual.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Visual.inst.cfg index 7826c9b0b2..7abc1e166d 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Visual.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_VeryDraft_Print_Quick.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_VeryDraft_Print_Quick.inst.cfg index fdaf5f32ed..5150a762e3 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_VeryDraft_Print_Quick.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_PLA_VeryDraft_Print_Quick.inst.cfg @@ -35,5 +35,4 @@ speed_wall_0 = =speed_wall speed_wall_x = =speed_wall speed_layer_0 = 20 -wall_thickness = =line_width * 2 -top_bottom_thickness = =wall_thickness
\ No newline at end of file +top_bottom_thickness = 0.8
\ No newline at end of file diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Draft_Print_Quick.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Draft_Print_Quick.inst.cfg index 3dbb03b38c..c09de5cc0a 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Draft_Print_Quick.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Draft_Print_Quick.inst.cfg @@ -18,8 +18,7 @@ speed_wall = =speed_print speed_wall_0 = =speed_wall speed_wall_x = =speed_wall speed_layer_0 = 20 -top_bottom_thickness = =wall_thickness -wall_thickness = =line_width * 2 +top_bottom_thickness = 0.8 infill_sparse_density = 15 jerk_print = 30 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Print_Accurate.inst.cfg index 513e8b63d9..b27355a79e 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Print_Accurate.inst.cfg @@ -31,4 +31,3 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Visual.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Visual.inst.cfg index c80e665041..b8a8b26c25 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Visual.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_High_Visual.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_High_Visual.inst.cfg index 5a0fdccf3c..c3fa9d03a7 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_High_Visual.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_High_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Quality_Accurate.inst.cfg index 3d80753d3f..ffbd5785a0 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Quality_Accurate.inst.cfg @@ -31,4 +31,3 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Visual.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Visual.inst.cfg index 610fa16fcc..df474457eb 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Visual.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_VeryDraft_Print_Quick.inst.cfg b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_VeryDraft_Print_Quick.inst.cfg index 4ca187133e..865115e1da 100644 --- a/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_VeryDraft_Print_Quick.inst.cfg +++ b/resources/intent/ultimaker_s3/um_s3_aa0.4_TPLA_VeryDraft_Print_Quick.inst.cfg @@ -35,5 +35,4 @@ speed_wall_0 = =speed_wall speed_wall_x = =speed_wall speed_layer_0 = 20 -wall_thickness = =line_width * 2 -top_bottom_thickness = =wall_thickness
\ No newline at end of file +top_bottom_thickness = 0.8
\ No newline at end of file diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print_Quick.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print_Quick.inst.cfg index 374cb1bca4..a6d14f8548 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print_Quick.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print_Quick.inst.cfg @@ -18,8 +18,7 @@ speed_wall = =speed_print speed_wall_0 = =speed_wall speed_wall_x = =speed_wall speed_layer_0 = 20 -top_bottom_thickness = =wall_thickness -wall_thickness = =line_width * 2 +top_bottom_thickness = 0.8 infill_sparse_density = 15 jerk_print = 30 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Print_Accurate.inst.cfg index ab2e9bc6f6..39153f554f 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Print_Accurate.inst.cfg @@ -31,5 +31,4 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Visual.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Visual.inst.cfg index 45cba2271e..9df2b7d624 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Visual.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Fast_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_High_Visual.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_High_Visual.inst.cfg index 3658a72539..c49a030379 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_High_Visual.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_High_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Quality_Accurate.inst.cfg index a58642f073..8c6510d7d6 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Quality_Accurate.inst.cfg @@ -31,5 +31,4 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Visual.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Visual.inst.cfg index 9633a2d6e8..68f5c8e67c 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Visual.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_ABS_Normal_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_CPEP_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_CPEP_Fast_Print_Accurate.inst.cfg index 916b80c811..7d2f5ee686 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_CPEP_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_CPEP_Fast_Print_Accurate.inst.cfg @@ -1,36 +1,35 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s5
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = fast
-material = generic_cpe_plus
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s5 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = fast +material = generic_cpe_plus +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 +xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset + diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_CPEP_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_CPEP_Normal_Quality_Accurate.inst.cfg index a3d99c2ed0..141284e636 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_CPEP_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_CPEP_Normal_Quality_Accurate.inst.cfg @@ -1,36 +1,35 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s5
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = normal
-material = generic_cpe_plus
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s5 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = normal +material = generic_cpe_plus +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 +xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset + diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print_Accurate.inst.cfg index d9929fc35c..fceeafdeb7 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_CPE_Fast_Print_Accurate.inst.cfg @@ -1,36 +1,35 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s5
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = fast
-material = generic_cpe
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s5 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = fast +material = generic_cpe +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 +xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset + diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality_Accurate.inst.cfg index 45df698f7e..d98a914046 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_CPE_Normal_Quality_Accurate.inst.cfg @@ -1,36 +1,35 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s5
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = normal
-material = generic_cpe
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s5 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = normal +material = generic_cpe +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 +xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset + diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_Nylon_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_Nylon_Fast_Print_Accurate.inst.cfg index fcd58dd33e..479af8f737 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_Nylon_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_Nylon_Fast_Print_Accurate.inst.cfg @@ -1,36 +1,35 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s5
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = fast
-material = generic_nylon
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s5 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = fast +material = generic_nylon +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 +xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset + diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_Nylon_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_Nylon_Normal_Quality_Accurate.inst.cfg index cadc30da58..96231ce051 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_Nylon_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_Nylon_Normal_Quality_Accurate.inst.cfg @@ -1,36 +1,35 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s5
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = normal
-material = generic_nylon
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s5 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = normal +material = generic_nylon +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 +xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset + diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PC_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PC_Fast_Print_Accurate.inst.cfg index d23ff28b91..ab630874d5 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PC_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PC_Fast_Print_Accurate.inst.cfg @@ -1,36 +1,35 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s5
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = fast
-material = generic_pc
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s5 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = fast +material = generic_pc +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 +xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset + diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PC_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PC_Normal_Quality_Accurate.inst.cfg index 950f420016..e6644926dd 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PC_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PC_Normal_Quality_Accurate.inst.cfg @@ -1,36 +1,35 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s5
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = normal
-material = generic_pc
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s5 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = normal +material = generic_pc +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 +xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset + diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PETG_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PETG_Fast_Print_Accurate.inst.cfg index fba5e369ee..b659129a76 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PETG_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PETG_Fast_Print_Accurate.inst.cfg @@ -1,36 +1,35 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s5
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = fast
-material = generic_petg
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s5 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = fast +material = generic_petg +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 +xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset + diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PETG_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PETG_Normal_Quality_Accurate.inst.cfg index 29d052675d..8022784344 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PETG_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PETG_Normal_Quality_Accurate.inst.cfg @@ -1,36 +1,35 @@ -[general]
-version = 4
-name = Accurate
-definition = ultimaker_s5
-
-[metadata]
-setting_version = 19
-type = intent
-intent_category = engineering
-quality_type = normal
-material = generic_petg
-variant = AA 0.4
-
-[values]
-
-jerk_print = 30
-jerk_infill = =jerk_print
-jerk_topbottom = =jerk_print
-jerk_wall = =jerk_print
-jerk_wall_0 = =jerk_wall
-jerk_wall_x = =jerk_wall
-jerk_layer_0 = 5
-
-speed_print = 30
-speed_infill = =speed_print
-speed_layer_0 = 20
-speed_topbottom = =speed_print
-speed_wall = =speed_print
-speed_wall_0 = =speed_wall
-speed_wall_x = =speed_wall
-top_bottom_thickness = =wall_thickness
-
-wall_thickness = =line_width * 3
-xy_offset = =-layer_height * 0.2
-xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
-
+[general] +version = 4 +name = Accurate +definition = ultimaker_s5 + +[metadata] +setting_version = 19 +type = intent +intent_category = engineering +quality_type = normal +material = generic_petg +variant = AA 0.4 + +[values] + +jerk_print = 30 +jerk_infill = =jerk_print +jerk_topbottom = =jerk_print +jerk_wall = =jerk_print +jerk_wall_0 = =jerk_wall +jerk_wall_x = =jerk_wall +jerk_layer_0 = 5 + +speed_print = 30 +speed_infill = =speed_print +speed_layer_0 = 20 +speed_topbottom = =speed_print +speed_wall = =speed_print +speed_wall_0 = =speed_wall +speed_wall_x = =speed_wall +top_bottom_thickness = =wall_thickness + +wall_thickness = =line_width * 3 +xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset + diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Draft_Print_Quick.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Draft_Print_Quick.inst.cfg index 25dcb1a793..c26054525f 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Draft_Print_Quick.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Draft_Print_Quick.inst.cfg @@ -18,8 +18,7 @@ speed_wall = =speed_print speed_wall_0 = =speed_wall speed_wall_x = =speed_wall speed_layer_0 = 20 -top_bottom_thickness = =wall_thickness -wall_thickness = =line_width * 2 +top_bottom_thickness = 0.8 infill_sparse_density = 15 jerk_print = 30 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Print_Accurate.inst.cfg index cc76a5706a..030a3699f1 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Print_Accurate.inst.cfg @@ -31,5 +31,4 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Visual.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Visual.inst.cfg index ff6adc5257..650f61bc63 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Visual.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_High_Visual.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_High_Visual.inst.cfg index 09c67fb20e..c817103b3c 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_High_Visual.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_High_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Quality_Accurate.inst.cfg index 28353777bf..7737eff565 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Quality_Accurate.inst.cfg @@ -31,5 +31,4 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Visual.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Visual.inst.cfg index 8934e3fd80..3b355b7da9 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Visual.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_VeryDraft_Print_Quick.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_VeryDraft_Print_Quick.inst.cfg index a3f5b02ec2..a7b56a55ae 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_VeryDraft_Print_Quick.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_PLA_VeryDraft_Print_Quick.inst.cfg @@ -35,5 +35,4 @@ speed_wall_0 = =speed_wall speed_wall_x = =speed_wall speed_layer_0 = 20 -wall_thickness = =line_width * 2 -top_bottom_thickness = =wall_thickness
\ No newline at end of file +top_bottom_thickness = 0.8
\ No newline at end of file diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Draft_Print_Quick.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Draft_Print_Quick.inst.cfg index a811b9d673..13c8672be2 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Draft_Print_Quick.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Draft_Print_Quick.inst.cfg @@ -18,8 +18,7 @@ speed_wall = =speed_print speed_wall_0 = =speed_wall speed_wall_x = =speed_wall speed_layer_0 = 20 -top_bottom_thickness = =wall_thickness -wall_thickness = =line_width * 2 +top_bottom_thickness = 0.8 infill_sparse_density = 15 jerk_print = 30 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Print_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Print_Accurate.inst.cfg index 5db4117aa1..dbdbc9b1c7 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Print_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Print_Accurate.inst.cfg @@ -31,5 +31,4 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Visual.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Visual.inst.cfg index 39292b0306..2c21b84c70 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Visual.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_High_Visual.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_High_Visual.inst.cfg index 53eb8d16fd..4efb4834fb 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_High_Visual.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_High_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Quality_Accurate.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Quality_Accurate.inst.cfg index 22485e8777..287917f2b5 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Quality_Accurate.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Quality_Accurate.inst.cfg @@ -31,5 +31,4 @@ speed_wall_x = =speed_wall top_bottom_thickness = =wall_thickness wall_thickness = =line_width * 3 -xy_offset = =-layer_height * 0.2 xy_offset_layer_0 = =((-0.2 + layer_height * 0.2) if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Visual.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Visual.inst.cfg index 155f6177cc..a964da4111 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Visual.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Visual.inst.cfg @@ -13,5 +13,4 @@ variant = AA 0.4 [values] speed_infill = 50 -wall_thickness = =wall_line_width * 3 -top_bottom_thickness = =wall_thickness +top_bottom_thickness = 1.05 diff --git a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_VeryDraft_Print_Quick.inst.cfg b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_VeryDraft_Print_Quick.inst.cfg index 5d22b722af..dec43bd73e 100644 --- a/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_VeryDraft_Print_Quick.inst.cfg +++ b/resources/intent/ultimaker_s5/um_s5_aa0.4_TPLA_VeryDraft_Print_Quick.inst.cfg @@ -35,5 +35,4 @@ speed_wall_0 = =speed_wall speed_wall_x = =speed_wall speed_layer_0 = 20 -wall_thickness = =line_width * 2 -top_bottom_thickness = =wall_thickness
\ No newline at end of file +top_bottom_thickness = 0.8
\ No newline at end of file diff --git a/resources/qml/Account/AccountWidget.qml b/resources/qml/Account/AccountWidget.qml index b058ead22f..d738c5c474 100644 --- a/resources/qml/Account/AccountWidget.qml +++ b/resources/qml/Account/AccountWidget.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.4 as UM +import UM 1.5 as UM import Cura 1.1 as Cura Item @@ -46,15 +46,12 @@ Item } } - contentItem: Label + contentItem: UM.Label { id: label text: signInButton.text - font: UM.Theme.getFont("default") color: UM.Theme.getColor("primary_text") width: contentWidth - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering } } @@ -113,7 +110,7 @@ Item } } - Label + UM.Label { id: initialLabel anchors.verticalCenter: parent.verticalCenter @@ -121,9 +118,7 @@ Item text: accountWidget.text font: UM.Theme.getFont("large_bold") color: UM.Theme.getColor("primary_text") - verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter - renderType: Text.NativeRendering } } diff --git a/resources/qml/Account/GeneralOperations.qml b/resources/qml/Account/GeneralOperations.qml index 08a621d521..da62124f3f 100644 --- a/resources/qml/Account/GeneralOperations.qml +++ b/resources/qml/Account/GeneralOperations.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.4 as UM +import UM 1.5 as UM import Cura 1.1 as Cura Column @@ -12,14 +12,12 @@ Column spacing: UM.Theme.getSize("default_margin").width padding: UM.Theme.getSize("default_margin").width - Label + UM.Label { id: title anchors.horizontalCenter: parent.horizontalCenter - renderType: Text.NativeRendering - text: catalog.i18nc("@label", "Sign in to the Ultimaker platform") + text: catalog.i18nc("@label", "Sign in to the Ultimaker platform") font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") } Image @@ -33,16 +31,14 @@ Column verticalAlignment: Image.AlignVCenter } - Label + UM.Label { id: generalInformationPoints anchors.horizontalCenter: parent.horizontalCenter horizontalAlignment: Text.AlignLeft - renderType: Text.NativeRendering text: catalog.i18nc("@text", "- Add material profiles and plug-ins from the Marketplace\n- Back-up and sync your material profiles and plug-ins\n- Share ideas and get help from 48,000+ users in the Ultimaker community") lineHeight: 1.4 - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") + wrapMode: Text.NoWrap } Cura.PrimaryButton diff --git a/resources/qml/Account/SyncState.qml b/resources/qml/Account/SyncState.qml index d5a9d392e2..e5731ff9d7 100644 --- a/resources/qml/Account/SyncState.qml +++ b/resources/qml/Account/SyncState.qml @@ -1,7 +1,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.4 as UM +import UM 1.5 as UM import Cura 1.1 as Cura Row // Sync state icon + message @@ -77,28 +77,26 @@ Row // Sync state icon + message width: childrenRect.width height: childrenRect.height - Label + UM.Label { id: stateLabel // text is determined by State - color: UM.Theme.getColor("text") font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering - width: contentWidth + UM.Theme.getSize("default_margin").height + anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("default_margin").width + wrapMode: Text.NoWrap height: contentHeight - verticalAlignment: Text.AlignVCenter visible: !Cura.API.account.manualSyncEnabled && !Cura.API.account.updatePackagesEnabled } - Label + UM.Label { id: updatePackagesButton text: catalog.i18nc("@button", "Install pending updates") color: UM.Theme.getColor("text_link") font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter height: contentHeight + wrapMode: Text.NoWrap width: contentWidth + UM.Theme.getSize("default_margin").height visible: Cura.API.account.updatePackagesEnabled @@ -112,14 +110,13 @@ Row // Sync state icon + message } } - Label + UM.Label { id: accountSyncButton text: catalog.i18nc("@button", "Check for account updates") color: UM.Theme.getColor("text_link") font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter + wrapMode: Text.NoWrap height: contentHeight width: contentWidth + UM.Theme.getSize("default_margin").height visible: Cura.API.account.manualSyncEnabled diff --git a/resources/qml/Account/UserOperations.qml b/resources/qml/Account/UserOperations.qml index 75a81737f2..be858df993 100644 --- a/resources/qml/Account/UserOperations.qml +++ b/resources/qml/Account/UserOperations.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.4 as UM +import UM 1.5 as UM import Cura 1.1 as Cura Column @@ -41,16 +41,13 @@ Column anchors.verticalCenter: parent.verticalCenter color: UM.Theme.getColor("action_button_disabled") visible: !avatar.hasAvatar - Label + UM.Label { id: initialLabel anchors.centerIn: parent text: profile["username"].charAt(0).toUpperCase() font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") - verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter - renderType: Text.NativeRendering } } @@ -62,25 +59,22 @@ Column spacing: UM.Theme.getSize("narrow_margin").height width: childrenRect.width height: childrenRect.height - Label + + UM.Label { id: username - renderType: Text.NativeRendering text: profile.username font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") } SyncState { id: syncRow } - Label + UM.Label { id: lastSyncLabel - renderType: Text.NativeRendering text: catalog.i18nc("@label The argument is a timestamp", "Last update: %1").arg(Cura.API.account.lastSyncDateTime) - font: UM.Theme.getFont("default") color: UM.Theme.getColor("text_medium") } } diff --git a/resources/qml/ActionButton.qml b/resources/qml/ActionButton.qml index 1c231e5ef3..5cec567ae4 100644 --- a/resources/qml/ActionButton.qml +++ b/resources/qml/ActionButton.qml @@ -5,7 +5,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.1 import QtGraphicalEffects 1.0 // For the dropshadow -import UM 1.1 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -128,18 +128,16 @@ Button elideWidth: buttonText.width } - Label + UM.Label { id: buttonText text: button.text color: button.enabled ? (button.hovered ? button.textHoverColor : button.textColor): button.textDisabledColor font: UM.Theme.getFont("medium") visible: text != "" - renderType: Text.NativeRendering height: parent.height anchors.verticalCenter: parent.verticalCenter horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter elide: Text.ElideRight Binding @@ -181,7 +179,7 @@ Button cornerSide: Cura.RoundedRectangle.Direction.None } - Cura.ToolTip + UM.ToolTip { id: tooltip visible: diff --git a/resources/qml/ActionPanel/OutputProcessWidget.qml b/resources/qml/ActionPanel/OutputProcessWidget.qml index 6e412c9a04..1303dc20a2 100644 --- a/resources/qml/ActionPanel/OutputProcessWidget.qml +++ b/resources/qml/ActionPanel/OutputProcessWidget.qml @@ -5,7 +5,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.1 import QtQuick.Layouts 1.3 -import UM 1.1 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -128,7 +128,7 @@ Column tooltip: text fixedWidthMode: true - toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignLeft + toolTipContentAlignment: UM.Enums.ContentAlignment.AlignLeft onClicked: UM.Controller.setActiveStage("PreviewStage") } diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml index 99d78537c3..868f23d242 100644 --- a/resources/qml/ActionPanel/SliceProcessWidget.qml +++ b/resources/qml/ActionPanel/SliceProcessWidget.qml @@ -1,10 +1,9 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 2.1 +import QtQuick.Controls 2.4 import QtQuick.Layouts 1.3 -import QtQuick.Controls 1.4 as Controls1 import UM 1.4 as UM import Cura 1.0 as Cura @@ -122,7 +121,9 @@ Column tooltip: catalog.i18nc("@label", "Start the slicing process") enabled: widget.backendState != UM.Backend.Error && !widget.waitingForSliceToStart visible: widget.backendState == UM.Backend.NotStarted || widget.backendState == UM.Backend.Error - onClicked: sliceOrStopSlicing() + onClicked: { + sliceOrStopSlicing() + } } Cura.SecondaryButton @@ -136,7 +137,9 @@ Column text: catalog.i18nc("@button", "Cancel") enabled: sliceButton.enabled visible: !sliceButton.visible - onClicked: sliceOrStopSlicing() + onClicked: { + sliceOrStopSlicing() + } } } @@ -165,7 +168,7 @@ Column } // Shortcut for "slice/stop" - Controls1.Action + Action { shortcut: "Ctrl+P" onTriggered: diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index e3f3947bfe..90d1d549e2 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -4,75 +4,73 @@ pragma Singleton import QtQuick 2.10 -import QtQuick.Controls 1.1 -import QtQuick.Controls 2.3 as Controls2 +import QtQuick.Controls 2.4 import UM 1.1 as UM import Cura 1.0 as Cura Item { - property alias newProject: newProjectAction; - property alias open: openAction; - property alias quit: quitAction; - - property alias undo: undoAction; - property alias redo: redoAction; - - property alias view3DCamera: view3DCameraAction; - property alias viewFrontCamera: viewFrontCameraAction; - property alias viewTopCamera: viewTopCameraAction; - property alias viewBottomCamera: viewBottomCameraAction; - property alias viewLeftSideCamera: viewLeftSideCameraAction; - property alias viewRightSideCamera: viewRightSideCameraAction; - - property alias deleteSelection: deleteSelectionAction; - property alias centerSelection: centerSelectionAction; - property alias multiplySelection: multiplySelectionAction; - - property alias deleteObject: deleteObjectAction; - property alias centerObject: centerObjectAction; - property alias groupObjects: groupObjectsAction; - property alias unGroupObjects:unGroupObjectsAction; - property alias mergeObjects: mergeObjectsAction; - //property alias unMergeObjects: unMergeObjectsAction; - - property alias multiplyObject: multiplyObjectAction; - - property alias selectAll: selectAllAction; - property alias deleteAll: deleteAllAction; - property alias reloadAll: reloadAllAction; - property alias arrangeAllBuildPlates: arrangeAllBuildPlatesAction; - property alias arrangeAll: arrangeAllAction; - property alias arrangeSelection: arrangeSelectionAction; - property alias resetAllTranslation: resetAllTranslationAction; - property alias resetAll: resetAllAction; - - property alias addMachine: addMachineAction; - property alias configureMachines: settingsAction; - property alias addProfile: addProfileAction; - property alias updateProfile: updateProfileAction; - property alias resetProfile: resetProfileAction; - property alias manageProfiles: manageProfilesAction; - - property alias manageMaterials: manageMaterialsAction; - property alias marketplaceMaterials: marketplaceMaterialsAction; - - property alias preferences: preferencesAction; - - property alias showProfileFolder: showProfileFolderAction; - property alias documentation: documentationAction; + property alias newProject: newProjectAction + property alias open: openAction + property alias quit: quitAction + + property alias undo: undoAction + property alias redo: redoAction + + property alias view3DCamera: view3DCameraAction + property alias viewFrontCamera: viewFrontCameraAction + property alias viewTopCamera: viewTopCameraAction + property alias viewBottomCamera: viewBottomCameraAction + property alias viewLeftSideCamera: viewLeftSideCameraAction + property alias viewRightSideCamera: viewRightSideCameraAction + + property alias deleteSelection: deleteSelectionAction + property alias centerSelection: centerSelectionAction + property alias multiplySelection: multiplySelectionAction + + property alias deleteObject: deleteObjectAction + property alias centerObject: centerObjectAction + property alias groupObjects: groupObjectsAction + property alias unGroupObjects:unGroupObjectsAction + property alias mergeObjects: mergeObjectsAction + //property alias unMergeObjects: unMergeObjectsAction + + property alias multiplyObject: multiplyObjectAction + + property alias selectAll: selectAllAction + property alias deleteAll: deleteAllAction + property alias reloadAll: reloadAllAction + property alias arrangeAllBuildPlates: arrangeAllBuildPlatesAction + property alias arrangeAll: arrangeAllAction + property alias arrangeSelection: arrangeSelectionAction + property alias resetAllTranslation: resetAllTranslationAction + property alias resetAll: resetAllAction + + property alias addMachine: addMachineAction + property alias configureMachines: settingsAction + property alias addProfile: addProfileAction + property alias updateProfile: updateProfileAction + property alias resetProfile: resetProfileAction + property alias manageProfiles: manageProfilesAction + + property alias manageMaterials: manageMaterialsAction + property alias marketplaceMaterials: marketplaceMaterialsAction + + property alias preferences: preferencesAction + + property alias showProfileFolder: showProfileFolderAction + property alias documentation: documentationAction property alias showTroubleshooting: showTroubleShootingAction - property alias reportBug: reportBugAction; + property alias reportBug: reportBugAction property alias whatsNew: whatsNewAction - property alias about: aboutAction; + property alias about: aboutAction - property alias toggleFullScreen: toggleFullScreenAction; + property alias toggleFullScreen: toggleFullScreenAction property alias exitFullScreen: exitFullScreenAction property alias configureSettingVisibility: configureSettingVisibilityAction property alias browsePackages: browsePackagesAction - property alias openMarketplace: openMarketplaceAction UM.I18nCatalog{id: catalog; name: "cura"} @@ -81,7 +79,7 @@ Item { id: showTroubleShootingAction onTriggered: Qt.openUrlExternally("https://ultimaker.com/en/troubleshooting?utm_source=cura&utm_medium=software&utm_campaign=dropdown-troubleshooting") - text: catalog.i18nc("@action:inmenu", "Show Online Troubleshooting Guide"); + text: catalog.i18nc("@action:inmenu", "Show Online Troubleshooting") } Action @@ -89,7 +87,7 @@ Item id: toggleFullScreenAction shortcut: StandardKey.FullScreen text: catalog.i18nc("@action:inmenu", "Toggle Full Screen") - iconName: "view-fullscreen" + icon.name: "view-fullscreen" } Action @@ -97,27 +95,27 @@ Item id: exitFullScreenAction shortcut: StandardKey.Cancel text: catalog.i18nc("@action:inmenu", "Exit Full Screen") - iconName: "view-fullscreen" + icon.name: "view-fullscreen" } Action { - id: undoAction; - text: catalog.i18nc("@action:inmenu menubar:edit", "&Undo"); - iconName: "edit-undo"; - shortcut: StandardKey.Undo; - onTriggered: UM.OperationStack.undo(); - enabled: UM.OperationStack.canUndo; + id: undoAction + text: catalog.i18nc("@action:inmenu menubar:edit", "&Undo") + icon.name: "edit-undo" + shortcut: StandardKey.Undo + onTriggered: UM.OperationStack.undo() + enabled: UM.OperationStack.canUndo } Action { - id: redoAction; - text: catalog.i18nc("@action:inmenu menubar:edit", "&Redo"); - iconName: "edit-redo"; - shortcut: StandardKey.Redo; - onTriggered: UM.OperationStack.redo(); - enabled: UM.OperationStack.canRedo; + id: redoAction + text: catalog.i18nc("@action:inmenu menubar:edit", "&Redo") + icon.name: "edit-redo" + shortcut: StandardKey.Redo + onTriggered: UM.OperationStack.redo() + enabled: UM.OperationStack.canRedo } Action @@ -132,7 +130,7 @@ Item //- https://doc.qt.io/qt-5/macos-issues.html#menu-bar //- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar text: (Qt.platform.os == "osx") ? "&Quit" : catalog.i18nc("@action:inmenu menubar:file", "&Quit") - iconName: "application-exit" + icon.name: "application-exit" shortcut: StandardKey.Quit } @@ -189,7 +187,7 @@ Item //- https://doc.qt.io/qt-5/macos-issues.html#menu-bar //- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar text: (Qt.platform.os == "osx") ? "Configure Cura..." : catalog.i18nc("@action:inmenu", "Configure Cura...") - iconName: "configure" + icon.name: "configure" } Action @@ -202,14 +200,14 @@ Item { id: settingsAction text: catalog.i18nc("@action:inmenu menubar:printer", "Manage Pr&inters...") - iconName: "configure" + icon.name: "configure" } Action { id: manageMaterialsAction text: catalog.i18nc("@action:inmenu", "Manage Materials...") - iconName: "configure" + icon.name: "configure" shortcut: "Ctrl+K" } @@ -221,64 +219,64 @@ Item Action { - id: updateProfileAction; + id: updateProfileAction enabled: !Cura.MachineManager.stacksHaveErrors && Cura.MachineManager.hasUserSettings && Cura.MachineManager.activeQualityChangesGroup != null text: catalog.i18nc("@action:inmenu menubar:profile", "&Update profile with current settings/overrides"); - onTriggered: Cura.ContainerManager.updateQualityChanges(); + onTriggered: Cura.ContainerManager.updateQualityChanges() } Action { - id: resetProfileAction; + id: resetProfileAction enabled: Cura.MachineManager.hasUserSettings - text: catalog.i18nc("@action:inmenu menubar:profile", "&Discard current changes"); + text: catalog.i18nc("@action:inmenu menubar:profile", "&Discard current changes") onTriggered: { - forceActiveFocus(); - Cura.ContainerManager.clearUserContainers(); + forceActiveFocus() + Cura.ContainerManager.clearUserContainers() } } Action { - id: addProfileAction; + id: addProfileAction enabled: !Cura.MachineManager.stacksHaveErrors && Cura.MachineManager.hasUserSettings - text: catalog.i18nc("@action:inmenu menubar:profile", "&Create profile from current settings/overrides..."); + text: catalog.i18nc("@action:inmenu menubar:profile", "&Create profile from current settings/overrides...") } Action { id: manageProfilesAction text: catalog.i18nc("@action:inmenu menubar:profile", "Manage Profiles...") - iconName: "configure" + icon.name: "configure" shortcut: "Ctrl+J" } Action { - id: documentationAction; - text: catalog.i18nc("@action:inmenu menubar:help", "Show Online &Documentation"); - iconName: "help-contents"; - shortcut: StandardKey.Help; - onTriggered: CuraActions.openDocumentation(); + id: documentationAction + text: catalog.i18nc("@action:inmenu menubar:help", "Show Online &Documentation") + icon.name: "help-contents" + shortcut: StandardKey.Help + onTriggered: CuraActions.openDocumentation() } Action { - id: reportBugAction; - text: catalog.i18nc("@action:inmenu menubar:help", "Report a &Bug"); - iconName: "tools-report-bug"; - onTriggered: CuraActions.openBugReportPage(); + id: reportBugAction + text: catalog.i18nc("@action:inmenu menubar:help", "Report a &Bug") + icon.name: "tools-report-bug" + onTriggered: CuraActions.openBugReportPage() } Action { - id: whatsNewAction; - text: catalog.i18nc("@action:inmenu menubar:help", "What's New"); + id: whatsNewAction + text: catalog.i18nc("@action:inmenu menubar:help", "What's New") } Action { - id: aboutAction; + id: aboutAction //On MacOS, don't translate the "About" word. //Qt moves the "about" entry to a different place, and if it got renamed can't find it again when it @@ -287,60 +285,60 @@ Item //For more information, see: //- https://doc.qt.io/qt-5/macos-issues.html#menu-bar //- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar - text: (Qt.platform.os == "osx") ? "About..." : catalog.i18nc("@action:inmenu menubar:help", "About..."); - iconName: "help-about"; + text: (Qt.platform.os == "osx") ? "About..." : catalog.i18nc("@action:inmenu menubar:help", "About...") + icon.name: "help-about" } Action { - id: deleteSelectionAction; - text: catalog.i18nc("@action:inmenu menubar:edit", "Delete Selected"); - enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection; - iconName: "edit-delete"; + id: deleteSelectionAction + text: catalog.i18nc("@action:inmenu menubar:edit", "Delete Selected") + enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection + icon.name: "edit-delete" shortcut: StandardKey.Delete | "Backspace" - onTriggered: CuraActions.deleteSelection(); + onTriggered: CuraActions.deleteSelection() } Action { - id: centerSelectionAction; - text: catalog.i18nc("@action:inmenu menubar:edit", "Center Selected"); - enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection; - iconName: "align-vertical-center"; - onTriggered: CuraActions.centerSelection(); + id: centerSelectionAction + text: catalog.i18nc("@action:inmenu menubar:edit", "Center Selected") + enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection + icon.name: "align-vertical-center" + onTriggered: CuraActions.centerSelection() } Action { - id: multiplySelectionAction; - text: catalog.i18nc("@action:inmenu menubar:edit", "Multiply Selected"); - enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection; - iconName: "edit-duplicate"; + id: multiplySelectionAction + text: catalog.i18nc("@action:inmenu menubar:edit", "Multiply Selected") + enabled: UM.Controller.toolsEnabled && UM.Selection.hasSelection + icon.name: "edit-duplicate" shortcut: "Ctrl+M" } Action { - id: deleteObjectAction; - text: catalog.i18nc("@action:inmenu","Delete Model"); - enabled: UM.Controller.toolsEnabled; - iconName: "edit-delete"; + id: deleteObjectAction + text: catalog.i18nc("@action:inmenu","Delete Model") + enabled: UM.Controller.toolsEnabled + icon.name: "edit-delete" } Action { - id: centerObjectAction; - text: catalog.i18nc("@action:inmenu","Ce&nter Model on Platform"); + id: centerObjectAction + text: catalog.i18nc("@action:inmenu","Ce&nter Model on Platform") } Action { id: groupObjectsAction - text: catalog.i18nc("@action:inmenu menubar:edit","&Group Models"); + text: catalog.i18nc("@action:inmenu menubar:edit","&Group Models") enabled: UM.Selection.selectionCount > 1 ? true: false - iconName: "object-group" - shortcut: "Ctrl+G"; - onTriggered: CuraApplication.groupSelected(); + icon.name: "object-group" + shortcut: "Ctrl+G" + onTriggered: CuraApplication.groupSelected() } Action @@ -356,139 +354,132 @@ Item Action { id: unGroupObjectsAction - text: catalog.i18nc("@action:inmenu menubar:edit","Ungroup Models"); + text: catalog.i18nc("@action:inmenu menubar:edit","Ungroup Models") enabled: UM.Selection.isGroupSelected - iconName: "object-ungroup" - shortcut: "Ctrl+Shift+G"; - onTriggered: CuraApplication.ungroupSelected(); + icon.name: "object-ungroup" + shortcut: "Ctrl+Shift+G" + onTriggered: CuraApplication.ungroupSelected() } Action { id: mergeObjectsAction - text: catalog.i18nc("@action:inmenu menubar:edit","&Merge Models"); + text: catalog.i18nc("@action:inmenu menubar:edit","&Merge Models") enabled: UM.Selection.selectionCount > 1 ? true: false - iconName: "merge"; - shortcut: "Ctrl+Alt+G"; - onTriggered: CuraApplication.mergeSelected(); + icon.name: "merge" + shortcut: "Ctrl+Alt+G" + onTriggered: CuraApplication.mergeSelected() } Action { - id: multiplyObjectAction; - text: catalog.i18nc("@action:inmenu","&Multiply Model..."); - iconName: "edit-duplicate" + id: multiplyObjectAction + text: catalog.i18nc("@action:inmenu","&Multiply Model...") + icon.name: "edit-duplicate" } Action { - id: selectAllAction; - text: catalog.i18nc("@action:inmenu menubar:edit","Select All Models"); - enabled: UM.Controller.toolsEnabled; - iconName: "edit-select-all"; - shortcut: "Ctrl+A"; - onTriggered: CuraApplication.selectAll(); + id: selectAllAction + text: catalog.i18nc("@action:inmenu menubar:edit","Select All Models") + enabled: UM.Controller.toolsEnabled + icon.name: "edit-select-all" + shortcut: "Ctrl+A" + onTriggered: CuraApplication.selectAll() } Action { - id: deleteAllAction; - text: catalog.i18nc("@action:inmenu menubar:edit","Clear Build Plate"); - enabled: UM.Controller.toolsEnabled; - iconName: "edit-delete"; - shortcut: "Ctrl+D"; - onTriggered: CuraApplication.deleteAll(); + id: deleteAllAction + text: catalog.i18nc("@action:inmenu menubar:edit","Clear Build Plate") + enabled: UM.Controller.toolsEnabled + icon.name: "edit-delete" + shortcut: "Ctrl+D" + onTriggered: CuraApplication.deleteAll() } Action { - id: reloadAllAction; - text: catalog.i18nc("@action:inmenu menubar:file","Reload All Models"); - iconName: "document-revert"; + id: reloadAllAction + text: catalog.i18nc("@action:inmenu menubar:file","Reload All Models") + icon.name: "document-revert" shortcut: "F5" - onTriggered: CuraApplication.reloadAll(); + onTriggered: CuraApplication.reloadAll() } Action { - id: arrangeAllBuildPlatesAction; - text: catalog.i18nc("@action:inmenu menubar:edit","Arrange All Models To All Build Plates"); - onTriggered: Printer.arrangeObjectsToAllBuildPlates(); + id: arrangeAllBuildPlatesAction + text: catalog.i18nc("@action:inmenu menubar:edit","Arrange All Models To All Build Plates") + onTriggered: Printer.arrangeObjectsToAllBuildPlates() } Action { - id: arrangeAllAction; - text: catalog.i18nc("@action:inmenu menubar:edit","Arrange All Models"); - onTriggered: Printer.arrangeAll(); - shortcut: "Ctrl+R"; + id: arrangeAllAction + text: catalog.i18nc("@action:inmenu menubar:edit","Arrange All Models") + onTriggered: Printer.arrangeAll() + shortcut: "Ctrl+R" } Action { - id: arrangeSelectionAction; - text: catalog.i18nc("@action:inmenu menubar:edit","Arrange Selection"); - onTriggered: Printer.arrangeSelection(); + id: arrangeSelectionAction + text: catalog.i18nc("@action:inmenu menubar:edit","Arrange Selection") + onTriggered: Printer.arrangeSelection() } Action { - id: resetAllTranslationAction; - text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Model Positions"); - onTriggered: CuraApplication.resetAllTranslation(); + id: resetAllTranslationAction + text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Model Positions") + onTriggered: CuraApplication.resetAllTranslation() } Action { - id: resetAllAction; - text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Model Transformations"); - onTriggered: CuraApplication.resetAll(); + id: resetAllAction + text: catalog.i18nc("@action:inmenu menubar:edit","Reset All Model Transformations") + onTriggered: CuraApplication.resetAll() } Action { - id: openAction; + id: openAction property var fileProviderModel: CuraApplication.getFileProviderModel() - text: catalog.i18nc("@action:inmenu menubar:file","&Open File(s)..."); - iconName: "document-open"; + text: catalog.i18nc("@action:inmenu menubar:file","&Open File(s)...") + icon.name: "document-open" // Unassign the shortcut when there are more than one file providers, since then the file provider's shortcut is // enabled instead, and Ctrl+O is assigned to the local file provider - shortcut: fileProviderModel.count == 1 ? StandardKey.Open : ""; + shortcut: fileProviderModel.count == 1 ? StandardKey.Open : "" } Action { id: newProjectAction - text: catalog.i18nc("@action:inmenu menubar:file","&New Project..."); + text: catalog.i18nc("@action:inmenu menubar:file","&New Project...") shortcut: StandardKey.New } Action { - id: showProfileFolderAction; - text: catalog.i18nc("@action:inmenu menubar:help","Show Configuration Folder"); + id: showProfileFolderAction + text: catalog.i18nc("@action:inmenu menubar:help","Show Configuration Folder") } Action { id: configureSettingVisibilityAction - text: catalog.i18nc("@action:menu", "Configure setting visibility..."); - iconName: "configure" + text: catalog.i18nc("@action:menu", "Configure setting visibility...") + icon.name: "configure" } Action { id: browsePackagesAction text: "&Marketplace" - iconName: "plugins_browse" - } - - Action - { - id: openMarketplaceAction - text: catalog.i18nc("@action:menu", "&Marketplace") - iconName: "plugins_browse" + icon.name: "plugins_browse" } } diff --git a/resources/qml/ApplicationSwitcher/ApplicationButton.qml b/resources/qml/ApplicationSwitcher/ApplicationButton.qml index bcf780753c..182b80811b 100644 --- a/resources/qml/ApplicationSwitcher/ApplicationButton.qml +++ b/resources/qml/ApplicationSwitcher/ApplicationButton.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.4 as UM +import UM 1.5 as UM import Cura 1.1 as Cura Button @@ -31,7 +31,7 @@ Button border.width: UM.Theme.getSize("default_lining").width } - Cura.ToolTip + UM.ToolTip { id: tooltip tooltipText: base.text @@ -73,7 +73,7 @@ Button } } - Label + UM.Label { id: applicationDisplayName @@ -82,10 +82,8 @@ Button height: base.height - applicationIcon.height - 2 * UM.Theme.getSize("default_margin").width // Account for the top and bottom margins horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter wrapMode: Text.Wrap elide: Text.ElideRight - color: UM.Theme.getColor("text") } } } diff --git a/resources/qml/CategoryButton.qml b/resources/qml/CategoryButton.qml new file mode 100644 index 0000000000..b5d8bb2b2d --- /dev/null +++ b/resources/qml/CategoryButton.qml @@ -0,0 +1,122 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + +// Button used to collapse and de-collapse group, or a category, of settings +// the button contains +// - the title of the category, +// - an optional icon and +// - a chevron button to display the colapsetivity of the settings +// Mainly used for the collapsable categories in the settings pannel + +import QtQuick 2.2 +import QtQuick.Controls 2.1 +import QtQuick.Layouts 1.1 + +import UM 1.5 as UM + +Button +{ + id: base + + height: UM.Theme.getSize("section_header").height + + property var expanded: false + property bool indented: false + property alias arrow: categoryArrow + property alias categoryIcon: icon.source + property alias labelText: categoryLabel.text + property alias labelFont: categoryLabel.font + leftPadding: UM.Theme.getSize("narrow_margin").width + rightPadding: UM.Theme.getSize("narrow_margin").width + states: + [ + State + { + name: "disabled" + when: !base.enabled + PropertyChanges { target: categoryLabel; color: UM.Theme.getColor("setting_category_disabled_text") } + PropertyChanges { target: icon; color: UM.Theme.getColor("setting_category_disabled_text") } + PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_category_disabled") } + }, + State + { + name: "hovered" + when: base.hovered + PropertyChanges { target: categoryLabel; color: UM.Theme.getColor("setting_category_active_text") } + PropertyChanges { target: icon; color: UM.Theme.getColor("setting_category_active_text") } + PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_category_hover") } + }, + State + { + name: "active" + when: base.pressed || base.activeFocus + PropertyChanges { target: categoryLabel; color: UM.Theme.getColor("setting_category_active_text") } + PropertyChanges { target: icon; color: UM.Theme.getColor("setting_category_active_text") } + PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_category") } + } + ] + + background: Rectangle + { + id: backgroundRectangle + + color: UM.Theme.getColor("setting_category") + Behavior on color { ColorAnimation { duration: 50 } } + + // Lining on top + Rectangle + { + anchors.top: parent.top + color: UM.Theme.getColor("border_main") + height: UM.Theme.getSize("default_lining").height + width: parent.width + } + } + + contentItem: Item + { + id: content + //spacing: UM.Theme.getSize("narrow_margin").width + + UM.RecolorImage + { + id: icon + source: "" + visible: icon.source != "" + anchors.verticalCenter: parent.verticalCenter + color: UM.Theme.getColor("setting_category_text") + width: visible ? UM.Theme.getSize("section_icon").width: 0 + height: UM.Theme.getSize("section_icon").height + anchors.leftMargin: base.indented ? UM.Theme.getSize("default_margin").width: 0 + sourceSize.width: width + sourceSize.height: width + } + + UM.Label + { + id: categoryLabel + Layout.fillWidth: true + anchors.right: categoryArrow.left + anchors.left: icon.right + anchors.leftMargin: base.indented ? UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width: UM.Theme.getSize("narrow_margin").width + anchors.verticalCenter: parent.verticalCenter + elide: Text.ElideRight + wrapMode: Text.NoWrap + font: UM.Theme.getFont("medium_bold") + color: UM.Theme.getColor("setting_category_text") + } + + UM.RecolorImage + { + id: categoryArrow + anchors.right: parent.right + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + anchors.verticalCenter: parent.verticalCenter + sourceSize.width: width + sourceSize.height: height + color: UM.Theme.getColor("setting_control_button") + source: expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft") + } + } +}
\ No newline at end of file diff --git a/resources/qml/ColorDialog.qml b/resources/qml/ColorDialog.qml new file mode 100644 index 0000000000..6877ef34b6 --- /dev/null +++ b/resources/qml/ColorDialog.qml @@ -0,0 +1,144 @@ +import QtQuick 2.10 +import QtQuick.Controls 2.2 +import QtQuick.Window 2.1 +import QtQuick.Layouts 1.1 + +import UM 1.5 as UM +import Cura 1.1 as Cura + + +/* +* A dialog that provides the option to pick a color. Currently it only asks for a hex code and shows the color +* in a color swath +*/ +UM.Dialog +{ + id: base + + property variant catalog: UM.I18nCatalog { name: "cura" } + + margin: UM.Theme.getSize("default_margin").width + + property alias swatchGridColumns: colorSwatchGrid.columns + + // In this case we would like to let the content of the dialog determine the size of the dialog + // however with the current implementation of the dialog this is not possible, so instead we calculate + // the size of the dialog ourselves. + // Ugly workaround for windows having overlapping elements due to incorrect dialog width + minimumWidth: content.width + (Qt.platform.os == "windows" ? 4 * margin : 2 * margin) + minimumHeight: content.height + buttonRow.height + (Qt.platform.os == "windows" ? 5 * margin : 3 * margin) + + property alias color: colorInput.text + property var swatchColors: [ + "#2161AF", "#57AFB2", "#F7B32D", "#E33D4A", "#C088AD", + "#5D88BE", "#5ABD0E", "#E17239", "#F74E46", "#874AF9", + "#50C2EC", "#8DC15A", "#C3977A", "#CD7776", "#9086BA", + "#FFFFFF", "#D3D3D3", "#9E9E9E", "#5A5A5A", "#000000", + ] + + Component.onCompleted: updateSwatches() + onSwatchColorsChanged: updateSwatches() + + function updateSwatches() + { + swatchColorsModel.clear(); + for (const swatchColor of base.swatchColors) + { + swatchColorsModel.append({ swatchColor }); + } + } + + Column + { + id: content + width: childrenRect.width + height: childrenRect.height + spacing: UM.Theme.getSize("wide_margin").height + + GridLayout { + id: colorSwatchGrid + columns: 5 + width: childrenRect.width + height: childrenRect.height + columnSpacing: UM.Theme.getSize("thick_margin").width + rowSpacing: UM.Theme.getSize("thick_margin").height + + Repeater + { + model: ListModel + { + id: swatchColorsModel + } + + delegate: Rectangle + { + color: swatchColor + implicitWidth: UM.Theme.getSize("medium_button_icon").width + implicitHeight: UM.Theme.getSize("medium_button_icon").height + radius: width / 2 + + UM.RecolorImage + { + anchors.fill: parent + visible: swatchColor == base.color + source: UM.Theme.getIcon("Check", "low") + color: UM.Theme.getColor("checkbox") + } + + MouseArea + { + anchors.fill: parent + onClicked: base.color = swatchColor + } + } + } + } + + RowLayout + { + width: parent.width + spacing: UM.Theme.getSize("default_margin").width + + UM.Label + { + text: catalog.i18nc("@label", "Hex") + } + + TextField + { + id: colorInput + Layout.fillWidth: true + text: "#FFFFFF" + selectByMouse: true + onTextChanged: { + if (!text.startsWith("#")) + { + text = `#${text}`; + } + } + validator: RegExpValidator { regExp: /^#([a-fA-F0-9]{0,6})$/ } + } + + Rectangle + { + color: base.color + Layout.preferredHeight: parent.height + Layout.preferredWidth: height + } + } + } + + buttonSpacing: UM.Theme.getSize("thin_margin").width + + rightButtons: + [ + Cura.TertiaryButton { + text: catalog.i18nc("@action:button", "Cancel") + onClicked: base.close() + }, + Cura.PrimaryButton { + text: catalog.i18nc("@action:button", "OK") + onClicked: base.accept() + } + ] +}
\ No newline at end of file diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index eb78240d64..371754e9e0 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -1,14 +1,11 @@ -// 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 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.15 import QtQuick.Dialogs 1.2 import QtGraphicalEffects 1.0 - -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura import "Dialogs" @@ -161,7 +158,6 @@ UM.MainWindow ApplicationMenu { id: applicationMenu - window: base } Item @@ -255,7 +251,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 @@ -588,18 +583,15 @@ UM.MainWindow } } - MessageDialog + Cura.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) { @@ -749,20 +741,18 @@ UM.MainWindow } } - MessageDialog + Cura.MessageDialog { id: packageInstallDialog - title: catalog.i18nc("@window:title", "Install Package"); + title: catalog.i18nc("@window:title", "Install Package") standardButtons: StandardButton.Ok - modality: Qt.ApplicationModal } - MessageDialog + Cura.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 @@ -821,35 +811,6 @@ UM.MainWindow } } - MessageDialog - { - id: messageDialog - modality: Qt.ApplicationModal - onAccepted: CuraApplication.messageBoxClosed(clickedButton) - onApply: CuraApplication.messageBoxClosed(clickedButton) - onDiscard: CuraApplication.messageBoxClosed(clickedButton) - onHelp: CuraApplication.messageBoxClosed(clickedButton) - onNo: CuraApplication.messageBoxClosed(clickedButton) - onRejected: CuraApplication.messageBoxClosed(clickedButton) - onReset: CuraApplication.messageBoxClosed(clickedButton) - onYes: CuraApplication.messageBoxClosed(clickedButton) - } - - Connections - { - target: CuraApplication - function onShowMessageBox(title, text, informativeText, detailedText, buttons, icon) - { - messageDialog.title = title - messageDialog.text = text - messageDialog.informativeText = informativeText - messageDialog.detailedText = detailedText - messageDialog.standardButtons = buttons - messageDialog.icon = icon - messageDialog.visible = true - } - } - Component { id: discardOrKeepProfileChangesDialogComponent diff --git a/resources/qml/Dialogs/AboutDialog.qml b/resources/qml/Dialogs/AboutDialog.qml index 121f5d40b4..e6d15af2d9 100644 --- a/resources/qml/Dialogs/AboutDialog.qml +++ b/resources/qml/Dialogs/AboutDialog.qml @@ -1,11 +1,11 @@ -// 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.2 -import QtQuick.Controls 1.1 -import QtQuick.Window 2.1 +import QtQuick.Controls 2.9 -import UM 1.1 as UM +import UM 1.5 as UM +import Cura 1.5 as Cura UM.Dialog { @@ -50,7 +50,7 @@ UM.Dialog UM.I18nCatalog{id: catalog; name: "cura"} } - Label + UM.Label { id: version @@ -63,7 +63,7 @@ UM.Dialog } } - Label + UM.Label { id: description width: parent.width @@ -76,7 +76,7 @@ UM.Dialog anchors.topMargin: UM.Theme.getSize("default_margin").height } - Label + UM.Label { id: creditsNotes width: parent.width @@ -89,90 +89,87 @@ UM.Dialog anchors.topMargin: UM.Theme.getSize("default_margin").height } - ScrollView + ListView { - id: credits + id: projectsList anchors.top: creditsNotes.bottom anchors.topMargin: UM.Theme.getSize("default_margin").height - width: parent.width height: base.height - y - (2 * UM.Theme.getSize("default_margin").height + closeButton.height) - ListView + ScrollBar.vertical: UM.ScrollBar { - id: projectsList - - width: parent.width + id: projectsListScrollBar + } - delegate: Row + delegate: Row + { + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label { - Label - { - text: "<a href='%1' title='%2'>%2</a>".arg(model.url).arg(model.name) - width: (projectsList.width * 0.25) | 0 - elide: Text.ElideRight - onLinkActivated: Qt.openUrlExternally(link) - } - Label - { - text: model.description - elide: Text.ElideRight - width: (projectsList.width * 0.6) | 0 - } - Label - { - text: model.license - elide: Text.ElideRight - width: (projectsList.width * 0.15) | 0 - } + text: "<a href='%1' title='%2'>%2</a>".arg(model.url).arg(model.name) + width: (projectsList.width * 0.25) | 0 + elide: Text.ElideRight + onLinkActivated: Qt.openUrlExternally(link) } - model: ListModel + UM.Label { - id: projectsModel + text: model.description + elide: Text.ElideRight + width: ((projectsList.width * 0.6) | 0) - parent.spacing * 2 - projectsListScrollBar.width } - Component.onCompleted: + UM.Label { - projectsModel.append({ name: "Cura", description: catalog.i18nc("@label", "Graphical user interface"), license: "LGPLv3", url: "https://github.com/Ultimaker/Cura" }); - projectsModel.append({ name: "Uranium", description: catalog.i18nc("@label", "Application framework"), license: "LGPLv3", url: "https://github.com/Ultimaker/Uranium" }); - projectsModel.append({ name: "CuraEngine", description: catalog.i18nc("@label", "G-code generator"), license: "AGPLv3", url: "https://github.com/Ultimaker/CuraEngine" }); - projectsModel.append({ name: "libArcus", description: catalog.i18nc("@label", "Interprocess communication library"), license: "LGPLv3", url: "https://github.com/Ultimaker/libArcus" }); - - projectsModel.append({ name: "Python", description: catalog.i18nc("@label", "Programming language"), license: "Python", url: "http://python.org/" }); - projectsModel.append({ name: "Qt5", description: catalog.i18nc("@label", "GUI framework"), license: "LGPLv3", url: "https://www.qt.io/" }); - projectsModel.append({ name: "PyQt", description: catalog.i18nc("@label", "GUI framework bindings"), license: "GPL", url: "https://riverbankcomputing.com/software/pyqt" }); - projectsModel.append({ name: "SIP", description: catalog.i18nc("@label", "C/C++ Binding library"), license: "GPL", url: "https://riverbankcomputing.com/software/sip" }); - projectsModel.append({ name: "Protobuf", description: catalog.i18nc("@label", "Data interchange format"), license: "BSD", url: "https://developers.google.com/protocol-buffers" }); - projectsModel.append({ name: "SciPy", description: catalog.i18nc("@label", "Support library for scientific computing"), license: "BSD-new", url: "https://www.scipy.org/" }); - projectsModel.append({ name: "NumPy", description: catalog.i18nc("@label", "Support library for faster math"), license: "BSD", url: "http://www.numpy.org/" }); - projectsModel.append({ name: "NumPy-STL", description: catalog.i18nc("@label", "Support library for handling STL files"), license: "BSD", url: "https://github.com/WoLpH/numpy-stl" }); - projectsModel.append({ name: "Trimesh", description: catalog.i18nc("@label", "Support library for handling triangular meshes"), license: "MIT", url: "https://trimsh.org" }); - projectsModel.append({ name: "libSavitar", description: catalog.i18nc("@label", "Support library for handling 3MF files"), license: "LGPLv3", url: "https://github.com/ultimaker/libsavitar" }); - projectsModel.append({ name: "libCharon", description: catalog.i18nc("@label", "Support library for file metadata and streaming"), license: "LGPLv3", url: "https://github.com/ultimaker/libcharon" }); - projectsModel.append({ name: "PySerial", description: catalog.i18nc("@label", "Serial communication library"), license: "Python", url: "http://pyserial.sourceforge.net/" }); - projectsModel.append({ name: "python-zeroconf", description: catalog.i18nc("@label", "ZeroConf discovery library"), license: "LGPL", url: "https://github.com/jstasiak/python-zeroconf" }); - projectsModel.append({ name: "Clipper", description: catalog.i18nc("@label", "Polygon clipping library"), license: "Boost", url: "http://www.angusj.com/delphi/clipper.php" }); - projectsModel.append({ name: "Pyclipper", description: catalog.i18nc("@label", "Python bindings for Clipper"), license: "MIT", url: "https://github.com/fonttools/pyclipper" }); - projectsModel.append({ name: "mypy", description: catalog.i18nc("@Label", "Static type checker for Python"), license: "MIT", url: "http://mypy-lang.org/" }); - projectsModel.append({ name: "certifi", description: catalog.i18nc("@Label", "Root Certificates for validating SSL trustworthiness"), license: "MPL", url: "https://github.com/certifi/python-certifi" }); - projectsModel.append({ name: "cryptography", description: catalog.i18nc("@Label", "Root Certificates for validating SSL trustworthiness"), license: "APACHE and BSD", url: "https://cryptography.io/" }); - projectsModel.append({ name: "Sentry", description: catalog.i18nc("@Label", "Python Error tracking library"), license: "BSD 2-Clause 'Simplified'", url: "https://sentry.io/for/python/" }); - projectsModel.append({ name: "libnest2d", description: catalog.i18nc("@label", "Polygon packing library, developed by Prusa Research"), license: "LGPL", url: "https://github.com/tamasmeszaros/libnest2d" }); - projectsModel.append({ name: "pynest2d", description: catalog.i18nc("@label", "Python bindings for libnest2d"), license: "LGPL", url: "https://github.com/Ultimaker/pynest2d" }); - projectsModel.append({ name: "keyring", description: catalog.i18nc("@label", "Support library for system keyring access"), license: "MIT", url: "https://github.com/jaraco/keyring" }); - projectsModel.append({ name: "pywin32", description: catalog.i18nc("@label", "Python extensions for Microsoft Windows"), license: "PSF", url: "https://github.com/mhammond/pywin32" }); - projectsModel.append({ name: "Noto Sans", description: catalog.i18nc("@label", "Font"), license: "Apache 2.0", url: "https://www.google.com/get/noto/" }); - projectsModel.append({ name: "Font-Awesome-SVG-PNG", description: catalog.i18nc("@label", "SVG icons"), license: "SIL OFL 1.1", url: "https://github.com/encharm/Font-Awesome-SVG-PNG" }); - projectsModel.append({ name: "AppImageKit", description: catalog.i18nc("@label", "Linux cross-distribution application deployment"), license: "MIT", url: "https://github.com/AppImage/AppImageKit" }); + text: model.license + elide: Text.ElideRight + width: (projectsList.width * 0.15) | 0 } } + model: ListModel + { + id: projectsModel + } + Component.onCompleted: + { + projectsModel.append({ name: "Cura", description: catalog.i18nc("@label", "Graphical user interface"), license: "LGPLv3", url: "https://github.com/Ultimaker/Cura" }); + projectsModel.append({ name: "Uranium", description: catalog.i18nc("@label", "Application framework"), license: "LGPLv3", url: "https://github.com/Ultimaker/Uranium" }); + projectsModel.append({ name: "CuraEngine", description: catalog.i18nc("@label", "G-code generator"), license: "AGPLv3", url: "https://github.com/Ultimaker/CuraEngine" }); + projectsModel.append({ name: "libArcus", description: catalog.i18nc("@label", "Interprocess communication library"), license: "LGPLv3", url: "https://github.com/Ultimaker/libArcus" }); + + projectsModel.append({ name: "Python", description: catalog.i18nc("@label", "Programming language"), license: "Python", url: "http://python.org/" }); + projectsModel.append({ name: "Qt5", description: catalog.i18nc("@label", "GUI framework"), license: "LGPLv3", url: "https://www.qt.io/" }); + projectsModel.append({ name: "PyQt", description: catalog.i18nc("@label", "GUI framework bindings"), license: "GPL", url: "https://riverbankcomputing.com/software/pyqt" }); + projectsModel.append({ name: "SIP", description: catalog.i18nc("@label", "C/C++ Binding library"), license: "GPL", url: "https://riverbankcomputing.com/software/sip" }); + projectsModel.append({ name: "Protobuf", description: catalog.i18nc("@label", "Data interchange format"), license: "BSD", url: "https://developers.google.com/protocol-buffers" }); + projectsModel.append({ name: "SciPy", description: catalog.i18nc("@label", "Support library for scientific computing"), license: "BSD-new", url: "https://www.scipy.org/" }); + projectsModel.append({ name: "NumPy", description: catalog.i18nc("@label", "Support library for faster math"), license: "BSD", url: "http://www.numpy.org/" }); + projectsModel.append({ name: "NumPy-STL", description: catalog.i18nc("@label", "Support library for handling STL files"), license: "BSD", url: "https://github.com/WoLpH/numpy-stl" }); + projectsModel.append({ name: "Trimesh", description: catalog.i18nc("@label", "Support library for handling triangular meshes"), license: "MIT", url: "https://trimsh.org" }); + projectsModel.append({ name: "libSavitar", description: catalog.i18nc("@label", "Support library for handling 3MF files"), license: "LGPLv3", url: "https://github.com/ultimaker/libsavitar" }); + projectsModel.append({ name: "libCharon", description: catalog.i18nc("@label", "Support library for file metadata and streaming"), license: "LGPLv3", url: "https://github.com/ultimaker/libcharon" }); + projectsModel.append({ name: "PySerial", description: catalog.i18nc("@label", "Serial communication library"), license: "Python", url: "http://pyserial.sourceforge.net/" }); + projectsModel.append({ name: "python-zeroconf", description: catalog.i18nc("@label", "ZeroConf discovery library"), license: "LGPL", url: "https://github.com/jstasiak/python-zeroconf" }); + projectsModel.append({ name: "Clipper", description: catalog.i18nc("@label", "Polygon clipping library"), license: "Boost", url: "http://www.angusj.com/delphi/clipper.php" }); + projectsModel.append({ name: "Pyclipper", description: catalog.i18nc("@label", "Python bindings for Clipper"), license: "MIT", url: "https://github.com/fonttools/pyclipper" }); + projectsModel.append({ name: "mypy", description: catalog.i18nc("@Label", "Static type checker for Python"), license: "MIT", url: "http://mypy-lang.org/" }); + projectsModel.append({ name: "certifi", description: catalog.i18nc("@Label", "Root Certificates for validating SSL trustworthiness"), license: "MPL", url: "https://github.com/certifi/python-certifi" }); + projectsModel.append({ name: "cryptography", description: catalog.i18nc("@Label", "Root Certificates for validating SSL trustworthiness"), license: "APACHE and BSD", url: "https://cryptography.io/" }); + projectsModel.append({ name: "Sentry", description: catalog.i18nc("@Label", "Python Error tracking library"), license: "BSD 2-Clause 'Simplified'", url: "https://sentry.io/for/python/" }); + projectsModel.append({ name: "libnest2d", description: catalog.i18nc("@label", "Polygon packing library, developed by Prusa Research"), license: "LGPL", url: "https://github.com/tamasmeszaros/libnest2d" }); + projectsModel.append({ name: "pynest2d", description: catalog.i18nc("@label", "Python bindings for libnest2d"), license: "LGPL", url: "https://github.com/Ultimaker/pynest2d" }); + projectsModel.append({ name: "keyring", description: catalog.i18nc("@label", "Support library for system keyring access"), license: "MIT", url: "https://github.com/jaraco/keyring" }); + projectsModel.append({ name: "pywin32", description: catalog.i18nc("@label", "Python extensions for Microsoft Windows"), license: "PSF", url: "https://github.com/mhammond/pywin32" }); + projectsModel.append({ name: "Noto Sans", description: catalog.i18nc("@label", "Font"), license: "Apache 2.0", url: "https://www.google.com/get/noto/" }); + projectsModel.append({ name: "Font-Awesome-SVG-PNG", description: catalog.i18nc("@label", "SVG icons"), license: "SIL OFL 1.1", url: "https://github.com/encharm/Font-Awesome-SVG-PNG" }); + projectsModel.append({ name: "AppImageKit", description: catalog.i18nc("@label", "Linux cross-distribution application deployment"), license: "MIT", url: "https://github.com/AppImage/AppImageKit" }); + } } - rightButtons: Button + rightButtons: Cura.TertiaryButton { //: Close about dialog button id: closeButton - text: catalog.i18nc("@action:button","Close"); - - onClicked: base.visible = false; + text: catalog.i18nc("@action:button", "Close") + onClicked: reject() } } diff --git a/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml b/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml index 53596d39ec..23e01b5e46 100644 --- a/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml +++ b/resources/qml/Dialogs/AskOpenAsProjectOrModelsDialog.qml @@ -1,12 +1,9 @@ -// 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.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 +import QtQuick.Controls 2.1 import QtQuick.Layouts 1.1 -import QtQuick.Dialogs 1.1 -import QtQuick.Window 2.1 import UM 1.5 as UM import Cura 1.0 as Cura @@ -77,17 +74,13 @@ UM.Dialog Column { anchors.fill: parent - anchors.leftMargin: 20 * screenScaleFactor - anchors.rightMargin: 20 * screenScaleFactor - anchors.bottomMargin: 10 * screenScaleFactor - spacing: 10 * screenScaleFactor + spacing: UM.Theme.getSize("default_margin").height - Label + UM.Label { id: questionText + width: parent.width text: catalog.i18nc("@text:window", "This is a Cura project file. Would you like to open it as a project or import the models from it?") - anchors.left: parent.left - anchors.right: parent.right font: UM.Theme.getFont("default") wrapMode: Text.WordWrap } @@ -98,29 +91,24 @@ UM.Dialog text: catalog.i18nc("@text:window", "Remember my choice") checked: UM.Preferences.getValue("cura/choice_on_open_project") != "always_ask" } + } + + onAccepted: loadProjectFile() + onRejected: loadModelFiles() + + buttonSpacing: UM.Theme.getSize("thin_margin").width - // Buttons - Item { - id: buttonBar - anchors.right: parent.right - anchors.left: parent.left - height: childrenRect.height - - Button { - id: openAsProjectButton - text: catalog.i18nc("@action:button", "Open as project") - anchors.right: importModelsButton.left - anchors.rightMargin: UM.Theme.getSize("default_margin").width - isDefault: true - onClicked: loadProjectFile() - } - - Button { - id: importModelsButton - text: catalog.i18nc("@action:button", "Import models") - anchors.right: parent.right - onClicked: loadModelFiles() - } + rightButtons: + [ + Cura.PrimaryButton + { + text: catalog.i18nc("@action:button", "Open as project") + onClicked: loadProjectFile() + }, + Cura.SecondaryButton + { + text: catalog.i18nc("@action:button", "Import models") + onClicked: loadModelFiles() } - } + ] } diff --git a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml index 0a9d317d2d..bcace5a8b1 100644 --- a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml @@ -1,23 +1,30 @@ -// Copyright (c) 2020 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. +//Copyright (c) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. +import Qt.labs.qmlmodels 1.0 import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls 2.15 as NewControls -import QtQuick.Dialogs 1.2 -import QtQuick.Window 2.1 +import QtQuick.Controls 2.15 -import UM 1.2 as UM -import Cura 1.0 as Cura +import UM 1.5 as UM +import Cura 1.6 as Cura UM.Dialog { id: base title: catalog.i18nc("@title:window", "Discard or Keep changes") + onAccepted: CuraApplication.discardOrKeepProfileChangesClosed("discard") + onRejected: CuraApplication.discardOrKeepProfileChangesClosed("keep") + minimumWidth: UM.Theme.getSize("popup_dialog").width minimumHeight: UM.Theme.getSize("popup_dialog").height - property var changesModel: Cura.UserChangesModel{ id: userChangesModel} + width: minimumWidth + height: minimumHeight + backgroundColor: UM.Theme.getColor("background_1") + margin: UM.Theme.getSize("thick_margin").width + + property var changesModel: Cura.UserChangesModel { id: userChangesModel } + onVisibilityChanged: { if(visible) @@ -37,119 +44,59 @@ UM.Dialog } } - Row + UM.Label { - id: infoTextRow - height: childrenRect.height - anchors.margins: UM.Theme.getSize("default_margin").width + id: infoText + text: catalog.i18nc("@text:window, %1 is a profile name", "You have customized some profile settings. Would you like to Keep these changed settings after switching profiles? Alternatively, you can discard the changes to load the defaults from '%1'.").arg(Cura.MachineManager.activeQualityDisplayNameMap["main"]) anchors.left: parent.left anchors.right: parent.right - anchors.top: parent.top - spacing: UM.Theme.getSize("default_margin").width + wrapMode: Text.WordWrap UM.I18nCatalog { - id: catalog; + id: catalog name: "cura" } - - Label - { - text: catalog.i18nc("@text:window, %1 is a profile name", "You have customized some profile settings.\nWould you like to Keep these changed settings after switching profiles?\nAlternatively, you can discard the changes to load the defaults from '%1'.").arg(Cura.MachineManager.activeQualityDisplayNameMap["main"]) - anchors.margins: UM.Theme.getSize("default_margin").width - wrapMode: Text.WordWrap - } } Item { - anchors.margins: UM.Theme.getSize("default_margin").width - anchors.top: infoTextRow.bottom - anchors.bottom: optionRow.top + anchors.topMargin: UM.Theme.getSize("default_margin").height + anchors.top: infoText.bottom + anchors.bottom: parent.bottom anchors.left: parent.left anchors.right: parent.right - TableView + + Cura.TableView { - anchors.fill: parent - height: base.height - 150 id: tableView - Component - { - id: labelDelegate - Label - { - property var extruder_name: userChangesModel.getItem(styleData.row).extruder - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.right: parent.right - elide: Text.ElideRight - font: UM.Theme.getFont("system") - text: - { - var result = styleData.value - if (extruder_name != "") - { - result += " (" + extruder_name + ")" - } - return result - } - } - } - - Component - { - id: defaultDelegate - Label - { - text: styleData.value - font: UM.Theme.getFont("system") - } - } + anchors.fill: parent - TableViewColumn - { - role: "label" - title: catalog.i18nc("@title:column", "Profile settings") - delegate: labelDelegate - width: (tableView.width * 0.4) | 0 - } - TableViewColumn - { - role: "original_value" - title: Cura.MachineManager.activeQualityDisplayNameMap["main"] - width: (tableView.width * 0.3) | 0 - delegate: defaultDelegate - } - TableViewColumn + columnHeaders: [ + catalog.i18nc("@title:column", "Profile settings"), + Cura.MachineManager.activeQualityDisplayNameMap["main"], + catalog.i18nc("@title:column", "Current changes") + ] + model: TableModel { - role: "user_value" - title: catalog.i18nc("@title:column", "Current changes") - width: (tableView.width * 0.3) | 0 + TableModelColumn { display: "label" } + TableModelColumn { display: "original_value" } + TableModelColumn { display: "user_value" } + rows: userChangesModel.items } - section.property: "category" - section.delegate: Label - { - text: section - font.bold: true - } - - model: userChangesModel + sectionRole: "category" } } - Item - { - id: optionRow - anchors.bottom: buttonsRow.top - anchors.right: parent.right - anchors.left: parent.left - anchors.margins: UM.Theme.getSize("default_margin").width - height: childrenRect.height + buttonSpacing: UM.Theme.getSize("thin_margin").width - NewControls.ComboBox + leftButtons: [ + Cura.ComboBox { + implicitHeight: UM.Theme.getSize("combobox").height + implicitWidth: UM.Theme.getSize("combobox").width + id: discardOrKeepProfileChangesDropDownButton - width: 300 textRole: "text" model: ListModel @@ -182,41 +129,21 @@ UM.Dialog } } } - } - - Item - { - id: buttonsRow - anchors.bottom: parent.bottom - anchors.right: parent.right - anchors.left: parent.left - anchors.margins: UM.Theme.getSize("default_margin").width - height: childrenRect.height + ] - Button + rightButtons: + [ + Cura.PrimaryButton { id: discardButton - text: catalog.i18nc("@action:button", "Discard changes"); - anchors.right: parent.right - onClicked: - { - CuraApplication.discardOrKeepProfileChangesClosed("discard") - base.hide() - } - isDefault: true - } - - Button + text: catalog.i18nc("@action:button", "Discard changes") + onClicked: base.accept() + }, + Cura.SecondaryButton { id: keepButton - text: catalog.i18nc("@action:button", "Keep changes"); - anchors.right: discardButton.left - anchors.rightMargin: UM.Theme.getSize("default_margin").width - onClicked: - { - CuraApplication.discardOrKeepProfileChangesClosed("keep") - base.hide() - } + text: catalog.i18nc("@action:button", "Keep changes") + onClicked: base.reject() } - } + ] } 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/Dialogs/OpenFilesIncludingProjectsDialog.qml b/resources/qml/Dialogs/OpenFilesIncludingProjectsDialog.qml index 3f1900c66b..18891cebee 100644 --- a/resources/qml/Dialogs/OpenFilesIncludingProjectsDialog.qml +++ b/resources/qml/Dialogs/OpenFilesIncludingProjectsDialog.qml @@ -1,15 +1,12 @@ -// 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.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 +import QtQuick.Controls 2.0 import QtQuick.Layouts 1.1 -import QtQuick.Dialogs 1.1 -import QtQuick.Window 2.1 -import UM 1.3 as UM -import Cura 1.0 as Cura +import UM 1.5 as UM +import Cura 1.5 as Cura UM.Dialog { @@ -17,9 +14,9 @@ UM.Dialog id: base title: catalog.i18nc("@title:window", "Open file(s)") - width: 420 * screenScaleFactor - height: 170 * screenScaleFactor + width: UM.Theme.getSize("small_popup_dialog").width + height: UM.Theme.getSize("small_popup_dialog").height maximumHeight: height maximumWidth: width minimumHeight: height @@ -29,7 +26,6 @@ UM.Dialog property var fileUrls: [] property var addToRecent: true - property int spacerHeight: 10 * screenScaleFactor function loadProjectFile(projectFile) { @@ -44,70 +40,29 @@ UM.Dialog } } - Column + onAccepted: loadModelFiles(base.fileUrls) + + UM.Label { - anchors.fill: parent - anchors.leftMargin: 20 * screenScaleFactor - anchors.rightMargin: 20 * screenScaleFactor - anchors.bottomMargin: 20 * screenScaleFactor + text: catalog.i18nc("@text:window", "We have found one or more project file(s) within the files you have selected. You can open only one project file at a time. We suggest to only import models from those files. Would you like to proceed?") anchors.left: parent.left anchors.right: parent.right - spacing: 10 * screenScaleFactor + } - Label - { - text: catalog.i18nc("@text:window", "We have found one or more project file(s) within the files you have selected. You can open only one project file at a time. We suggest to only import models from those files. Would you like to proceed?") - anchors.left: parent.left - anchors.right: parent.right - font: UM.Theme.getFont("default") - wrapMode: Text.WordWrap - } + buttonSpacing: UM.Theme.getSize("thin_margin").width - Item // Spacer + // Buttons + rightButtons: + [ + Cura.SecondaryButton { - height: base.spacerHeight - width: height - } - - // Buttons - Item + text: catalog.i18nc("@action:button", "Cancel"); + onClicked: base.reject() + }, + Cura.PrimaryButton { - anchors.right: parent.right - anchors.left: parent.left - height: childrenRect.height - - Button - { - id: cancelButton - text: catalog.i18nc("@action:button", "Cancel"); - anchors.right: importAllAsModelsButton.left - onClicked: - { - // cancel - base.hide(); - } - } - - Button - { - id: importAllAsModelsButton - text: catalog.i18nc("@action:button", "Import all as models"); - anchors.right: parent.right - isDefault: true - onClicked: - { - // load models from all selected file - loadModelFiles(base.fileUrls); - - base.hide(); - } - } - } - - UM.I18nCatalog - { - id: catalog - name: "cura" + text: catalog.i18nc("@action:button", "Import all as models"); + onClicked: base.accept() } - } + ] }
\ No newline at end of file diff --git a/resources/qml/Dialogs/WorkspaceSummaryDialog.qml b/resources/qml/Dialogs/WorkspaceSummaryDialog.qml index b426f03471..411dc44f83 100644 --- a/resources/qml/Dialogs/WorkspaceSummaryDialog.qml +++ b/resources/qml/Dialogs/WorkspaceSummaryDialog.qml @@ -1,11 +1,9 @@ -// 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.10 -import QtQuick.Controls 1.4 -import QtQuick.Controls 2.0 as Controls2 +import QtQuick.Controls 2.9 import QtQuick.Layouts 1.3 -import QtQuick.Window 2.2 import UM 1.5 as UM import Cura 1.0 as Cura @@ -15,26 +13,14 @@ UM.Dialog id: base title: catalog.i18nc("@title:window", "Save Project") - minimumWidth: 500 * screenScaleFactor - minimumHeight: 400 * screenScaleFactor + minimumWidth: UM.Theme.getSize("popup_dialog").width + minimumHeight: UM.Theme.getSize("popup_dialog").height width: minimumWidth height: minimumHeight - property int spacerHeight: 10 * screenScaleFactor - property bool dontShowAgain: true - signal yes(); - - function accept() { // pressing enter will call this function - close(); - yes(); - } - - onClosing: - { - UM.Preferences.setValue("cura/dialog_on_project_save", !dontShowAgainCheckbox.checked) - } + onClosing: UM.Preferences.setValue("cura/dialog_on_project_save", !dontShowAgainCheckbox.checked) onVisibleChanged: { @@ -59,11 +45,7 @@ UM.Dialog visibilityHandler: UM.SettingPreferenceVisibilityHandler { } } - SystemPalette - { - id: palette - } - Label + UM.Label { id: mainHeading width: parent.width @@ -79,16 +61,28 @@ UM.Dialog { top: mainHeading.bottom topMargin: UM.Theme.getSize("default_margin").height - bottom: controls.top + bottom: parent.bottom bottomMargin: UM.Theme.getSize("default_margin").height } - style: UM.Theme.styles.scrollview + + ScrollBar.vertical: UM.ScrollBar + { + parent: scroll.parent + anchors + { + top: parent.top + right: parent.right + bottom: parent.bottom + } + } + clip: true + ColumnLayout { spacing: UM.Theme.getSize("default_margin").height Column { - Label + UM.Label { id: settingsHeading text: catalog.i18nc("@action:label", "Printer settings") @@ -98,14 +92,14 @@ UM.Dialog { width: parent.width height: childrenRect.height - Label + UM.Label { text: catalog.i18nc("@action:label", "Type") width: Math.floor(scroll.width / 3) | 0 } - Label + UM.Label { - text: (Cura.MachineManager.activeMachine == null) ? "" : Cura.MachineManager.activeMachine.definition.name + text: Cura.MachineManager.activeMachine == null ? "" : Cura.MachineManager.activeMachine.definition.name width: Math.floor(scroll.width / 3) | 0 } } @@ -113,12 +107,12 @@ UM.Dialog { width: parent.width height: childrenRect.height - Label + UM.Label { text: Cura.MachineManager.activeMachineNetworkGroupName != "" ? catalog.i18nc("@action:label", "Printer Group") : catalog.i18nc("@action:label", "Name") width: Math.floor(scroll.width / 3) | 0 } - Label + UM.Label { text: { @@ -157,7 +151,7 @@ UM.Dialog var material_name = extruder.material.name return (material_name !== undefined) ? material_name : "" } - Label + UM.Label { text: { var extruder = Number(modelData.position) @@ -181,7 +175,7 @@ UM.Dialog width: parent.width height: childrenRect.height - Label + UM.Label { text: { @@ -194,7 +188,7 @@ UM.Dialog width: Math.floor(scroll.width / 3) | 0 enabled: modelData.isEnabled } - Label + UM.Label { text: { @@ -214,7 +208,7 @@ UM.Dialog { width: parent.width height: childrenRect.height - Label + UM.Label { text: catalog.i18nc("@action:label", "Profile settings") font.bold: true @@ -222,12 +216,12 @@ UM.Dialog Row { width: parent.width - Label + UM.Label { text: catalog.i18nc("@action:label", "Not in profile") width: Math.floor(scroll.width / 3) | 0 } - Label + UM.Label { text: catalog.i18ncp("@action:label", "%1 override", "%1 overrides", Cura.MachineManager.numUserSettings).arg(Cura.MachineManager.numUserSettings) width: Math.floor(scroll.width / 3) | 0 @@ -238,12 +232,12 @@ UM.Dialog { width: parent.width height: childrenRect.height - Label + UM.Label { text: catalog.i18nc("@action:label", "Name") width: Math.floor(scroll.width / 3) | 0 } - Label + UM.Label { text: Cura.MachineManager.activeQualityOrQualityChangesName width: Math.floor(scroll.width / 3) | 0 @@ -255,12 +249,12 @@ UM.Dialog { width: parent.width height: childrenRect.height - Label + UM.Label { text: catalog.i18nc("@action:label", "Intent") width: Math.floor(scroll.width / 3) | 0 } - Label + UM.Label { text: Cura.MachineManager.activeIntentCategory width: Math.floor(scroll.width / 3) | 0 @@ -269,43 +263,31 @@ UM.Dialog } } } - Item + } + + buttonSpacing: UM.Theme.getSize("thin_margin").width + + leftButtons: + [ + UM.CheckBox { - id: controls - width: parent.width - height: childrenRect.height - anchors.bottom: parent.bottom - UM.CheckBox - { - id: dontShowAgainCheckbox - anchors.left: parent.left - text: catalog.i18nc("@action:label", "Don't show project summary on save again") - checked: dontShowAgain - } - Controls2.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() - } - Controls2.Button - { - id: ok_button - anchors.right: parent.right - text: catalog.i18nc("@action:button","Save"); - enabled: true - onClicked: - { - close() - yes() - } - } + id: dontShowAgainCheckbox + 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() + } + ] } diff --git a/resources/qml/ExpandableComponent.qml b/resources/qml/ExpandableComponent.qml index 694cfb9e2e..e5eab3bd93 100644 --- a/resources/qml/ExpandableComponent.qml +++ b/resources/qml/ExpandableComponent.qml @@ -4,7 +4,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura // The expandable component has 2 major sub components: @@ -30,8 +30,8 @@ Item property color contentBackgroundColor: UM.Theme.getColor("action_button") property color headerBackgroundColor: UM.Theme.getColor("action_button") - property color headerActiveColor: UM.Theme.getColor("secondary") - property color headerHoverColor: UM.Theme.getColor("action_button_hovered") + property color headerActiveColor: UM.Theme.getColor("expandable_active") + property color headerHoverColor: UM.Theme.getColor("expandable_hover") property alias enabled: mouseArea.enabled @@ -126,7 +126,7 @@ Item color: base.enabled ? (base.expanded ? headerActiveColor : headerBackgroundColor) : UM.Theme.getColor("disabled") anchors.fill: parent - Label + UM.Label { id: disabledLabel visible: !base.enabled @@ -134,10 +134,6 @@ Item leftPadding: background.padding rightPadding: background.padding text: "" - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter - color: UM.Theme.getColor("text") wrapMode: Text.WordWrap } diff --git a/resources/qml/ExpandableComponentHeader.qml b/resources/qml/ExpandableComponentHeader.qml index 7dd1aa358a..7176f0978b 100644 --- a/resources/qml/ExpandableComponentHeader.qml +++ b/resources/qml/ExpandableComponentHeader.qml @@ -4,7 +4,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura // Header of the popup @@ -16,20 +16,17 @@ Cura.RoundedRectangle property alias xPosCloseButton: closeButton.left height: UM.Theme.getSize("expandable_component_content_header").height - color: UM.Theme.getColor("secondary") + color: UM.Theme.getColor("background_1") cornerSide: Cura.RoundedRectangle.Direction.Up border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("lining") radius: UM.Theme.getSize("default_radius").width - Label + UM.Label { id: headerLabel text: "" font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter - color: UM.Theme.getColor("small_button_text") height: parent.height anchors diff --git a/resources/qml/ExpandablePopup.qml b/resources/qml/ExpandablePopup.qml index 39f2ced8aa..219608a762 100644 --- a/resources/qml/ExpandablePopup.qml +++ b/resources/qml/ExpandablePopup.qml @@ -4,7 +4,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura // The expandable component has 2 major sub components: @@ -30,8 +30,8 @@ Item property color contentBackgroundColor: UM.Theme.getColor("action_button") property color headerBackgroundColor: UM.Theme.getColor("action_button") - property color headerActiveColor: UM.Theme.getColor("secondary") - property color headerHoverColor: UM.Theme.getColor("action_button_hovered") + property color headerActiveColor: UM.Theme.getColor("expandable_active") + property color headerHoverColor: UM.Theme.getColor("expandable_hover") property alias mouseArea: headerMouseArea property alias enabled: headerMouseArea.enabled @@ -120,16 +120,12 @@ Item color: base.enabled ? headerBackgroundColor : UM.Theme.getColor("disabled") anchors.fill: parent - Label + UM.Label { id: disabledLabel visible: !base.enabled leftPadding: background.padding text: "" - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter - color: UM.Theme.getColor("text") height: parent.height } diff --git a/resources/qml/ExtruderButton.qml b/resources/qml/ExtruderButton.qml index b87855e25e..204e9a5469 100644 --- a/resources/qml/ExtruderButton.qml +++ b/resources/qml/ExtruderButton.qml @@ -4,10 +4,10 @@ import QtQuick 2.2 import QtQuick.Controls 2.0 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura -Cura.ToolbarButton +UM.ToolbarButton { id: base diff --git a/resources/qml/ExtruderIcon.qml b/resources/qml/ExtruderIcon.qml index 8d5852823d..b9141a449a 100644 --- a/resources/qml/ExtruderIcon.qml +++ b/resources/qml/ExtruderIcon.qml @@ -2,8 +2,7 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.11 -import QtQuick.Controls 1.1 -import UM 1.2 as UM +import UM 1.5 as UM Item { @@ -43,18 +42,15 @@ Item color: extruderNumberText.color } - Label + UM.Label { id: extruderNumberText anchors.centerIn: parent text: index + 1 font: UM.Theme.getFont("small_emphasis") - color: UM.Theme.getColor("text") width: contentWidth height: contentHeight - renderType: Text.NativeRendering horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter } } } diff --git a/resources/qml/IconWithText.qml b/resources/qml/IconWithText.qml index e582aa5939..d7b4adfa8c 100644 --- a/resources/qml/IconWithText.qml +++ b/resources/qml/IconWithText.qml @@ -5,7 +5,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura // Reusable component that holds an (re-colorable) icon on the left with some text on the right. @@ -21,6 +21,7 @@ Item property alias font: label.font property alias elide: label.elide property real margin: UM.Theme.getSize("narrow_margin").width + property alias wrapMode: label.wrapMode // These properties can be used in combination with layouts. readonly property real contentWidth: icon.width + margin + label.contentWidth @@ -49,15 +50,10 @@ Item } } - Label + UM.Label { id: label - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter - anchors { left: icon.right diff --git a/resources/qml/JobSpecs.qml b/resources/qml/JobSpecs.qml index 4aa5fa8bd5..1a5f40466a 100644 --- a/resources/qml/JobSpecs.qml +++ b/resources/qml/JobSpecs.qml @@ -1,12 +1,11 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 +import QtQuick.Controls 2.1 import QtQuick.Layouts 1.1 -import UM 1.1 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item @@ -29,7 +28,8 @@ Item { if (!activity) { - //When there is no mesh in the buildplate; the printJobTextField is set to an empty string so it doesn't set an empty string as a jobName (which is later used for saving the file) + // When there is no mesh in the buildplate; the printJobTextField is set to an empty string so it doesn't + // set an empty string as a jobName (which is later used for saving the file) PrintInformation.baseName = "" } } @@ -41,47 +41,41 @@ Item anchors.left: parent.left height: UM.Theme.getSize("jobspecs_line").height - Button + UM.SimpleButton { id: printJobPencilIcon anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter width: UM.Theme.getSize("save_button_specs_icons").width height: UM.Theme.getSize("save_button_specs_icons").height - + iconSource: UM.Theme.getIcon("Pen") + hoverColor: UM.Theme.getColor("small_button_text_hover") + color: UM.Theme.getColor("small_button_text") onClicked: { printJobTextfield.selectAll() printJobTextfield.focus = true } - - style: ButtonStyle - { - background: Item - { - UM.RecolorImage - { - width: UM.Theme.getSize("save_button_specs_icons").width - height: UM.Theme.getSize("save_button_specs_icons").height - sourceSize.width: width - sourceSize.height: width - color: control.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text") - source: UM.Theme.getIcon("Pen") - } - } - } } - TextField + Cura.TextField { id: printJobTextfield anchors.left: printJobPencilIcon.right anchors.leftMargin: UM.Theme.getSize("narrow_margin").width height: UM.Theme.getSize("jobspecs_line").height - width: Math.max(__contentWidth + UM.Theme.getSize("default_margin").width, 50) + width: Math.max(contentWidth + UM.Theme.getSize("default_margin").width + 2, 50) // add two pixels to width to prevent inner text from shifting maximumLength: 120 - text: (PrintInformation === null) ? "" : PrintInformation.jobName + text: PrintInformation === null ? "" : PrintInformation.jobName horizontalAlignment: TextInput.AlignLeft + onTextChanged: + { + if (!activeFocus) + { + // Text is changed from outside, reset the cursor position. + cursorPosition = 0 + } + } property string textBeforeEdit: "" @@ -100,34 +94,25 @@ Item PrintInformation.setJobName(new_name, true) } printJobTextfield.focus = false + cursorPosition = 0 } validator: RegExpValidator { regExp: /^[^\\\/\*\?\|\[\]]*$/ } - - style: TextFieldStyle - { - textColor: UM.Theme.getColor("text_scene") - font: UM.Theme.getFont("default") - background: Rectangle - { - opacity: 0 - border.width: 0 - } - } + color: UM.Theme.getColor("text_scene") + background: Item {} + selectByMouse: true } } - Label + UM.Label { id: boundingSpec anchors.top: jobNameRow.bottom anchors.left: parent.left height: UM.Theme.getSize("jobspecs_line").height - verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("default") color: UM.Theme.getColor("text_scene") text: CuraApplication.getSceneBoundingBoxString } @@ -141,10 +126,7 @@ Item anchors.leftMargin: UM.Theme.getSize("default_margin").width } - Component.onCompleted: - { - base.addAdditionalComponents("jobSpecsButton") - } + Component.onCompleted: base.addAdditionalComponents("jobSpecsButton") Connections { diff --git a/resources/qml/LabelBar.qml b/resources/qml/LabelBar.qml index 007c5f1f54..1a4c891954 100644 --- a/resources/qml/LabelBar.qml +++ b/resources/qml/LabelBar.qml @@ -5,7 +5,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 -import UM 1.2 as UM +import UM 1.5 as UM // The labelBar shows a set of labels that are evenly spaced from one another. // The first item is aligned to the left, the last is aligned to the right. @@ -34,13 +34,10 @@ Item Layout.maximumWidth: Math.round(index + 1 === repeater.count || repeater.count <= 1 ? itemSize : base.width / (repeater.count - 1)) height: label.height - Label + UM.Label { id: label text: model[modelKey] - color: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering height: contentHeight anchors { diff --git a/resources/qml/MachineSettings/GcodeTextArea.qml b/resources/qml/MachineSettings/GcodeTextArea.qml index f8bd02de3b..7791e169c2 100644 --- a/resources/qml/MachineSettings/GcodeTextArea.qml +++ b/resources/qml/MachineSettings/GcodeTextArea.qml @@ -1,11 +1,11 @@ -// Copyright (c) 2020 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -35,44 +35,28 @@ UM.TooltipArea watchedProperties: [ "value", "description" ] } - Label // Title Label + UM.Label { id: titleLabel anchors.top: parent.top anchors.left: parent.left font: UM.Theme.getFont("medium_bold") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering } - ScrollView + Flickable { - anchors.top: titleLabel.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - - background: Rectangle + anchors { - color: UM.Theme.getColor("main_background") - anchors.fill: parent - - border.color: - { - if (!gcodeTextArea.enabled) - { - return UM.Theme.getColor("setting_control_disabled_border") - } - if (gcodeTextArea.hovered || gcodeTextArea.activeFocus) - { - return UM.Theme.getColor("setting_control_border_highlight") - } - return UM.Theme.getColor("setting_control_border") - } + top: titleLabel.bottom + topMargin: UM.Theme.getSize("default_margin").height + bottom: parent.bottom + left: parent.left + right: parent.right } - TextArea + ScrollBar.vertical: UM.ScrollBar {} + + TextArea.flickable: TextArea { id: gcodeTextArea @@ -92,6 +76,27 @@ UM.TooltipArea propertyProvider.setPropertyValue("value", text) } } + + background: Rectangle + { + anchors.fill: parent + anchors.margins: -border.width //Wrap the border around the parent. + + color: UM.Theme.getColor("detail_background") + border.color: + { + if (!gcodeTextArea.enabled) + { + return UM.Theme.getColor("setting_control_disabled_border") + } + if (gcodeTextArea.hovered || gcodeTextArea.activeFocus) + { + return UM.Theme.getColor("border_main") + } + return UM.Theme.getColor("border_field_light") + } + border.width: UM.Theme.getSize("default_lining").width + } } } } diff --git a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml index 32e0e6dcaa..51c9730052 100644 --- a/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml +++ b/resources/qml/MachineSettings/NumericTextFieldWithUnit.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -22,6 +22,7 @@ UM.TooltipArea property int controlWidth: UM.Theme.getSize("setting_control").width property int controlHeight: UM.Theme.getSize("setting_control").height + property real spacing: UM.Theme.getSize("default_margin").width text: tooltipText @@ -75,21 +76,21 @@ UM.TooltipArea { id: textFieldWithUnit anchors.left: fieldLabel.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: spacing verticalAlignment: Text.AlignVCenter + selectionColor: UM.Theme.getColor("text_selection") + selectedTextColor: UM.Theme.getColor("setting_control_text") padding: 0 leftPadding: UM.Theme.getSize("narrow_margin").width width: numericTextFieldWithUnit.controlWidth height: numericTextFieldWithUnit.controlHeight // Background is a rounded-cornered box with filled color as state indication (normal, warning, error, etc.) - background: Rectangle + background: UM.UnderlineBackground { anchors.fill: parent - anchors.margins: Math.round(UM.Theme.getSize("default_lining").width) - radius: UM.Theme.getSize("setting_control_radius").width - border.color: + liningColor: { if (!textFieldWithUnit.enabled) { @@ -108,9 +109,9 @@ UM.TooltipArea // Validation is OK. if (textFieldWithUnit.hovered || textFieldWithUnit.activeFocus) { - return UM.Theme.getColor("setting_control_border_highlight") + return UM.Theme.getColor("border_main") } - return UM.Theme.getColor("setting_control_border") + return UM.Theme.getColor("border_field_light") } color: @@ -222,7 +223,7 @@ UM.TooltipArea } } - Label + UM.Label { id: unitLabel anchors.right: parent.right @@ -230,10 +231,7 @@ UM.TooltipArea anchors.verticalCenter: parent.verticalCenter text: unitText textFormat: Text.PlainText - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering color: UM.Theme.getColor("setting_unit") - font: UM.Theme.getFont("default") } } } diff --git a/resources/qml/MainWindow/ApplicationMenu.qml b/resources/qml/MainWindow/ApplicationMenu.qml index 497c5e1541..3598447d88 100644 --- a/resources/qml/MainWindow/ApplicationMenu.qml +++ b/resources/qml/MainWindow/ApplicationMenu.qml @@ -1,13 +1,10 @@ -// 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 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import QtQuick.Layouts 1.1 -import QtQuick.Dialogs 1.2 +import QtQuick.Controls 2.4 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura import "../Menus" @@ -16,136 +13,60 @@ import "../Dialogs" Item { id: menu - width: applicationMenu.width + width: parent.width height: applicationMenu.height - property alias window: applicationMenu.window - UM.ApplicationMenu + MenuBar { id: applicationMenu + width: parent.width + height: UM.Theme.getSize("context_menu").height - FileMenu { title: catalog.i18nc("@title:menu menubar:toplevel", "&File") } - - Menu - { - title: catalog.i18nc("@title:menu menubar:toplevel", "&Edit") - - MenuItem { action: Cura.Actions.undo } - MenuItem { action: Cura.Actions.redo } - MenuSeparator { } - MenuItem { action: Cura.Actions.selectAll } - MenuItem { action: Cura.Actions.arrangeAll } - MenuItem { action: Cura.Actions.multiplySelection } - MenuItem { action: Cura.Actions.deleteSelection } - MenuItem { action: Cura.Actions.deleteAll } - MenuItem { action: Cura.Actions.resetAllTranslation } - MenuItem { action: Cura.Actions.resetAll } - MenuSeparator { } - MenuItem { action: Cura.Actions.groupObjects } - MenuItem { action: Cura.Actions.mergeObjects } - MenuItem { action: Cura.Actions.unGroupObjects } + background: Rectangle { + color: UM.Theme.getColor("background_1") } - ViewMenu { title: catalog.i18nc("@title:menu menubar:toplevel", "&View") } - - SettingsMenu + delegate: MenuBarItem { - //On MacOS, don't translate the "Settings" word. - //Qt moves the "settings" entry to a different place, and if it got renamed can't find it again when it - //attempts to delete the item upon closing the application, causing a crash. - //In the new location, these items are translated automatically according to the system's language. - //For more information, see: - //- https://doc.qt.io/qt-5/macos-issues.html#menu-bar - //- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar - title: (Qt.platform.os == "osx") ? "&Settings" : catalog.i18nc("@title:menu menubar:toplevel", "&Settings") - } + id: menuBarItem - Menu - { - id: extensionMenu - title: catalog.i18nc("@title:menu menubar:toplevel", "E&xtensions") - - Instantiator + contentItem: UM.Label { - id: extensions - model: UM.ExtensionModel { } - - Menu + text: menuBarItem.text.replace(new RegExp("&([A-Za-z])"), function (match, character) { - id: sub_menu - title: model.name; - visible: actions != null - enabled: actions != null - Instantiator - { - model: actions - Loader - { - property var extensionsModel: extensions.model - property var modelText: model.text - property var extensionName: name - - sourceComponent: modelText.trim() == "" ? extensionsMenuSeparator : extensionsMenuItem - } - - onObjectAdded: sub_menu.insertItem(index, object.item) - onObjectRemoved: sub_menu.removeItem(object.item) - } - } - - onObjectAdded: extensionMenu.insertItem(index, object) - onObjectRemoved: extensionMenu.removeItem(object) + return `<u>${character}</u>` + }) + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + } + leftPadding: UM.Theme.getSize("default_margin").width + rightPadding: UM.Theme.getSize("default_margin").width + background: Rectangle + { + + color: menuBarItem.highlighted ? UM.Theme.getColor("background_2") : "transparent" } } - Menu + FileMenu {} + EditMenu {} + ViewMenu {} + SettingsMenu { - id: preferencesMenu - - //On MacOS, don't translate the "Preferences" word. - //Qt moves the "preferences" entry to a different place, and if it got renamed can't find it again when it + //On MacOS, don't translate the "Settings" word. + //Qt moves the "settings" entry to a different place, and if it got renamed can't find it again when it //attempts to delete the item upon closing the application, causing a crash. //In the new location, these items are translated automatically according to the system's language. //For more information, see: //- https://doc.qt.io/qt-5/macos-issues.html#menu-bar //- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar - title: (Qt.platform.os == "osx") ? "&Preferences" : catalog.i18nc("@title:menu menubar:toplevel", "P&references") - - MenuItem { action: Cura.Actions.preferences } - } - - Menu - { - id: helpMenu - title: catalog.i18nc("@title:menu menubar:toplevel", "&Help") - - MenuItem { action: Cura.Actions.showProfileFolder } - MenuItem { action: Cura.Actions.showTroubleshooting} - MenuItem { action: Cura.Actions.documentation } - MenuItem { action: Cura.Actions.reportBug } - MenuSeparator { } - MenuItem { action: Cura.Actions.whatsNew } - MenuItem { action: Cura.Actions.about } - } - } - - Component - { - id: extensionsMenuItem - - MenuItem - { - text: modelText - onTriggered: extensionsModel.subMenuTriggered(extensionName, modelText) + title: (Qt.platform.os == "osx") ? "&Settings" : catalog.i18nc("@title:menu menubar:toplevel", "&Settings") } + ExtensionMenu { id: extensionMenu } + PreferencesMenu {} + HelpMenu {} } - Component - { - id: extensionsMenuSeparator - - MenuSeparator {} - } // ############################################################################################### @@ -156,18 +77,17 @@ Item { id: saveWorkspaceDialog property var args - onYes: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args) + onAccepted: UM.OutputDeviceManager.requestWriteToDevice("local_file", PrintInformation.jobName, args) } - MessageDialog + Cura.MessageDialog { id: newProjectDialog - modality: Qt.ApplicationModal + title: catalog.i18nc("@title:window", "New project") text: catalog.i18nc("@info:question", "Are you sure you want to start a new project? This will clear the build plate and any unsaved settings.") - standardButtons: StandardButton.Yes | StandardButton.No - icon: StandardIcon.Question - onYes: + standardButtons: Dialog.Yes | Dialog.No + onAccepted: { CuraApplication.resetWorkspace() Cura.Actions.resetProfile.trigger() @@ -175,11 +95,6 @@ Item } } - UM.ExtensionModel - { - id: curaExtensions - } - // ############################################################################################### // Definition of all the connections // ############################################################################################### @@ -196,13 +111,13 @@ Item } } - // show the Marketplace + // show the Toolbox Connections { - target: Cura.Actions.openMarketplace + target: Cura.Actions.browsePackages function onTriggered() { - curaExtensions.callExtensionMethod("Marketplace", "show") + extensionMenu.extensionModel.callExtensionMethod("Marketplace", "show") } } @@ -212,8 +127,8 @@ Item target: Cura.Actions.marketplaceMaterials function onTriggered() { - curaExtensions.callExtensionMethod("Marketplace", "show") - curaExtensions.callExtensionMethod("Marketplace", "setVisibleTabToMaterials") + extensionMenu.extensionModel.callExtensionMethod("Marketplace", "show") + extensionMenu.extensionModel.callExtensionMethod("Marketplace", "setVisibleTabToMaterials") } } } diff --git a/resources/qml/MainWindow/MainWindowHeader.qml b/resources/qml/MainWindow/MainWindowHeader.qml index 16d7d69062..3f22879992 100644 --- a/resources/qml/MainWindow/MainWindowHeader.qml +++ b/resources/qml/MainWindow/MainWindowHeader.qml @@ -1,12 +1,10 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2021 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 2.0 as Controls2 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.1 +import QtQuick.Controls 2.4 -import UM 1.4 as UM +import UM 1.5 as UM import Cura 1.0 as Cura import "../Account" @@ -33,6 +31,10 @@ Item sourceSize.width: width sourceSize.height: height } + ButtonGroup + { + buttons: stagesListContainer.children + } Row { @@ -61,15 +63,60 @@ Item checked: UM.Controller.activeStage !== null && model.id == UM.Controller.activeStage.stageId anchors.verticalCenter: parent.verticalCenter - exclusiveGroup: mainWindowHeaderMenuGroup - style: UM.Theme.styles.main_window_header_tab + //style: UM.Theme.styles.main_window_header_tab height: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) - iconSource: model.stage.iconSource - - property color overlayColor: "transparent" - property string overlayIconSource: "" // This id is required to find the stage buttons through Squish property string stageId: model.id + hoverEnabled: true + leftPadding: 2 * UM.Theme.getSize("default_margin").width + rightPadding: 2 * UM.Theme.getSize("default_margin").width + + // Set top & bottom padding to whatever space is left from height and the size of the text. + bottomPadding: Math.round((height - buttonLabel.contentHeight) / 2) + topPadding: bottomPadding + + background: Rectangle + { + radius: UM.Theme.getSize("action_button_radius").width + color: + { + if (stageSelectorButton.checked) + { + return UM.Theme.getColor("main_window_header_button_background_active") + } + else + { + if (stageSelectorButton.hovered) + { + return UM.Theme.getColor("main_window_header_button_background_hovered") + } + return UM.Theme.getColor("main_window_header_button_background_inactive") + } + } + } + + contentItem: UM.Label + { + id: buttonLabel + text: stageSelectorButton.text + anchors.centerIn: stageSelectorButton + font: UM.Theme.getFont("medium") + color: + { + if (stageSelectorButton.checked) + { + return UM.Theme.getColor("main_window_header_button_text_active") + } + else + { + if (stageSelectorButton.hovered) + { + return UM.Theme.getColor("main_window_header_button_text_hovered") + } + return UM.Theme.getColor("main_window_header_button_text_inactive") + } + } + } // This is a trick to assure the activeStage is correctly changed. It doesn't work properly if done in the onClicked (see CURA-6028) MouseArea @@ -79,35 +126,21 @@ Item } } } - - ExclusiveGroup { id: mainWindowHeaderMenuGroup } } - Controls2.Button + // Shortcut button to quick access the Toolbox + Button { id: marketplaceButton + text: catalog.i18nc("@action:button", "Marketplace") height: Math.round(0.5 * UM.Theme.getSize("main_window_header").height) - anchors - { - verticalCenter: parent.verticalCenter - right: applicationSwitcher.left - rightMargin: UM.Theme.getSize("default_margin").width - } + onClicked: Cura.Actions.browsePackages.trigger() hoverEnabled: true - onClicked: Cura.Actions.openMarketplace.trigger() - - contentItem: Label - { - text: "Marketplace" //Ultimaker considers this a product name, so it shouldn't be translated. - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("primary_text") - width: contentWidth - verticalAlignment: Text.AlignVCenter - } background: Rectangle { + id: marketplaceButtonBorder radius: UM.Theme.getSize("action_button_radius").width color: UM.Theme.getColor("main_window_header_background") border.width: UM.Theme.getSize("default_lining").width @@ -115,6 +148,7 @@ Item Rectangle { + id: marketplaceButtonFill anchors.fill: parent radius: parent.radius color: UM.Theme.getColor("primary_text") @@ -123,12 +157,30 @@ Item } } + contentItem: UM.Label + { + id: label + text: marketplaceButton.text + color: UM.Theme.getColor("primary_text") + width: contentWidth + } + + anchors + { + right: applicationSwitcher.left + rightMargin: UM.Theme.getSize("default_margin").width + verticalCenter: parent.verticalCenter + } + Cura.NotificationIcon { + id: marketplaceNotificationIcon anchors { - horizontalCenter: parent.right - verticalCenter: parent.top + top: parent.top + right: parent.right + rightMargin: (-0.5 * width) | 0 + topMargin: (-0.5 * height) | 0 } visible: CuraApplication.getPackageManager().packagesWithUpdate.length > 0 diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml index 85b653721f..49d6710606 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationItem.qml @@ -4,7 +4,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Button @@ -99,7 +99,7 @@ Button height: width } - Label + UM.Label { id: unknownMaterialMessage text: @@ -147,10 +147,6 @@ Button anchors.top: unknownMaterial.top wrapMode: Text.WordWrap - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - verticalAlignment: Text.AlignVCenter - linkColor: UM.Theme.getColor("text_link") onLinkActivated: { diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml index de70b0e0f4..10e2435dfc 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationListView.qml @@ -1,10 +1,10 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 2.3 -import UM 1.4 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item @@ -67,18 +67,14 @@ Item contentHeight: configurationList.height clip: true - ScrollBar.vertical.policy: (configurationList.height > maximumHeight) ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff //The AsNeeded policy also hides it when the cursor is away, and we don't want that. - ScrollBar.vertical.background: Rectangle - { - implicitWidth: UM.Theme.getSize("scrollbar").width - radius: width / 2 - color: UM.Theme.getColor("scrollbar_background") - } - ScrollBar.vertical.contentItem: Rectangle - { - implicitWidth: UM.Theme.getSize("scrollbar").width - radius: width / 2 - color: UM.Theme.getColor(parent.pressed ? "scrollbar_handle_down" : parent.hovered ? "scrollbar_handle_hover" : "scrollbar_handle") + ScrollBar.vertical: UM.ScrollBar { + parent: container.parent + anchors + { + top: parent.top + right: parent.right + bottom: parent.bottom + } } ButtonGroup diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index 37ff585a6b..f0b6e14683 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -3,10 +3,9 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 -import UM 1.4 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -19,7 +18,7 @@ Cura.ExpandablePopup id: base property var extrudersModel: CuraApplication.getExtrudersModel() - + property var activeMachine: Cura.MachineManager.activeMachine UM.I18nCatalog { id: catalog @@ -33,7 +32,7 @@ Cura.ExpandablePopup } contentPadding: UM.Theme.getSize("default_lining").width - enabled: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasMaterials || Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasVariantBuildplates : false; //Only let it drop down if there is any configuration that you could change. + enabled: activeMachine ? activeMachine.hasMaterials || activeMachine.hasVariants || activeMachine.hasVariantBuildplates : false; //Only let it drop down if there is any configuration that you could change. headerItem: Item { @@ -44,7 +43,7 @@ Cura.ExpandablePopup anchors.bottom: parent.bottom anchors.left: parent.left width: parent.width - UM.Theme.getSize("standard_arrow").width - visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasMaterials : false + visible: activeMachine ? activeMachine.hasMaterials : false Repeater { model: extrudersModel @@ -56,9 +55,9 @@ Cura.ExpandablePopup Layout.maximumWidth: Math.round(parent.width / extrudersModel.count) Layout.fillHeight: true - property var extruderStack: Cura.MachineManager.activeMachine.extruders[model.index] + property var extruderStack: activeMachine ? activeMachine.extruders[model.index]: null property bool valueWarning: !Cura.ExtruderManager.getExtruderHasQualityForMaterial(extruderStack) - property bool valueError: Cura.ContainerManager.getContainerMetaDataEntry(extruderStack.material.id, "compatible", "") != "True" + property bool valueError: activeMachine ? Cura.ContainerManager.getContainerMetaDataEntry(extruderStack.material.id, "compatible", "") != "True" : false // Extruder icon. Shows extruder index and has the same color as the active material. Cura.ExtruderIcon @@ -84,7 +83,7 @@ Cura.ExpandablePopup onExited: { tooltip.hide() } } - Cura.ToolTip + UM.ToolTip { id: tooltip x: 0 @@ -190,56 +189,49 @@ Cura.ExpandablePopup rightMargin: UM.Theme.getSize("default_margin").width } // Label for the brand of the material - Label + UM.Label { id: materialBrandNameLabel text: model.material_brand + " " + model.material_name elide: Text.ElideRight - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering + wrapMode: Text.NoWrap width: parent.width visible: !truncated } - Label + UM.Label { id: materialNameLabel text: model.material_name elide: Text.ElideRight - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering width: parent.width + wrapMode: Text.NoWrap visible: !materialBrandNameLabel.visible && !truncated } - Label + UM.Label { id: materialTypeLabel text: model.material_type elide: Text.ElideRight - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering width: parent.width + wrapMode: Text.NoWrap visible: !materialBrandNameLabel.visible && !materialNameLabel.visible } // Label that shows the name of the variant - Label + UM.Label { id: variantLabel - visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasVariants : false + visible: activeMachine ? activeMachine.hasVariants : false text: model.variant elide: Text.ElideRight + wrapMode: Text.NoWrap font: UM.Theme.getFont("default_bold") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering Layout.preferredWidth: parent.width } } @@ -248,15 +240,13 @@ Cura.ExpandablePopup } // Placeholder text if there is a configuration to select but no materials (so we can't show the materials per extruder). - Label + UM.Label { text: catalog.i18nc("@label", "Select configuration") elide: Text.ElideRight font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering - visible: Cura.MachineManager.activeMachine ? !Cura.MachineManager.activeMachine.hasMaterials && (Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasVariantBuildplates) : false + visible: activeMachine ? !activeMachine.hasMaterials && (activeMachine.hasVariants || activeMachine.hasVariantBuildplates) : false anchors { @@ -281,7 +271,7 @@ Cura.ExpandablePopup onVisibleChanged: { - is_connected = Cura.MachineManager.activeMachine.hasRemoteConnection && Cura.MachineManager.printerConnected && Cura.MachineManager.printerOutputDevices[0].uniqueConfigurations.length > 0 //Re-evaluate. + is_connected = activeMachine.hasRemoteConnection && Cura.MachineManager.printerConnected && Cura.MachineManager.printerOutputDevices[0].uniqueConfigurations.length > 0 //Re-evaluate. // If the printer is not connected or does not have configurations, we switch always to the custom mode. If is connected instead, the auto mode // or the previous state is selected diff --git a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml index 8376693ad1..4b2b84d39e 100644 --- a/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/CustomConfiguration.qml @@ -1,12 +1,14 @@ -// Copyright (c) 2019 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. +//Copyright (c) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.6 import QtQuick.Controls 2.0 -import QtQuick.Controls 1.1 as OldControls import Cura 1.0 as Cura -import UM 1.3 as UM +import UM 1.5 as UM + +// Simple button for displaying text and changes appearance for various states: enabled, valueError, valueWarning +// - and hovered. Mainly used in CustomConfiguration.qml Item { @@ -19,14 +21,13 @@ Item width: parent.width height: childrenRect.height - Label + UM.Label { id: header text: catalog.i18nc("@header", "Custom") font: UM.Theme.getFont("medium") color: UM.Theme.getColor("small_button_text") height: contentHeight - renderType: Text.NativeRendering anchors { @@ -36,7 +37,7 @@ Item } } - //Printer type selector. + // Printer type selector. Item { id: printerTypeSelectorRow @@ -56,28 +57,27 @@ Item topMargin: visible ? UM.Theme.getSize("default_margin").height : 0 } - Label + UM.Label { text: catalog.i18nc("@label", "Printer") width: Math.round(parent.width * 0.3) - UM.Theme.getSize("default_margin").width height: contentHeight - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") anchors.verticalCenter: printerTypeSelector.verticalCenter anchors.left: parent.left } - OldControls.ToolButton + Button { id: printerTypeSelector text: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.definition.name: "" - tooltip: text + height: UM.Theme.getSize("print_setup_big_item").height width: Math.round(parent.width * 0.7) + UM.Theme.getSize("default_margin").width anchors.right: parent.right - style: UM.Theme.styles.print_setup_header_button + onClicked: menu.open() + //style: UM.Theme.styles.print_setup_header_button - menu: Cura.PrinterTypeMenu { } + Cura.PrinterTypeMenu { id: menu} } } @@ -94,6 +94,7 @@ Item model: extrudersModel delegate: UM.TabRowButton { + checked: model.index == 0 contentItem: Item { Cura.ExtruderIcon @@ -208,23 +209,18 @@ Item height: visible ? UM.Theme.getSize("setting_control").height : 0 visible: extrudersModel.count > 1 // If there is only one extruder, there is no point to enable/disable that. - Label + UM.Label { text: catalog.i18nc("@label", "Enabled") - verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") height: parent.height width: selectors.textWidth - renderType: Text.NativeRendering } - OldControls.CheckBox + UM.CheckBox { id: enabledCheckbox enabled: !checked || Cura.MachineManager.numberExtrudersEnabled > 1 //Disable if it's the last enabled extruder. height: parent.height - style: UM.Theme.styles.checkbox Binding { @@ -262,18 +258,14 @@ Item height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0 visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasMaterials : false - Label + UM.Label { text: catalog.i18nc("@label", "Material") - verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") height: parent.height width: selectors.textWidth - renderType: Text.NativeRendering } - OldControls.ToolButton + Cura.PrintSetupHeaderButton { id: materialSelection @@ -286,20 +278,20 @@ Item width: selectors.controlWidth height: parent.height + anchors.verticalCenter: parent.verticalCenter + + focusPolicy: Qt.ClickFocus - style: UM.Theme.styles.print_setup_header_button - activeFocusOnPress: true Cura.MaterialMenu { id: materialsMenu + width: materialSelection.width extruderIndex: Cura.ExtruderManager.activeExtruderIndex updateModels: materialSelection.visible } - onClicked: - { - materialsMenu.popup(); - } + onClicked: materialsMenu.popup(0, height - UM.Theme.getSize("default_lining").height) } + Item { width: instructionButton.width + 2 * UM.Theme.getSize("narrow_margin").width @@ -328,37 +320,31 @@ Item height: visible ? UM.Theme.getSize("print_setup_big_item").height : 0 visible: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.hasVariants : false - Label + UM.Label { text: Cura.MachineManager.activeDefinitionVariantsName - verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") height: parent.height width: selectors.textWidth - renderType: Text.NativeRendering } - OldControls.ToolButton + Cura.PrintSetupHeaderButton { id: variantSelection text: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.variant.name : "" tooltip: text height: parent.height width: selectors.controlWidth - style: UM.Theme.styles.print_setup_header_button - activeFocusOnPress: true + anchors.verticalCenter: parent.verticalCenter + focusPolicy: Qt.ClickFocus enabled: enabledCheckbox.checked Cura.NozzleMenu { id: nozzlesMenu extruderIndex: Cura.ExtruderManager.activeExtruderIndex + width: variantSelection.width } - onClicked: - { - nozzlesMenu.popup(); - } + onClicked: nozzlesMenu.popup(0, height - UM.Theme.getSize("default_lining").height) } } @@ -372,11 +358,10 @@ Item property bool buildplateCompatibilityWarning: Cura.MachineManager.variantBuildplateUsable // This is a space holder aligning the warning messages. - Label + UM.Label { text: "" width: selectors.textWidth - renderType: Text.NativeRendering } Item @@ -397,19 +382,15 @@ Item visible: !Cura.MachineManager.isCurrentSetupSupported || warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning } - Label + UM.Label { id: materialCompatibilityLabel anchors.left: warningImage.right anchors.leftMargin: UM.Theme.getSize("default_margin").width - verticalAlignment: Text.AlignVCenter width: selectors.controlWidth - warningImage.width - UM.Theme.getSize("default_margin").width text: catalog.i18nc("@label", "Use glue for better adhesion with this material combination.") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") visible: CuraSDKVersion == "dev" ? false : warnings.buildplateCompatibilityError || warnings.buildplateCompatibilityWarning wrapMode: Text.WordWrap - renderType: Text.NativeRendering } } } diff --git a/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml b/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml index f93727ea96..06ef0901e7 100644 --- a/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml +++ b/resources/qml/Menus/ConfigurationMenu/PrintCoreConfiguration.qml @@ -4,7 +4,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item @@ -33,30 +33,24 @@ Item margins: UM.Theme.getSize("default_margin").width } - Label + UM.Label { text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct. - renderType: Text.NativeRendering elide: Text.ElideRight - font: UM.Theme.getFont("default") color: UM.Theme.getColor("text_inactive") width: parent.width } - Label + UM.Label { text: (printCoreConfiguration !== null && printCoreConfiguration.material.brand) ? printCoreConfiguration.material.name : " " //Use space so that the height is still correct. - renderType: Text.NativeRendering elide: Text.ElideRight font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") width: parent.width } - Label + UM.Label { text: (printCoreConfiguration !== null && printCoreConfiguration.hotendID) ? printCoreConfiguration.hotendID : " " //Use space so that the height is still correct. - renderType: Text.NativeRendering elide: Text.ElideRight - font: UM.Theme.getFont("default") color: UM.Theme.getColor("text_inactive") width: parent.width } diff --git a/resources/qml/Menus/ContextMenu.qml b/resources/qml/Menus/ContextMenu.qml index 1709d70ab5..1bba79e2c1 100644 --- a/resources/qml/Menus/ContextMenu.qml +++ b/resources/qml/Menus/ContextMenu.qml @@ -1,15 +1,14 @@ -// Copyright (c) 2016 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Dialogs 1.2 +import QtQuick.Controls 2.1 import QtQuick.Window 2.1 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { id: base @@ -18,17 +17,25 @@ Menu property var multiBuildPlateModel: CuraApplication.getMultiBuildPlateModel() // Selection-related actions. - MenuItem { action: Cura.Actions.centerSelection; } - MenuItem { action: Cura.Actions.deleteSelection; } - MenuItem { action: Cura.Actions.multiplySelection; } + Cura.MenuItem { action: Cura.Actions.centerSelection; } + Cura.MenuItem { action: Cura.Actions.deleteSelection; } + Cura.MenuItem { action: Cura.Actions.multiplySelection; } // Extruder selection - only visible if there is more than 1 extruder - MenuSeparator { visible: base.shouldShowExtruders } - MenuItem { id: extruderHeader; text: catalog.i18ncp("@label", "Print Selected Model With:", "Print Selected Models With:", UM.Selection.selectionCount); enabled: false; visible: base.shouldShowExtruders } + Cura.MenuSeparator { visible: base.shouldShowExtruders } + Cura.MenuItem + { + id: extruderHeader + text: catalog.i18ncp("@label", "Print Selected Model With:", "Print Selected Models With:", UM.Selection.selectionCount) + enabled: false + visible: base.shouldShowExtruders + } + Instantiator { model: CuraApplication.getExtrudersModel() - MenuItem { + Cura.MenuItem + { text: "%1: %2 - %3".arg(model.name).arg(model.material).arg(model.variant) visible: base.shouldShowExtruders enabled: UM.Selection.hasSelection && model.enabled @@ -37,60 +44,30 @@ Menu onTriggered: CuraActions.setExtruderForSelection(model.id) shortcut: "Ctrl+" + (model.index + 1) } - onObjectAdded: base.insertItem(index, object) + // Add it to the fifth position (and above) as we want it to be added after the extruder header. + onObjectAdded: base.insertItem(index + 5, object) onObjectRemoved: base.removeItem(object) } - MenuSeparator { - visible: UM.Preferences.getValue("cura/use_multi_build_plate") - } - - Instantiator - { - model: base.multiBuildPlateModel - MenuItem { - enabled: UM.Selection.hasSelection - text: base.multiBuildPlateModel.getItem(index).name; - onTriggered: CuraActions.setBuildPlateForSelection(base.multiBuildPlateModel.getItem(index).buildPlateNumber); - checkable: true - checked: base.multiBuildPlateModel.selectionBuildPlates.indexOf(base.multiBuildPlateModel.getItem(index).buildPlateNumber) != -1; - visible: UM.Preferences.getValue("cura/use_multi_build_plate") - } - onObjectAdded: base.insertItem(index, object); - onObjectRemoved: base.removeItem(object); - } - - MenuItem { - enabled: UM.Selection.hasSelection - text: "New build plate"; - onTriggered: { - CuraActions.setBuildPlateForSelection(base.multiBuildPlateModel.maxBuildPlate + 1); - checked = false; - } - checkable: true - checked: false - visible: UM.Preferences.getValue("cura/use_multi_build_plate") - } - // Global actions - MenuSeparator {} - MenuItem { action: Cura.Actions.selectAll; } - MenuItem { action: Cura.Actions.arrangeAll; } - MenuItem { action: Cura.Actions.deleteAll; } - MenuItem { action: Cura.Actions.reloadAll; } - MenuItem { action: Cura.Actions.resetAllTranslation; } - MenuItem { action: Cura.Actions.resetAll; } + Cura.MenuSeparator {} + Cura.MenuItem { action: Cura.Actions.selectAll } + Cura.MenuItem { action: Cura.Actions.arrangeAll } + Cura.MenuItem { action: Cura.Actions.deleteAll } + Cura.MenuItem { action: Cura.Actions.reloadAll } + Cura.MenuItem { action: Cura.Actions.resetAllTranslation } + Cura.MenuItem { action: Cura.Actions.resetAll } // Group actions - MenuSeparator {} - MenuItem { action: Cura.Actions.groupObjects; } - MenuItem { action: Cura.Actions.mergeObjects; } - MenuItem { action: Cura.Actions.unGroupObjects; } + Cura.MenuSeparator {} + Cura.MenuItem { action: Cura.Actions.groupObjects } + Cura.MenuItem { action: Cura.Actions.mergeObjects } + Cura.MenuItem { action: Cura.Actions.unGroupObjects } Connections { target: UM.Controller - function onContextMenuRequested() { base.popup(); } + function onContextMenuRequested() { base.popup() } } Connections @@ -108,69 +85,56 @@ Menu watchedProperties: [ "value" ] } - Dialog + UM.Dialog { id: multiplyDialog - modality: Qt.ApplicationModal title: catalog.i18ncp("@title:window", "Multiply Selected Model", "Multiply Selected Models", UM.Selection.selectionCount) + width: UM.Theme.getSize("small_popup_dialog").width + height: UM.Theme.getSize("small_popup_dialog").height + minimumWidth: UM.Theme.getSize("small_popup_dialog").width + minimumHeight: UM.Theme.getSize("small_popup_dialog").height onAccepted: CuraActions.multiplySelection(copiesField.value) - signal reset() - onReset: - { - copiesField.value = 1; - copiesField.focus = true; - } - - onVisibleChanged: - { - copiesField.forceActiveFocus(); - } + buttonSpacing: UM.Theme.getSize("thin_margin").width - standardButtons: StandardButton.Ok | StandardButton.Cancel + rightButtons: + [ + Cura.SecondaryButton + { + text: "Cancel" + onClicked: multiplyDialog.reject() + }, + Cura.PrimaryButton + { + text: "Ok" + onClicked: multiplyDialog.accept() + } + ] Row { spacing: UM.Theme.getSize("default_margin").width - Label + UM.Label { text: catalog.i18nc("@label", "Number of Copies") anchors.verticalCenter: copiesField.verticalCenter + width: contentWidth + wrapMode: Text.NoWrap } - SpinBox + Cura.SpinBox { id: copiesField + editable: true focus: true - minimumValue: 1 - maximumValue: 99 + from: 1 + to: 99 + width: 2 * UM.Theme.getSize("button").width } } } - - // Find the index of an item in the list of child items of this menu. - // - // This is primarily intended as a helper function so we do not have to - // hard-code the position of the extruder selection actions. - // - // \param item The item to find the index of. - // - // \return The index of the item or -1 if it was not found. - function findItemIndex(item) - { - for(var i in base.items) - { - if(base.items[i] == item) - { - return i; - } - } - return -1; - } - - UM.I18nCatalog { id: catalog; name: "cura" } } diff --git a/resources/qml/Menus/EditMenu.qml b/resources/qml/Menus/EditMenu.qml new file mode 100644 index 0000000000..522c6b27d1 --- /dev/null +++ b/resources/qml/Menus/EditMenu.qml @@ -0,0 +1,28 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 2.1 + +import UM 1.6 as UM +import Cura 1.0 as Cura + +Cura.Menu +{ + title: catalog.i18nc("@title:menu menubar:toplevel", "&Edit") + + Cura.MenuItem { action: Cura.Actions.undo } + Cura.MenuItem { action: Cura.Actions.redo } + Cura.MenuSeparator { } + Cura.MenuItem { action: Cura.Actions.selectAll } + Cura.MenuItem { action: Cura.Actions.arrangeAll } + Cura.MenuItem { action: Cura.Actions.multiplySelection } + Cura.MenuItem { action: Cura.Actions.deleteSelection } + Cura.MenuItem { action: Cura.Actions.deleteAll } + Cura.MenuItem { action: Cura.Actions.resetAllTranslation } + Cura.MenuItem { action: Cura.Actions.resetAll } + Cura.MenuSeparator { } + Cura.MenuItem { action: Cura.Actions.groupObjects } + Cura.MenuItem { action: Cura.Actions.mergeObjects } + Cura.MenuItem { action: Cura.Actions.unGroupObjects } +}
\ No newline at end of file diff --git a/resources/qml/Menus/ExtensionMenu.qml b/resources/qml/Menus/ExtensionMenu.qml new file mode 100644 index 0000000000..3c2d1a79c7 --- /dev/null +++ b/resources/qml/Menus/ExtensionMenu.qml @@ -0,0 +1,64 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.7 +import QtQuick.Controls 2.4 + +import UM 1.5 as UM +import Cura 1.0 as Cura + +Cura.Menu +{ + id: extensionMenu + title: catalog.i18nc("@title:menu menubar:toplevel", "E&xtensions") + property var extensionModel: UM.ExtensionModel { } + Component + { + id: extensionsMenuItem + + Cura.MenuItem + { + text: modelText + onTriggered: extensionsModel.subMenuTriggered(extensionName, modelText) + } + } + + Component + { + id: extensionsMenuSeparator + + Cura.MenuSeparator {} + } + + Instantiator + { + id: extensions + model: extensionModel + + Cura.Menu + { + id: sub_menu + title: model.name + shouldBeVisible: actions !== undefined + enabled: actions != null + Instantiator + { + model: actions + Loader + { + property var extensionsModel: extensions.model + property var modelText: model.text + property var extensionName: name + + sourceComponent: modelText.trim() == "" ? extensionsMenuSeparator : extensionsMenuItem + } + + onObjectAdded: sub_menu.insertItem(index, object.item) + onObjectRemoved: sub_menu.removeItem(object.item) + } + } + + onObjectAdded: extensionMenu.insertMenu(index, object) + onObjectRemoved: extensionMenu.removeMenu(object) + } +}
\ No newline at end of file diff --git a/resources/qml/Menus/FileMenu.qml b/resources/qml/Menus/FileMenu.qml index 681e0b06ce..338ada60fc 100644 --- a/resources/qml/Menus/FileMenu.qml +++ b/resources/qml/Menus/FileMenu.qml @@ -1,46 +1,49 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 +import QtQuick.Controls 2.1 import UM 1.6 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { id: base title: catalog.i18nc("@title:menu menubar:toplevel", "&File") property var fileProviderModel: CuraApplication.getFileProviderModel() - MenuItem + + Cura.MenuItem { id: newProjectMenu action: Cura.Actions.newProject } - MenuItem + Cura.MenuItem { id: openMenu action: Cura.Actions.open - visible: (base.fileProviderModel.count == 1) + visible: base.fileProviderModel.count == 1 + enabled: base.fileProviderModel.count == 1 } OpenFilesMenu { id: openFilesMenu - visible: (base.fileProviderModel.count > 1) + + shouldBeVisible: base.fileProviderModel.count > 1 } RecentFilesMenu { } - MenuItem + Cura.MenuItem { id: saveWorkspaceMenu - shortcut: visible ? StandardKey.Save : "" + shortcut: StandardKey.Save text: catalog.i18nc("@title:menu menubar:file", "&Save Project...") visible: saveProjectMenu.model.count == 1 - enabled: UM.WorkspaceFileHandler.enabled + enabled: UM.WorkspaceFileHandler.enabled && saveProjectMenu.model.count == 1 onTriggered: { var args = { "filter_by_machine": false, "file_type": "workspace", "preferred_mimetypes": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml" }; @@ -62,13 +65,13 @@ Menu { id: saveProjectMenu model: projectOutputDevicesModel - visible: model.count > 1 + shouldBeVisible: model.count > 1 enabled: UM.WorkspaceFileHandler.enabled } - MenuSeparator { } + Cura.MenuSeparator { } - MenuItem + Cura.MenuItem { id: saveAsMenu text: catalog.i18nc("@title:menu menubar:file", "&Export...") @@ -79,24 +82,24 @@ Menu } } - MenuItem + Cura.MenuItem { id: exportSelectionMenu text: catalog.i18nc("@action:inmenu menubar:file", "Export Selection...") enabled: UM.Selection.hasSelection - iconName: "document-save-as" + icon.name: "document-save-as" onTriggered: UM.OutputDeviceManager.requestWriteSelectionToDevice("local_file", PrintInformation.jobName, { "filter_by_machine": false, "preferred_mimetypes": "application/vnd.ms-package.3dmanufacturing-3dmodel+xml"}) } - MenuSeparator { } + Cura.MenuSeparator { } - MenuItem + Cura.MenuItem { id: reloadAllMenu action: Cura.Actions.reloadAll } - MenuSeparator { } + Cura.MenuSeparator { } - MenuItem { action: Cura.Actions.quit } + Cura.MenuItem { action: Cura.Actions.quit } } diff --git a/resources/qml/Menus/HelpMenu.qml b/resources/qml/Menus/HelpMenu.qml new file mode 100644 index 0000000000..4be25fdffe --- /dev/null +++ b/resources/qml/Menus/HelpMenu.qml @@ -0,0 +1,23 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.7 +import QtQuick.Controls 2.4 + +import UM 1.5 as UM +import Cura 1.0 as Cura + + +Cura.Menu +{ + id: helpMenu + title: catalog.i18nc("@title:menu menubar:toplevel", "&Help") + + Cura.MenuItem { action: Cura.Actions.showProfileFolder } + Cura.MenuItem { action: Cura.Actions.showTroubleshooting} + Cura.MenuItem { action: Cura.Actions.documentation } + Cura.MenuItem { action: Cura.Actions.reportBug } + Cura.MenuSeparator { } + Cura.MenuItem { action: Cura.Actions.whatsNew } + Cura.MenuItem { action: Cura.Actions.about } +}
\ No newline at end of file diff --git a/resources/qml/Menus/LocalPrinterMenu.qml b/resources/qml/Menus/LocalPrinterMenu.qml deleted file mode 100644 index bd6c57d744..0000000000 --- a/resources/qml/Menus/LocalPrinterMenu.qml +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.2 -import QtQuick.Controls 1.4 - -import UM 1.2 as UM -import Cura 1.0 as Cura - -Instantiator -{ - model: Cura.GlobalStacksModel {} - - MenuItem - { - text: model.name - checkable: true - checked: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id == model.id: false - exclusiveGroup: group - visible: !model.hasRemoteConnection - onTriggered: Cura.MachineManager.setActiveMachine(model.id) - } - onObjectAdded: menu.insertItem(index, object) - onObjectRemoved: menu.removeItem(object) -} diff --git a/resources/qml/Menus/MaterialMenu.qml b/resources/qml/Menus/MaterialMenu.qml index b4f15fad00..e6d7fbc3e9 100644 --- a/resources/qml/Menus/MaterialMenu.qml +++ b/resources/qml/Menus/MaterialMenu.qml @@ -1,15 +1,15 @@ -//Copyright (c) 2020 Ultimaker B.V. -//Cura is released under the terms of the LGPLv3 or higher. +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 +import QtQuick.Controls 2.4 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { - id: menu + id: materialMenu title: catalog.i18nc("@label:category menu label", "Material") property int extruderIndex: 0 @@ -25,55 +25,54 @@ Menu } property bool isActiveExtruderEnabled: (activeExtruder === null || activeExtruder === undefined) ? false : activeExtruder.isEnabled - property string activeMaterialId: (activeExtruder === null || activeExtruder === undefined) ? false : activeExtruder.material.id - + property string activeMaterialId: (activeExtruder === null || activeExtruder === undefined) ? "" : activeExtruder.material.id property bool updateModels: true Cura.FavoriteMaterialsModel { id: favoriteMaterialsModel - extruderPosition: menu.extruderIndex + extruderPosition: materialMenu.extruderIndex enabled: updateModels } Cura.GenericMaterialsModel { id: genericMaterialsModel - extruderPosition: menu.extruderIndex + extruderPosition: materialMenu.extruderIndex enabled: updateModels } Cura.MaterialBrandsModel { id: brandModel - extruderPosition: menu.extruderIndex + extruderPosition: materialMenu.extruderIndex enabled: updateModels } - MenuItem + Cura.MenuItem { text: catalog.i18nc("@label:category menu label", "Favorites") enabled: false visible: favoriteMaterialsModel.items.length > 0 } + Instantiator { model: favoriteMaterialsModel - delegate: MenuItem + delegate: Cura.MenuItem { text: model.brand + " " + model.name checkable: true enabled: isActiveExtruderEnabled - checked: model.root_material_id === menu.currentRootMaterialId + checked: model.root_material_id === materialMenu.currentRootMaterialId onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node) - exclusiveGroup: favoriteGroup // One favorite and one item from the others can be active at the same time. } - onObjectAdded: menu.insertItem(index, object) - onObjectRemoved: menu.removeItem(index) + onObjectAdded: materialMenu.insertItem(index + 1, object) + onObjectRemoved: materialMenu.removeItem(index) } - MenuSeparator {} + Cura.MenuSeparator { visible: favoriteMaterialsModel.items.length > 0} - Menu + Cura.Menu { id: genericMenu title: catalog.i18nc("@label:category menu label", "Generic") @@ -81,13 +80,12 @@ Menu Instantiator { model: genericMaterialsModel - delegate: MenuItem + delegate: Cura.MenuItem { text: model.name checkable: true enabled: isActiveExtruderEnabled - checked: model.root_material_id === menu.currentRootMaterialId - exclusiveGroup: group + checked: model.root_material_id === materialMenu.currentRootMaterialId onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node) } onObjectAdded: genericMenu.insertItem(index, object) @@ -95,12 +93,12 @@ Menu } } - MenuSeparator {} + Cura.MenuSeparator {} Instantiator { model: brandModel - Menu + Cura.Menu { id: brandMenu title: brandName @@ -110,7 +108,7 @@ Menu Instantiator { model: brandMaterials - delegate: Menu + delegate: Cura.Menu { id: brandMaterialsMenu title: materialName @@ -120,47 +118,37 @@ Menu Instantiator { model: brandMaterialColors - delegate: MenuItem + delegate: Cura.MenuItem { text: model.name checkable: true enabled: isActiveExtruderEnabled - checked: model.id === menu.activeMaterialId - exclusiveGroup: group + checked: model.id === materialMenu.activeMaterialId + onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node) } onObjectAdded: brandMaterialsMenu.insertItem(index, object) onObjectRemoved: brandMaterialsMenu.removeItem(object) } } - onObjectAdded: brandMenu.insertItem(index, object) - onObjectRemoved: brandMenu.removeItem(object) + onObjectAdded: brandMenu.insertMenu(index, object) + onObjectRemoved: brandMenu.removeMenu(object) } } - onObjectAdded: menu.insertItem(index, object) - onObjectRemoved: menu.removeItem(object) - } - - ExclusiveGroup - { - id: group - } - - ExclusiveGroup - { - id: favoriteGroup + onObjectAdded: materialMenu.insertMenu(index + 4, object) + onObjectRemoved: materialMenu.removeMenu(object) } - MenuSeparator {} + Cura.MenuSeparator {} - MenuItem + Cura.MenuItem { action: Cura.Actions.manageMaterials } - MenuSeparator {} + Cura.MenuSeparator {} - MenuItem + Cura.MenuItem { action: Cura.Actions.marketplaceMaterials } diff --git a/resources/qml/Menus/NetworkPrinterMenu.qml b/resources/qml/Menus/NetworkPrinterMenu.qml deleted file mode 100644 index 845159f3b2..0000000000 --- a/resources/qml/Menus/NetworkPrinterMenu.qml +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.2 -import QtQuick.Controls 1.4 - -import UM 1.2 as UM -import Cura 1.0 as Cura - -Instantiator -{ - model: Cura.GlobalStacksModel {} - MenuItem - { - property string connectGroupName: - { - if("group_name" in model.metadata) - { - return model.metadata["group_name"] - } - return "" - } - text: connectGroupName - checkable: true - visible: model.hasRemoteConnection - checked: Cura.MachineManager.activeMachineNetworkGroupName == connectGroupName - exclusiveGroup: group - onTriggered: Cura.MachineManager.setActiveMachine(model.id) - } - onObjectAdded: menu.insertItem(index, object) - onObjectRemoved: menu.removeItem(object) -} diff --git a/resources/qml/Menus/NozzleMenu.qml b/resources/qml/Menus/NozzleMenu.qml index 3ec48ab302..b320a02a5e 100644 --- a/resources/qml/Menus/NozzleMenu.qml +++ b/resources/qml/Menus/NozzleMenu.qml @@ -1,15 +1,15 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 1.4 +import QtQuick.Controls 2.4 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { - id: menu + id: nozzleMenu title: "Nozzle" property int extruderIndex: 0 @@ -23,38 +23,34 @@ Menu { model: nozzleModel - MenuItem + Cura.MenuItem { text: model.hotend_name checkable: true - checked: { - var activeMachine = Cura.MachineManager.activeMachine + property var activeMachine: Cura.MachineManager.activeMachine + checked: + { if (activeMachine === null) { return false } - var extruder = Cura.MachineManager.activeMachine.extruderList[extruderIndex] + var extruder = activeMachine.extruderList[extruderIndex] return (extruder === undefined) ? false : (extruder.variant.name == model.hotend_name) } - exclusiveGroup: group enabled: { - var activeMachine = Cura.MachineManager.activeMachine if (activeMachine === null) { return false } - var extruder = Cura.MachineManager.activeMachine.extruderList[extruderIndex] + var extruder = activeMachine.extruderList[extruderIndex] return (extruder === undefined) ? false : extruder.isEnabled } - onTriggered: { - Cura.MachineManager.setVariant(menu.extruderIndex, model.container_node); - } + onTriggered: Cura.MachineManager.setVariant(nozzleMenu.extruderIndex, model.container_node) } - onObjectAdded: menu.insertItem(index, object); - onObjectRemoved: menu.removeItem(object); + onObjectAdded: nozzleMenu.insertItem(index, object) + onObjectRemoved: nozzleMenu.removeItem(object) } - ExclusiveGroup { id: group } } diff --git a/resources/qml/Menus/OpenFilesMenu.qml b/resources/qml/Menus/OpenFilesMenu.qml index 25f474c1d6..de5ab00c76 100644 --- a/resources/qml/Menus/OpenFilesMenu.qml +++ b/resources/qml/Menus/OpenFilesMenu.qml @@ -1,30 +1,26 @@ -// Copyright (c) 2020 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 +import QtQuick.Controls 2.1 import UM 1.6 as UM import Cura 1.0 as Cura import "../Dialogs" -Menu +Cura.Menu { id: openFilesMenu title: catalog.i18nc("@title:menu menubar:file", "Open File(s)...") - iconName: "document-open-recent"; Instantiator { id: fileProviders model: CuraApplication.getFileProviderModel() - MenuItem + Cura.MenuItem { - text: - { - return model.displayText; - } + text: model.displayText onTriggered: { if (model.index == 0) // The 0th element is the "From Disk" option, which should activate the open local file dialog @@ -36,11 +32,10 @@ Menu CuraApplication.getFileProviderModel().trigger(model.name); } } - // Unassign the shortcuts when the submenu is invisible (i.e. when there is only one file provider) to avoid ambiguous shortcuts. - // When there is a single file provider, the openAction is assigned with the Ctrl+O shortcut instead. - shortcut: openFilesMenu.visible ? model.shortcut : "" + shortcut: model.shortcut } onObjectAdded: openFilesMenu.insertItem(index, object) + onObjectRemoved: openFilesMenu.removeItem(object) } } diff --git a/resources/qml/Menus/PreferencesMenu.qml b/resources/qml/Menus/PreferencesMenu.qml new file mode 100644 index 0000000000..3a6dd4b2ce --- /dev/null +++ b/resources/qml/Menus/PreferencesMenu.qml @@ -0,0 +1,25 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.7 +import QtQuick.Controls 2.4 + +import UM 1.5 as UM +import Cura 1.0 as Cura + +Cura.Menu +{ + id: preferencesMenu + + //On MacOS, don't translate the "Preferences" word. + //Qt moves the "preferences" entry to a different place, and if it got renamed can't find it again when it + //attempts to delete the item upon closing the application, causing a crash. + //In the new location, these items are translated automatically according to the system's language. + //For more information, see: + //- https://doc.qt.io/qt-5/macos-issues.html#menu-bar + //- https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar + title: (Qt.platform.os == "osx") ? "&Preferences" : catalog.i18nc("@title:menu menubar:toplevel", "P&references") + + Cura.MenuItem { action: Cura.Actions.preferences } +} + diff --git a/resources/qml/Menus/PrinterMenu.qml b/resources/qml/Menus/PrinterMenu.qml index 741d927c13..9f0e0575b0 100644 --- a/resources/qml/Menus/PrinterMenu.qml +++ b/resources/qml/Menus/PrinterMenu.qml @@ -1,61 +1,77 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 +import QtQuick.Controls 2.4 -import UM 1.2 as UM +import UM 1.6 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { id: menu -// TODO Enable custom style to the menu -// style: MenuStyle -// { -// frame: Rectangle -// { -// color: "white" -// } -// } - - MenuItem + title: catalog.i18nc("@title:menu menubar:settings", "&Printer") + Cura.MenuItem { + id: networkEnabledPrinterItem text: catalog.i18nc("@label:category menu label", "Network enabled printers") enabled: false - visible: networkPrinterMenu.count > 0 + visible: networKPrinterInstantiator.count > 0 } - NetworkPrinterMenu + Instantiator { - id: networkPrinterMenu + id: networKPrinterInstantiator + model: Cura.GlobalStacksModel {filterOnlineOnly: true } + Cura.MenuItem + { + property string connectGroupName: + { + if("group_name" in model.metadata) + { + return model.metadata["group_name"] + } + return "" + } + text: connectGroupName + checkable: true + checked: Cura.MachineManager.activeMachineNetworkGroupName == connectGroupName + onTriggered: Cura.MachineManager.setActiveMachine(model.id) + } + onObjectAdded: menu.insertItem(2, object) + onObjectRemoved: menu.removeItem(object) } - MenuSeparator - { - visible: networkPrinterMenu.count > 0 - } + Cura.MenuSeparator { visible: networKPrinterInstantiator.count > 0 } - MenuItem + Cura.MenuItem { + id: localPrinterMenu text: catalog.i18nc("@label:category menu label", "Local printers") enabled: false - visible: localPrinterMenu.count > 0 + visible: localPrinterInstantiator.count > 0 } - LocalPrinterMenu + Instantiator { - id: localPrinterMenu - } - - ExclusiveGroup { id: group; } + id: localPrinterInstantiator + model: Cura.GlobalStacksModel {} - MenuSeparator - { - visible: localPrinterMenu.count > 0 + Cura.MenuItem + { + text: model.name + checkable: true + checked: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id == model.id: false + visible: !model.hasRemoteConnection + onTriggered: Cura.MachineManager.setActiveMachine(model.id) + } + // A bit hackish, but we have 2 items at the end, put them before that + onObjectAdded: menu.insertItem(menu.count - 2, object) + onObjectRemoved: menu.removeItem(object) } - MenuItem { action: Cura.Actions.addMachine; } - MenuItem { action: Cura.Actions.configureMachines; } + Cura.MenuSeparator { visible: localPrinterInstantiator.count > 0 } + + Cura.MenuItem { action: Cura.Actions.addMachine } + Cura.MenuItem { action: Cura.Actions.configureMachines } } diff --git a/resources/qml/Menus/PrinterTypeMenu.qml b/resources/qml/Menus/PrinterTypeMenu.qml index c2a09e0efd..17986ac1b8 100644 --- a/resources/qml/Menus/PrinterTypeMenu.qml +++ b/resources/qml/Menus/PrinterTypeMenu.qml @@ -2,12 +2,12 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 +import QtQuick.Controls 2.4 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { id: menu title: "Printer type" @@ -18,12 +18,11 @@ Menu id: printerTypeInstantiator model: outputDevice != null ? outputDevice.connectedPrintersTypeCount : [] - MenuItem + Cura.MenuItem { text: modelData.machine_type checkable: true checked: Cura.MachineManager.activeMachine.definition.name == modelData.machine_type - exclusiveGroup: group onTriggered: { Cura.MachineManager.switchPrinterType(modelData.machine_type) @@ -32,6 +31,4 @@ Menu onObjectAdded: menu.insertItem(index, object) onObjectRemoved: menu.removeItem(object) } - - ExclusiveGroup { id: group } } diff --git a/resources/qml/Menus/RecentFilesMenu.qml b/resources/qml/Menus/RecentFilesMenu.qml index de6d2e3817..8f4f328927 100644 --- a/resources/qml/Menus/RecentFilesMenu.qml +++ b/resources/qml/Menus/RecentFilesMenu.qml @@ -1,26 +1,26 @@ -// 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.2 -import QtQuick.Controls 1.1 +import QtQuick.Controls 2.1 import UM 1.3 as UM import Cura 1.0 as Cura import "../Dialogs" -Menu +Cura.Menu { id: menu title: catalog.i18nc("@title:menu menubar:file", "Open &Recent") - iconName: "document-open-recent"; + //iconName: "document-open-recent"; enabled: CuraApplication.recentFiles.length > 0; Instantiator { model: CuraApplication.recentFiles - MenuItem + Cura.MenuItem { text: { @@ -32,9 +32,4 @@ Menu onObjectAdded: menu.insertItem(index, object) onObjectRemoved: menu.removeItem(object) } - - Cura.AskOpenAsProjectOrModelsDialog - { - id: askOpenAsProjectOrModelsDialog - } } diff --git a/resources/qml/Menus/SaveProjectMenu.qml b/resources/qml/Menus/SaveProjectMenu.qml index afc6008717..16d54382d1 100644 --- a/resources/qml/Menus/SaveProjectMenu.qml +++ b/resources/qml/Menus/SaveProjectMenu.qml @@ -1,15 +1,15 @@ -// 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.2 -import QtQuick.Controls 1.1 +import QtQuick.Controls 2.1 -import UM 1.6 as UM +import UM 1.5 as UM import Cura 1.1 as Cura import "../Dialogs" -Menu +Cura.Menu { id: saveProjectMenu title: catalog.i18nc("@title:menu menubar:file", "Save Project...") @@ -18,7 +18,7 @@ Menu Instantiator { id: projectOutputDevices - MenuItem + Cura.MenuItem { text: model.name onTriggered: @@ -40,9 +40,8 @@ Menu UM.OutputDeviceManager.requestWriteToDevice(model.id, PrintInformation.jobName, args) } } - // Unassign the shortcuts when the submenu is invisible (i.e. when there is only one project output device) to avoid ambiguous shortcuts. - // When there is only the LocalFileOutputDevice, the Ctrl+S shortcut is assigned to the saveWorkspaceMenu MenuItem - shortcut: saveProjectMenu.visible ? model.shortcut : "" + shortcut: model.shortcut + enabled: saveProjectMenu.shouldBeVisible } onObjectAdded: saveProjectMenu.insertItem(index, object) onObjectRemoved: saveProjectMenu.removeItem(object) @@ -53,6 +52,6 @@ Menu id: saveWorkspaceDialog property var args property var deviceId - onYes: UM.OutputDeviceManager.requestWriteToDevice(deviceId, PrintInformation.jobName, args) + onAccepted: UM.OutputDeviceManager.requestWriteToDevice(deviceId, PrintInformation.jobName, args) } } diff --git a/resources/qml/Menus/SettingsMenu.qml b/resources/qml/Menus/SettingsMenu.qml index 939ade5847..25bee871f5 100644 --- a/resources/qml/Menus/SettingsMenu.qml +++ b/resources/qml/Menus/SettingsMenu.qml @@ -2,70 +2,76 @@ //Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.4 +import QtQuick.Controls 2.4 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { id: base title: catalog.i18nc("@title:menu menubar:toplevel", "&Settings") - PrinterMenu { title: catalog.i18nc("@title:menu menubar:settings", "&Printer") } + PrinterMenu { } property var activeMachine: Cura.MachineManager.activeMachine Instantiator { id: extruderInstantiator model: activeMachine == null ? null : activeMachine.extruderList - Menu + Cura.Menu { title: modelData.name property var extruder: (base.activeMachine === null) ? null : activeMachine.extruderList[model.index] - NozzleMenu { title: Cura.MachineManager.activeDefinitionVariantsName; visible: Cura.MachineManager.activeMachine.hasVariants; extruderIndex: index } + NozzleMenu + { + title: Cura.MachineManager.activeDefinitionVariantsName + shouldBeVisible: activeMachine.hasVariants + extruderIndex: index + } MaterialMenu { title: catalog.i18nc("@title:menu", "&Material") - visible: Cura.MachineManager.activeMachine.hasMaterials + shouldBeVisible: activeMachine.hasMaterials extruderIndex: index updateModels: false onAboutToShow: updateModels = true onAboutToHide: updateModels = false } - MenuSeparator + Cura.MenuSeparator { visible: Cura.MachineManager.activeMachine.hasVariants || Cura.MachineManager.activeMachine.hasMaterials } - MenuItem + Cura.MenuItem { text: catalog.i18nc("@action:inmenu", "Set as Active Extruder") onTriggered: Cura.ExtruderManager.setActiveExtruderIndex(model.index) } - MenuItem + Cura.MenuItem { text: catalog.i18nc("@action:inmenu", "Enable Extruder") onTriggered: Cura.MachineManager.setExtruderEnabled(model.index, true) visible: (extruder === null || extruder === undefined) ? false : !extruder.isEnabled + height: visible ? implicitHeight: 0 } - MenuItem + Cura.MenuItem { text: catalog.i18nc("@action:inmenu", "Disable Extruder") onTriggered: Cura.MachineManager.setExtruderEnabled(index, false) visible: (extruder === null || extruder === undefined) ? false : extruder.isEnabled enabled: Cura.MachineManager.numberExtrudersEnabled > 1 + height: visible ? implicitHeight: 0 } - } - onObjectAdded: base.insertItem(index, object) - onObjectRemoved: base.removeItem(object) + onObjectAdded: base.insertMenu(index, object) + onObjectRemoved: base.removeMenu(object) } - MenuSeparator { } + Cura.MenuSeparator { } - MenuItem { action: Cura.Actions.configureSettingVisibility } + Cura.MenuItem { action: Cura.Actions.configureSettingVisibility } }
\ No newline at end of file diff --git a/resources/qml/Menus/ViewMenu.qml b/resources/qml/Menus/ViewMenu.qml index c46e9a9f08..059455c72c 100644 --- a/resources/qml/Menus/ViewMenu.qml +++ b/resources/qml/Menus/ViewMenu.qml @@ -2,33 +2,34 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 +import QtQuick.Controls 2.1 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura -Menu +Cura.Menu { - title: catalog.i18nc("@title:menu menubar:toplevel", "&View") id: base + title: catalog.i18nc("@title:menu menubar:toplevel", "&View") - property var multiBuildPlateModel: CuraApplication.getMultiBuildPlateModel() - - Menu + Cura.Menu { - title: catalog.i18nc("@action:inmenu menubar:view","&Camera position"); - MenuItem { action: Cura.Actions.view3DCamera; } - MenuItem { action: Cura.Actions.viewFrontCamera; } - MenuItem { action: Cura.Actions.viewTopCamera; } - MenuItem { action: Cura.Actions.viewBottomCamera; } - MenuItem { action: Cura.Actions.viewLeftSideCamera; } - MenuItem { action: Cura.Actions.viewRightSideCamera; } + title: catalog.i18nc("@action:inmenu menubar:view", "&Camera position") + Cura.MenuItem { action: Cura.Actions.view3DCamera } + Cura.MenuItem { action: Cura.Actions.viewFrontCamera } + Cura.MenuItem { action: Cura.Actions.viewTopCamera } + Cura.MenuItem { action: Cura.Actions.viewBottomCamera } + Cura.MenuItem { action: Cura.Actions.viewLeftSideCamera } + Cura.MenuItem { action: Cura.Actions.viewRightSideCamera } } - Menu + Cura.Menu { id: cameraViewMenu + + title: catalog.i18nc("@action:inmenu menubar:view", "Camera view") property string cameraMode: UM.Preferences.getValue("general/camera_perspective_mode") + Connections { target: UM.Preferences @@ -42,8 +43,7 @@ Menu } } - title: catalog.i18nc("@action:inmenu menubar:view","Camera view") - MenuItem + Cura.MenuItem { text: catalog.i18nc("@action:inmenu menubar:view", "Perspective") checkable: true @@ -52,9 +52,9 @@ Menu { UM.Preferences.setValue("general/camera_perspective_mode", "perspective") } - exclusiveGroup: group } - MenuItem + + Cura.MenuItem { text: catalog.i18nc("@action:inmenu menubar:view", "Orthographic") checkable: true @@ -63,45 +63,12 @@ Menu { UM.Preferences.setValue("general/camera_perspective_mode", "orthographic") } - exclusiveGroup: group - } - ExclusiveGroup { id: group } - } - - MenuSeparator - { - visible: UM.Preferences.getValue("cura/use_multi_build_plate") - } - - Menu - { - id: buildPlateMenu; - title: catalog.i18nc("@action:inmenu menubar:view","&Build plate") - visible: UM.Preferences.getValue("cura/use_multi_build_plate") - Instantiator - { - model: base.multiBuildPlateModel - MenuItem - { - text: base.multiBuildPlateModel.getItem(index).name; - onTriggered: Cura.SceneController.setActiveBuildPlate(base.multiBuildPlateModel.getItem(index).buildPlateNumber) - checkable: true - checked: base.multiBuildPlateModel.getItem(index).buildPlateNumber == base.multiBuildPlateModel.activeBuildPlate - exclusiveGroup: buildPlateGroup - visible: UM.Preferences.getValue("cura/use_multi_build_plate") - } - onObjectAdded: buildPlateMenu.insertItem(index, object) - onObjectRemoved: buildPlateMenu.removeItem(object) - } - ExclusiveGroup - { - id: buildPlateGroup } } - MenuSeparator {} + Cura.MenuSeparator {} - MenuItem + Cura.MenuItem { action: Cura.Actions.toggleFullScreen } diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 40da10dc46..a9ad8e811e 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -1,18 +1,14 @@ -//Copyright (c) 2018 Ultimaker B.V. +//Copyright (c) 2022 Ultimaker B.V. //Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Dialogs 1.1 -import QtQuick.Layouts 1.1 -import UM 1.1 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item { - id: base; + id: base UM.I18nCatalog { id: catalog; name: "cura"} height: childrenRect.height + UM.Theme.getSize("thick_margin").height @@ -159,7 +155,7 @@ Item } } - Label + UM.Label { id: statusLabel width: parent.width - 2 * UM.Theme.getSize("thick_margin").width @@ -172,7 +168,7 @@ Item text: statusText } - Label + UM.Label { id: percentageLabel anchors.top: parent.top @@ -184,22 +180,22 @@ Item visible: showProgress } - ProgressBar + UM.ProgressBar { - id: progressBar; - minimumValue: 0; - maximumValue: 100; - value: 0; + id: progressBar + from: 0 + to: 100 + value: 0 //Doing this in an explicit binding since the implicit binding breaks on occasion. Binding { - target: progressBar; - property: "value"; - value: base.progress; + target: progressBar + property: "value" + value: base.progress } - visible: showProgress; + visible: showProgress indeterminate: { if(!printerConnected) @@ -219,17 +215,15 @@ Item return false; } } - style: UM.Theme.styles.progressbar; - - property string backgroundColor: UM.Theme.getColor("progressbar_background"); - property string controlColor: base.statusColor; + property string backgroundColor: UM.Theme.getColor("progressbar_background") + property string controlColor: base.statusColor - width: parent.width - 2 * UM.Theme.getSize("thick_margin").width; - height: UM.Theme.getSize("progressbar").height; - anchors.top: statusLabel.bottom; - anchors.topMargin: Math.round(UM.Theme.getSize("thick_margin").height / 4); - anchors.left: parent.left; - anchors.leftMargin: UM.Theme.getSize("thick_margin").width; + width: parent.width - 2 * UM.Theme.getSize("thick_margin").width + height: UM.Theme.getSize("progressbar").height + anchors.top: statusLabel.bottom + anchors.topMargin: Math.round(UM.Theme.getSize("thick_margin").height / 4) + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("thick_margin").width } Row @@ -266,7 +260,7 @@ Item } } - Button + Cura.SecondaryButton { id: pauseResumeButton @@ -309,11 +303,9 @@ Item activePrintJob.setState("pause"); } } - - style: UM.Theme.styles.print_setup_action_button } - Button + Cura.SecondaryButton { id: abortButton @@ -324,21 +316,17 @@ Item height: UM.Theme.getSize("save_button_save_to_button").height text: catalog.i18nc("@label", "Abort Print") - onClicked: confirmationDialog.visible = true - - style: UM.Theme.styles.print_setup_action_button + onClicked: confirmationDialog.open() } - MessageDialog + Cura.MessageDialog { id: confirmationDialog title: catalog.i18nc("@window:title", "Abort print") - icon: StandardIcon.Warning text: catalog.i18nc("@label", "Are you sure you want to abort the print?") - standardButtons: StandardButton.Yes | StandardButton.No - Component.onCompleted: visible = false - onYes: activePrintJob.setState("abort") + standardButtons: Cura.MessageDialog.Yes | Cura.MessageDialog.No + onAccepted: activePrintJob.setState("abort") } } } diff --git a/resources/qml/ObjectItemButton.qml b/resources/qml/ObjectItemButton.qml index 23c11dd430..c3066b800d 100644 --- a/resources/qml/ObjectItemButton.qml +++ b/resources/qml/ObjectItemButton.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.1 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Button @@ -56,7 +56,7 @@ Button visible: showExtruderSwatches && extruderColor != "" } - Label + UM.Label { id: buttonText anchors @@ -67,12 +67,9 @@ Button verticalCenter: parent.verticalCenter } text: objectItemButton.text - font: UM.Theme.getFont("default") color: UM.Theme.getColor("text_scene") opacity: (outsideBuildArea) ? 0.5 : 1.0 visible: text != "" - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } @@ -85,7 +82,7 @@ Button right: parent.right rightMargin: 0 } - width: contentItem.width + width: meshTypeIcon.width + perObjectSettingsCountLabel.width + UM.Theme.getSize("narrow_margin").width height: parent.height padding: 0 leftPadding: UM.Theme.getSize("thin_margin").width @@ -134,7 +131,7 @@ Button contentItem: Item { height: parent.height - width: meshTypeIcon.width + perObjectSettingsCountLabel.width + UM.Theme.getSize("narrow_margin").width + width: perObjectSettingsInfo.width Cura.NotificationIcon { @@ -191,7 +188,7 @@ Button elideWidth: buttonText.width } - Cura.ToolTip + UM.ToolTip { id: tooltip tooltipText: objectItemButton.text + perObjectSettingsInfo.tooltipText diff --git a/resources/qml/ObjectSelector.qml b/resources/qml/ObjectSelector.qml index 0cdc2b3f80..db68ff6c03 100644 --- a/resources/qml/ObjectSelector.qml +++ b/resources/qml/ObjectSelector.qml @@ -1,10 +1,10 @@ -// Copyright (c) 2020 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item @@ -51,15 +51,13 @@ Item source: objectSelector.opened ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleUp") } - Label + UM.Label { id: label anchors.left: openCloseIcon.right anchors.leftMargin: UM.Theme.getSize("default_margin").width text: catalog.i18nc("@label", "Object list") - font: UM.Theme.getFont("default") color: openCloseButton.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text") - renderType: Text.NativeRendering elide: Text.ElideRight } } @@ -78,7 +76,7 @@ Item id: contents width: parent.width visible: objectSelector.opened - height: visible ? listView.height : 0 + height: visible ? listView.height + border.width * 2 : 0 color: UM.Theme.getColor("main_background") border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("lining") @@ -101,22 +99,21 @@ Item ListView { id: listView - clip: true anchors { left: parent.left right: parent.right + top: parent.top margins: UM.Theme.getSize("default_lining").width } + property real maximumHeight: UM.Theme.getSize("objects_menu_size").height + height: Math.min(contentHeight, maximumHeight) - ScrollBar.vertical: ScrollBar + ScrollBar.vertical: UM.ScrollBar { - hoverEnabled: true + id: scrollBar } - - property real maximumHeight: UM.Theme.getSize("objects_menu_size").height - - height: Math.min(contentHeight, maximumHeight) + clip: true model: Cura.ObjectsModel {} @@ -130,7 +127,7 @@ Item value: model.selected } text: model.name - width: listView.width + width: listView.width - scrollBar.width property bool outsideBuildArea: model.outside_build_area property int perObjectSettingsCount: model.per_object_settings_count property string meshType: model.mesh_type diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index ccdd5efcf3..c4200e2351 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -2,11 +2,8 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 1.1 +import QtQuick.Controls 2.15 import QtQuick.Layouts 1.1 -import QtQuick.Controls.Styles 1.1 - -import QtQuick.Controls 2.3 as NewControls import UM 1.5 as UM import Cura 1.1 as Cura @@ -17,7 +14,7 @@ UM.PreferencesPage title: catalog.i18nc("@title:tab", "General") id: generalPreferencesPage - width: parent.width + width: parent ? parent.width: 0 function setDefaultLanguage(languageCode) { @@ -103,14 +100,14 @@ UM.PreferencesPage invertZoomCheckbox.checked = boolCheck(UM.Preferences.getValue("view/invert_zoom")) UM.Preferences.resetPreference("view/zoom_to_mouse"); zoomToMouseCheckbox.checked = boolCheck(UM.Preferences.getValue("view/zoom_to_mouse")) - UM.Preferences.resetPreference("view/top_layer_count"); - topLayerCountCheckbox.checked = boolCheck(UM.Preferences.getValue("view/top_layer_count")) + //UM.Preferences.resetPreference("view/top_layer_count"); + //topLayerCountCheckbox.checked = boolCheck(UM.Preferences.getValue("view/top_layer_count")) UM.Preferences.resetPreference("general/restore_window_geometry") restoreWindowPositionCheckbox.checked = boolCheck(UM.Preferences.getValue("general/restore_window_geometry")) UM.Preferences.resetPreference("general/camera_perspective_mode") - var defaultCameraMode = UM.Preferences.getValue("general/camera_perspective_mode") - setDefaultCameraMode(defaultCameraMode) + //var defaultCameraMode = UM.Preferences.getValue("general/camera_perspective_mode") +// /setDefaultCameraMode(defaultCameraMode) UM.Preferences.resetPreference("cura/choice_on_profile_override") setDefaultDiscardOrKeepProfile(UM.Preferences.getValue("cura/choice_on_profile_override")) @@ -128,33 +125,60 @@ UM.PreferencesPage pluginNotificationsUpdateCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_plugin_update_check")) } + buttons: [ + Cura.SecondaryButton + { + text: catalog.i18nc("@action:button", "Defaults") + onClicked: reset() + } + ] ScrollView { id: preferencesScrollView width: parent.width height: parent.height + ScrollBar.vertical: UM.ScrollBar + { + id: preferencesScrollBar + parent: preferencesScrollView.parent + anchors + { + top: parent.top + bottom: parent.bottom + right: parent.right + } + + onPositionChanged: { + // This removes focus from items when scrolling. + // This fixes comboboxes staying open and scrolling container + if (!activeFocus) { + forceActiveFocus(); + } + } + } + Column { UM.I18nCatalog{id: catalog; name: "cura"} - width: preferencesScrollView.viewport.width + width: preferencesScrollView.width - preferencesScrollBar.width - Label + UM.Label { - font.bold: true + font: UM.Theme.getFont("medium_bold") text: catalog.i18nc("@label", "Interface") } GridLayout { id: interfaceGrid - columns: 4 + columns: 2 width: parent.width - Label + UM.Label { id: languageLabel - text: "Language:" //Don't translate this, to make it easier to find the language drop-down if you can't read the current language. + text: "Language*:" //Don't translate this, to make it easier to find the language drop-down if you can't read the current language. } ListModel @@ -193,13 +217,14 @@ UM.PreferencesPage } } - NewControls.ComboBox + Cura.ComboBox { id: languageComboBox textRole: "text" model: languageList - Layout.fillWidth: true + implicitWidth: UM.Theme.getSize("combobox").width + implicitHeight: currencyField.height function setCurrentIndex() { var code = UM.Preferences.getValue("general/language"); @@ -214,7 +239,9 @@ UM.PreferencesPage currentIndex: setCurrentIndex() - onActivated: if (model.get(index).code != "") + onActivated: + { + if (model.get(index).code != "") { UM.Preferences.setValue("general/language", model.get(index).code); } @@ -222,25 +249,28 @@ UM.PreferencesPage { currentIndex = setCurrentIndex(); } + } } - Label + UM.Label { id: currencyLabel text: catalog.i18nc("@label", "Currency:") } - TextField + Cura.TextField { id: currencyField + selectByMouse: true text: UM.Preferences.getValue("cura/currency") + implicitWidth: UM.Theme.getSize("combobox").width onTextChanged: UM.Preferences.setValue("cura/currency", text) } - Label + UM.Label { id: themeLabel - text: catalog.i18nc("@label","Theme:") + text: catalog.i18nc("@label: Please keep the asterix, it's to indicate that a restart is needed.", "Theme*:") } ListModel @@ -256,13 +286,14 @@ UM.PreferencesPage } } - NewControls.ComboBox + Cura.ComboBox { id: themeComboBox model: themeList textRole: "text" - Layout.fillWidth: true + implicitWidth: UM.Theme.getSize("combobox").width + implicitHeight: currencyField.height currentIndex: { @@ -280,23 +311,6 @@ UM.PreferencesPage } } - Label - { - id: languageCaption - - //: Language change warning - text: catalog.i18nc("@label", "You will need to restart the application for these changes to have effect.") - wrapMode: Text.WordWrap - font.italic: true - } - - Item - { - //: Spacer - height: UM.Theme.getSize("default_margin").height - width: UM.Theme.getSize("default_margin").width - } - UM.TooltipArea { width: childrenRect.width; @@ -314,6 +328,16 @@ UM.PreferencesPage } } + UM.Label + { + id: languageCaption + + //: Language change warning + text: catalog.i18nc("@label", "*You will need to restart the application for these changes to have effect.") + wrapMode: Text.WordWrap + font.italic: true + } + Item { //: Spacer @@ -321,9 +345,9 @@ UM.PreferencesPage width: UM.Theme.getSize("default_margin").width } - Label + UM.Label { - font.bold: true + font: UM.Theme.getFont("medium_bold") text: catalog.i18nc("@label", "Viewport behavior") } @@ -516,9 +540,9 @@ UM.PreferencesPage text: catalog.i18nc("@info:tooltip", "What type of camera rendering should be used?") Column { - spacing: 4 * screenScaleFactor + spacing: UM.Theme.getSize("narrow_margin").height - Label + UM.Label { text: catalog.i18nc("@window:text", "Camera rendering:") } @@ -532,12 +556,14 @@ UM.PreferencesPage } } - NewControls.ComboBox + Cura.ComboBox { id: cameraComboBox model: comboBoxList textRole: "text" + width: UM.Theme.getSize("combobox").width + height: UM.Theme.getSize("combobox").height currentIndex: { @@ -563,9 +589,9 @@ UM.PreferencesPage width: UM.Theme.getSize("default_margin").height } - Label + UM.Label { - font.bold: true + font: UM.Theme.getFont("medium_bold") text: catalog.i18nc("@label","Opening and saving files") } @@ -579,6 +605,7 @@ UM.PreferencesPage { id: singleInstanceCheckbox text: catalog.i18nc("@option:check","Use a single instance of Cura") + checked: boolCheck(UM.Preferences.getValue("cura/single_instance")) onCheckedChanged: UM.Preferences.setValue("cura/single_instance", checked) } @@ -682,17 +709,18 @@ UM.PreferencesPage Column { - spacing: 4 * screenScaleFactor + spacing: UM.Theme.getSize("narrow_margin").height - Label + UM.Label { text: catalog.i18nc("@window:text", "Default behavior when opening a project file: ") } - NewControls.ComboBox + Cura.ComboBox { id: choiceOnOpenProjectDropDownButton - width: Math.round(250 * screenScaleFactor) + width: UM.Theme.getSize("combobox").width + height: UM.Theme.getSize("combobox").height model: ListModel { @@ -736,31 +764,31 @@ UM.PreferencesPage UM.TooltipArea { - width: childrenRect.width; - height: childrenRect.height; + width: childrenRect.width + height: childrenRect.height text: catalog.i18nc("@info:tooltip", "When you have made changes to a profile and switched to a different one, a dialog will be shown asking whether you want to keep your modifications or not, or you can choose a default behaviour and never show that dialog again.") Column { - spacing: 4 * screenScaleFactor + spacing: UM.Theme.getSize("narrow_margin").height - Label + UM.Label { - font.bold: true + font: UM.Theme.getFont("medium_bold") text: catalog.i18nc("@label", "Profiles") } - Label + UM.Label { text: catalog.i18nc("@window:text", "Default behavior for changed setting values when switching to a different profile: ") } - NewControls.ComboBox + Cura.ComboBox { id: choiceOnProfileOverrideDropDownButton - width: Math.round(250 * screenScaleFactor) - popup.width: Math.round(350 * screenScaleFactor) + width: UM.Theme.getSize("combobox_wide").width + height: UM.Theme.getSize("combobox_wide").height model: ListModel { id: discardOrKeepProfileListModel @@ -800,9 +828,9 @@ UM.PreferencesPage width: UM.Theme.getSize("default_margin").height } - Label + UM.Label { - font.bold: true + font: UM.Theme.getFont("medium_bold") text: catalog.i18nc("@label", "Privacy") } UM.TooltipArea @@ -819,15 +847,18 @@ UM.PreferencesPage onCheckedChanged: UM.Preferences.setValue("info/send_slice_info", checked) } - Button + + UM.SimpleButton { - id: showMoreInfo - anchors.top: sendDataCheckbox.bottom - text: catalog.i18nc("@action:button", "More information") - onClicked: - { - CuraApplication.showMoreInformationDialogForAnonymousDataCollection(); - } + onClicked: CuraApplication.showMoreInformationDialogForAnonymousDataCollection() + iconSource: UM.Theme.getIcon("Information") + anchors.left: sendDataCheckbox.right + anchors.verticalCenter: sendDataCheckbox.verticalCenter + hoverBackgroundColor: UM.Theme.getColor("secondary_button_hover") + backgroundRadius: width / 2 + height: UM.Theme.getSize("small_button_icon").height + color: UM.Theme.getColor("small_button_text") + width: height } } @@ -838,9 +869,9 @@ UM.PreferencesPage width: UM.Theme.getSize("default_margin").height } - Label + UM.Label { - font.bold: true + font: UM.Theme.getFont("medium_bold") text: catalog.i18nc("@label", "Updates") } @@ -859,7 +890,12 @@ UM.PreferencesPage } } - ExclusiveGroup { id: curaUpdatesGroup } + ButtonGroup + { + id: curaUpdatesGroup + buttons: [checkUpdatesOptionBeta, checkUpdatesOptionStable] + } + UM.TooltipArea { width: childrenRect.width @@ -867,10 +903,10 @@ UM.PreferencesPage text: catalog.i18nc("@info:tooltip", "When checking for updates, only check for stable releases.") anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width - RadioButton + Cura.RadioButton { + id: checkUpdatesOptionStable text: catalog.i18nc("@option:radio", "Stable releases only") - exclusiveGroup: curaUpdatesGroup enabled: checkUpdatesCheckbox.checked checked: UM.Preferences.getValue("info/latest_update_source") == "stable" onClicked: UM.Preferences.setValue("info/latest_update_source", "stable") @@ -883,10 +919,10 @@ UM.PreferencesPage text: catalog.i18nc("@info:tooltip", "When checking for updates, check for both stable and for beta releases.") anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width - RadioButton + Cura.RadioButton { + id: checkUpdatesOptionBeta text: catalog.i18nc("@option:radio", "Stable and Beta releases") - exclusiveGroup: curaUpdatesGroup enabled: checkUpdatesCheckbox.checked checked: UM.Preferences.getValue("info/latest_update_source") == "beta" onClicked: UM.Preferences.setValue("info/latest_update_source", "beta") diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index a8b64f94a4..93a35ff9bb 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -1,25 +1,35 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 +import QtQuick.Controls 2.1 import QtQuick.Window 2.1 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura UM.ManagementPage { - id: base; + id: base + + title: catalog.i18nc("@title:tab", "Printers") + detailsPlaneCaption: base.currentItem && base.currentItem.name ? base.currentItem.name : "" - title: catalog.i18nc("@title:tab", "Printers"); model: Cura.GlobalStacksModel { } sectionRole: "discoverySource" activeId: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id: "" activeIndex: activeMachineIndex() + onHamburgeButtonClicked: { + const hamburerButtonHeight = hamburger_button.height; + menu.popup(hamburger_button, -menu.width + hamburger_button.width / 2, hamburger_button.height); + // for some reason the height of the hamburger changes when opening the popup + // reset height to initial heigt + hamburger_button.height = hamburerButtonHeight; + } + hamburgerButtonVisible: Cura.MachineManager.activeMachine !== null function activeMachineIndex() { @@ -34,87 +44,46 @@ UM.ManagementPage } buttons: [ - Button + Cura.SecondaryButton { - id: activateMenuButton - text: catalog.i18nc("@action:button", "Activate"); - iconName: "list-activate"; - enabled: base.currentItem != null && base.currentItem.id != Cura.MachineManager.activeMachine.id - onClicked: Cura.MachineManager.setActiveMachine(base.currentItem.id) - }, - Button - { - id: addMenuButton - text: catalog.i18nc("@action:button", "Add"); - iconName: "list-add"; + text: catalog.i18nc("@action:button", "Add New") onClicked: Cura.Actions.addMachine.trigger() - }, - Button - { - id: removeMenuButton - text: catalog.i18nc("@action:button", "Remove"); - iconName: "list-remove"; - enabled: base.currentItem != null && model.count > 1 - onClicked: confirmDialog.open(); - }, - Button - { - id: renameMenuButton - text: catalog.i18nc("@action:button", "Rename"); - iconName: "edit-rename"; - enabled: base.currentItem != null && base.currentItem.metadata.group_name == null - onClicked: renameDialog.open(); } ] - Item + Flow { - visible: base.currentItem != null + visible: base.currentItem != null && currentItem && currentItem.id == Cura.MachineManager.activeMachine.id anchors.fill: parent + spacing: UM.Theme.getSize("default_margin").height - Label + Repeater { - id: machineName - text: base.currentItem && base.currentItem.name ? base.currentItem.name : "" - font: UM.Theme.getFont("large_bold") - width: parent.width - elide: Text.ElideRight - } + id: machineActionRepeater + model: base.currentItem ? Cura.MachineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id)) : null - Flow - { - id: machineActions - visible: currentItem && currentItem.id == Cura.MachineManager.activeMachine.id - anchors.left: parent.left - anchors.right: parent.right - anchors.top: machineName.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - - Repeater + Item { - id: machineActionRepeater - model: base.currentItem ? Cura.MachineActionManager.getSupportedActions(Cura.MachineManager.getDefinitionByMachineId(base.currentItem.id)) : null - - Item + width: Math.round(childrenRect.width + 2 * screenScaleFactor) + height: childrenRect.height + Cura.SecondaryButton { - width: Math.round(childrenRect.width + 2 * screenScaleFactor) - height: childrenRect.height - Button + text: machineActionRepeater.model[index].label + onClicked: { - text: machineActionRepeater.model[index].label - onClicked: - { - var currentItem = machineActionRepeater.model[index] - actionDialog.loader.manager = currentItem - actionDialog.loader.source = currentItem.qmlPath - actionDialog.title = currentItem.label - actionDialog.show() - } + var currentItem = machineActionRepeater.model[index] + actionDialog.loader.manager = currentItem + actionDialog.loader.source = currentItem.qmlPath + actionDialog.title = currentItem.label + actionDialog.show() } } } } + } + Item + { UM.Dialog { id: actionDialog @@ -122,12 +91,6 @@ UM.ManagementPage minimumHeight: UM.Theme.getSize("modal_window_minimum").height maximumWidth: minimumWidth * 3 maximumHeight: minimumHeight * 3 - rightButtons: Button - { - text: catalog.i18nc("@action:button", "Close") - iconName: "dialog-close" - onClicked: actionDialog.reject() - } } UM.I18nCatalog { id: catalog; name: "cura"; } @@ -136,8 +99,9 @@ UM.ManagementPage { id: confirmDialog object: base.currentItem && base.currentItem.name ? base.currentItem.name : "" - text: base.currentItem ? base.currentItem.removalWarning : ""; - onYes: + text: base.currentItem ? base.currentItem.removalWarning : "" + + onAccepted: { Cura.MachineManager.removeMachine(base.currentItem.id) if(!base.currentItem) @@ -149,20 +113,43 @@ UM.ManagementPage } } - UM.RenameDialog + Cura.RenameDialog { - id: renameDialog; - object: base.currentItem && base.currentItem.name ? base.currentItem.name : ""; + id: renameDialog + object: base.currentItem && base.currentItem.name ? base.currentItem.name : "" property var machine_name_validator: Cura.MachineNameValidator { } - validName: renameDialog.newName.match(renameDialog.machine_name_validator.machineNameRegex) != null; + validName: renameDialog.newName.match(renameDialog.machine_name_validator.machineNameRegex) != null onAccepted: { - Cura.MachineManager.renameMachine(base.currentItem.id, newName.trim()); + Cura.MachineManager.renameMachine(base.currentItem.id, newName.trim()) //Force updating currentItem and the details panel objectList.onCurrentIndexChanged() } } + Cura.Menu + { + id: menu + Cura.MenuItem + { + text: catalog.i18nc("@action:button", "Activate") + enabled: base.currentItem != null && base.currentItem.id != Cura.MachineManager.activeMachine.id + onTriggered: Cura.MachineManager.setActiveMachine(base.currentItem.id) + } + Cura.MenuItem + { + text: catalog.i18nc("@action:button", "Remove") + enabled: base.currentItem != null && model.count > 1 + onTriggered: confirmDialog.open() + } + Cura.MenuItem + { + text: catalog.i18nc("@action:button", "Rename") + enabled: base.currentItem != null && base.currentItem.metadata.group_name == null + onTriggered: renameDialog.open() + } + } + Connections { target: Cura.MachineManager @@ -172,6 +159,5 @@ UM.ManagementPage objectList.onCurrentIndexChanged() } } - } } diff --git a/resources/qml/Preferences/Materials/MaterialsBrandSection.qml b/resources/qml/Preferences/Materials/MaterialsBrandSection.qml index 04e39f33b1..9f7eeccc54 100644 --- a/resources/qml/Preferences/Materials/MaterialsBrandSection.qml +++ b/resources/qml/Preferences/Materials/MaterialsBrandSection.qml @@ -1,112 +1,60 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 -import QtQuick.Dialogs 1.2 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura // An expandable list of materials. Includes both the header (this file) and the items (brandMaterialList) -Item +Column { id: brand_section - property var sectionName: "" + property string sectionName: "" property var elementsModel // This can be a MaterialTypesModel or GenericMaterialsModel or FavoriteMaterialsModel - property var hasMaterialTypes: true // It indicates whether it has material types or not - property var expanded: materialList.expandedBrands.indexOf(sectionName) > -1 - - height: childrenRect.height + property bool hasMaterialTypes: true // It indicates whether it has material types or not + property bool expanded: materialList.expandedBrands.indexOf(sectionName) !== -1 width: parent.width - Rectangle - { - id: brand_header_background - color: - { - if(!expanded && sectionName == materialList.currentBrand) - { - return UM.Theme.getColor("favorites_row_selected") - } - else - { - return UM.Theme.getColor("favorites_header_bar") - } - } - anchors.fill: brand_header - } - Row + + Cura.CategoryButton { - id: brand_header width: parent.width - Label + labelText: sectionName + height: UM.Theme.getSize("preferences_page_list_item").height + labelFont: UM.Theme.getFont("default_bold") + expanded: brand_section.expanded + onClicked: { - id: brand_name - text: sectionName - height: UM.Theme.getSize("favorites_row").height - width: parent.width - UM.Theme.getSize("favorites_button").width - verticalAlignment: Text.AlignVCenter - leftPadding: (UM.Theme.getSize("default_margin").width / 2) | 0 - } - Item - { - implicitWidth: UM.Theme.getSize("favorites_button").width - implicitHeight: UM.Theme.getSize("favorites_button").height - UM.RecolorImage - { - anchors - { - verticalCenter: parent.verticalCenter - horizontalCenter: parent.horizontalCenter - } - width: UM.Theme.getSize("standard_arrow").width - height: UM.Theme.getSize("standard_arrow").height - color: "black" - source: brand_section.expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft") - } - } - } - MouseArea - { - anchors.fill: brand_header - onPressed: - { - const i = materialList.expandedBrands.indexOf(sectionName) - if (i > -1) + const i = materialList.expandedBrands.indexOf(sectionName); + if (i !== -1) { - // Remove it - materialList.expandedBrands.splice(i, 1) - brand_section.expanded = false + materialList.expandedBrands.splice(i, 1); // remove } else { - // Add it - materialList.expandedBrands.push(sectionName) - brand_section.expanded = true + materialList.expandedBrands.push(sectionName); // add } UM.Preferences.setValue("cura/expanded_brands", materialList.expandedBrands.join(";")); } } + Column { id: brandMaterialList - anchors.top: brand_header.bottom width: parent.width - anchors.left: parent ? parent.left : undefined - height: brand_section.expanded ? childrenRect.height : 0 visible: brand_section.expanded Repeater { model: elementsModel + delegate: Loader { - id: loader - width: parent ? parent.width : 0 + width: parent.width property var element: model sourceComponent: hasMaterialTypes ? materialsTypeSection : materialSlot } @@ -119,6 +67,7 @@ Item MaterialsTypeSection { materialType: element + indented: true } } @@ -141,7 +90,7 @@ Item return; } - expanded = materialList.expandedBrands.indexOf(sectionName) > -1 + brand_section.expanded = materialList.expandedBrands.indexOf(sectionName) !== -1; } } } diff --git a/resources/qml/Preferences/Materials/MaterialsDetailsPanel.qml b/resources/qml/Preferences/Materials/MaterialsDetailsPanel.qml index e821dfb955..bb9e732800 100644 --- a/resources/qml/Preferences/Materials/MaterialsDetailsPanel.qml +++ b/resources/qml/Preferences/Materials/MaterialsDetailsPanel.qml @@ -1,13 +1,11 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.3 -import QtQuick.Dialogs 1.2 +import QtQuick.Controls 2.4 -import UM 1.2 as UM -import Cura 1.0 as Cura +import UM 1.5 as UM +import Cura 1.5 as Cura Item { @@ -52,71 +50,44 @@ Item materialProperties.approximate_diameter = currentItem.approximate_diameter || "0" } - Item + // Material detailed information view below the title Label + MaterialsView { + id: materialDetailsView anchors.fill: parent + editingEnabled: currentItem != null && !currentItem.is_read_only + onResetSelectedMaterial: base.resetExpandedActiveMaterial() - Item // Material title Label - { - id: profileName - - width: parent.width - height: childrenRect.height - - Label { - width: parent.width - text: materialProperties.name - font: UM.Theme.getFont("large_bold") - elide: Text.ElideRight - } - } - - MaterialsView // Material detailed information view below the title Label - { - id: materialDetailsView - anchors - { - left: parent.left - right: parent.right - top: profileName.bottom - topMargin: UM.Theme.getSize("default_margin").height - bottom: parent.bottom - } - - editingEnabled: currentItem != null && !currentItem.is_read_only - onResetSelectedMaterial: base.resetExpandedActiveMaterial() - - properties: materialProperties - containerId: currentItem != null ? currentItem.id : "" - currentMaterialNode: currentItem.container_node - } - - QtObject - { - id: materialProperties - - property string guid: "00000000-0000-0000-0000-000000000000" - property string container_id: "Unknown"; - property string name: "Unknown"; - property string profile_type: "Unknown"; - property string brand: "Unknown"; - property string material: "Unknown"; // This needs to be named as "material" to be consistent with - // the material container's metadata entry - - property string color_name: "Yellow"; - property color color_code: "yellow"; - - property real density: 0.0; - property real diameter: 0.0; - property string approximate_diameter: "0"; - - property real spool_cost: 0.0; - property real spool_weight: 0.0; - property real spool_length: 0.0; - property real cost_per_meter: 0.0; + properties: materialProperties + containerId: currentItem != null ? currentItem.id : "" + currentMaterialNode: currentItem != null ? currentItem.container_node: null + } - property string description: ""; - property string adhesion_info: ""; - } + QtObject + { + id: materialProperties + + property string guid: "00000000-0000-0000-0000-000000000000" + property string container_id: "Unknown"; + property string name: "Unknown"; + property string profile_type: "Unknown"; + property string brand: "Unknown"; + property string material: "Unknown"; // This needs to be named as "material" to be consistent with + // the material container's metadata entry + + property string color_name: "Yellow"; + property color color_code: "yellow"; + + property real density: 0.0; + property real diameter: 0.0; + property string approximate_diameter: "0"; + + property real spool_cost: 0.0; + property real spool_weight: 0.0; + property real spool_length: 0.0; + property real cost_per_meter: 0.0; + + property string description: ""; + property string adhesion_info: ""; } -}
\ No newline at end of file +} diff --git a/resources/qml/Preferences/Materials/MaterialsList.qml b/resources/qml/Preferences/Materials/MaterialsList.qml index 3173fbd680..bb40187825 100644 --- a/resources/qml/Preferences/Materials/MaterialsList.qml +++ b/resources/qml/Preferences/Materials/MaterialsList.qml @@ -1,11 +1,9 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 -import QtQuick.Dialogs 1.2 import UM 1.2 as UM import Cura 1.0 as Cura @@ -16,7 +14,6 @@ Item height: childrenRect.height // Children - UM.I18nCatalog { id: catalog; name: "cura"; } Cura.MaterialBrandsModel { id: materialsModel diff --git a/resources/qml/Preferences/Materials/MaterialsPage.qml b/resources/qml/Preferences/Materials/MaterialsPage.qml index 6ec23f001f..2774c2a204 100644 --- a/resources/qml/Preferences/Materials/MaterialsPage.qml +++ b/resources/qml/Preferences/Materials/MaterialsPage.qml @@ -1,15 +1,14 @@ -// 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 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.15 import QtQuick.Dialogs 1.2 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.5 as Cura -Item +UM.ManagementPage { id: base @@ -36,12 +35,6 @@ Item property var extruder_position: Cura.ExtruderManager.activeExtruderIndex property var active_root_material_id: Cura.MachineManager.currentRootMaterialId[extruder_position] - UM.I18nCatalog - { - id: catalog - name: "cura" - } - function resetExpandedActiveMaterial() { materialListView.expandActiveMaterial(active_root_material_id) @@ -74,57 +67,15 @@ Item } } - // Main layout - Label - { - id: titleLabel - anchors - { - top: parent.top - left: parent.left - right: parent.right - margins: 5 * screenScaleFactor - } - font.pointSize: 18 - text: catalog.i18nc("@title:tab", "Materials") - } + title: catalog.i18nc("@title:tab", "Materials") + detailsPlaneCaption: currentItem ? currentItem.name: "" + scrollviewCaption: catalog.i18nc("@label", "Materials compatible with active printer:") + `<br /><b>${Cura.MachineManager.activeMachine.name}</b>` - // Button Row - Row - { - id: buttonRow - anchors - { - left: parent.left - right: parent.right - top: titleLabel.bottom - } - height: childrenRect.height - - // Activate button - Button - { - id: activateMenuButton - text: catalog.i18nc("@action:button", "Activate") - iconName: "list-activate" - enabled: !isCurrentItemActivated && Cura.MachineManager.activeMachine.hasMaterials - onClicked: - { - forceActiveFocus() - - // Set the current material as the one to be activated (needed to force the UI update) - base.newRootMaterialIdToSwitchTo = base.currentItem.root_material_id - const extruder_position = Cura.ExtruderManager.activeExtruderIndex - Cura.MachineManager.setMaterial(extruder_position, base.currentItem.container_node) - } - } - - // Create button - Button + buttons: [ + Cura.SecondaryButton { id: createMenuButton - text: catalog.i18nc("@action:button", "Create") - iconName: "list-add" + text: catalog.i18nc("@action:button", "Create new") enabled: Cura.MachineManager.activeMachine.hasMaterials onClicked: { @@ -132,72 +83,22 @@ Item base.newRootMaterialIdToSwitchTo = base.materialManagementModel.createMaterial(); base.toActivateNewMaterial = true; } - } - - // Duplicate button - Button - { - id: duplicateMenuButton - text: catalog.i18nc("@action:button", "Duplicate"); - iconName: "list-add" - enabled: base.hasCurrentItem - onClicked: - { - forceActiveFocus(); - base.newRootMaterialIdToSwitchTo = base.materialManagementModel.duplicateMaterial(base.currentItem.container_node); - base.toActivateNewMaterial = true; - } - } - - // Remove button - Button - { - id: removeMenuButton - text: catalog.i18nc("@action:button", "Remove") - iconName: "list-remove" - enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated && base.materialManagementModel.canMaterialBeRemoved(base.currentItem.container_node) - - onClicked: - { - forceActiveFocus(); - confirmRemoveMaterialDialog.open(); - } - } - - // Import button - Button + }, + Cura.SecondaryButton { id: importMenuButton text: catalog.i18nc("@action:button", "Import") - iconName: "document-import" onClicked: { forceActiveFocus(); importMaterialDialog.open(); } enabled: Cura.MachineManager.activeMachine.hasMaterials - } - - // Export button - Button - { - id: exportMenuButton - text: catalog.i18nc("@action:button", "Export") - iconName: "document-export" - onClicked: - { - forceActiveFocus(); - exportMaterialDialog.open(); - } - enabled: base.hasCurrentItem - } - - //Sync button. - Button + }, + Cura.SecondaryButton { id: syncMaterialsButton - text: catalog.i18nc("@action:button Sending materials to printers", "Sync with Printers") - iconName: "sync-synchronizing" + text: catalog.i18nc("@action:button", "Sync with Printers") onClicked: { forceActiveFocus(); @@ -205,185 +106,177 @@ Item } visible: Cura.MachineManager.activeMachine.supportsMaterialExport } + ] + + onHamburgeButtonClicked: { + const hamburerButtonHeight = hamburger_button.height; + menu.popup(hamburger_button, -menu.width + hamburger_button.width / 2, hamburger_button.height); + // for some reason the height of the hamburger changes when opening the popup + // reset height to initial heigt + hamburger_button.height = hamburerButtonHeight; } - - Item { - id: contentsItem - anchors - { - top: titleLabel.bottom - left: parent.left - right: parent.right - bottom: parent.bottom - margins: 5 * screenScaleFactor - bottomMargin: 0 - } - clip: true - } - - Item + listContent: ScrollView { - anchors - { - top: buttonRow.bottom - topMargin: UM.Theme.getSize("default_margin").height - left: parent.left - right: parent.right - bottom: parent.bottom - } - - SystemPalette { id: palette } + id: materialScrollView + anchors.fill: parent + anchors.margins: parent.border.width + width: (parent.width * 0.4) | 0 - Label + clip: true + ScrollBar.vertical: UM.ScrollBar { - id: captionLabel + id: materialScrollBar + parent: materialScrollView.parent anchors { top: parent.top - left: parent.left - } - visible: text != "" - text: - { - var caption = catalog.i18nc("@action:label", "Printer") + ": " + Cura.MachineManager.activeMachine.name; - if (Cura.MachineManager.activeMachine.hasVariants) - { - var activeVariantName = "" - if(Cura.MachineManager.activeStack != null) - { - activeVariantName = Cura.MachineManager.activeStack.variant.name - } - caption += ", " + Cura.MachineManager.activeDefinitionVariantsName + ": " + activeVariantName; - } - return caption; - } - width: materialScrollView.width - elide: Text.ElideRight - } - - ScrollView - { - id: materialScrollView - anchors - { - top: captionLabel.visible ? captionLabel.bottom : parent.top - topMargin: captionLabel.visible ? UM.Theme.getSize("default_margin").height : 0 + right: parent.right bottom: parent.bottom - left: parent.left - } - - Rectangle - { - parent: viewport - anchors.fill: parent - color: palette.light - } - - width: (parent.width * 0.4) | 0 - frameVisible: true - horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff - - MaterialsList - { - id: materialListView - width: materialScrollView.viewport.width } } + contentHeight: materialListView.height //For some reason, this is not determined automatically with this ScrollView. Very weird! - MaterialsDetailsPanel + MaterialsList { - id: materialDetailsPanel - anchors - { - left: materialScrollView.right - leftMargin: UM.Theme.getSize("default_margin").width - top: parent.top - bottom: parent.bottom - right: parent.right - } + id: materialListView + width: materialScrollView.width - materialScrollBar.width } } - // Dialogs - MessageDialog + MaterialsDetailsPanel { - id: confirmRemoveMaterialDialog - icon: StandardIcon.Question; - title: catalog.i18nc("@title:window", "Confirm Remove") - property string materialName: base.currentItem !== null ? base.currentItem.name : "" - - text: catalog.i18nc("@label (%1 is object name)", "Are you sure you wish to remove %1? This cannot be undone!").arg(materialName) - standardButtons: StandardButton.Yes | StandardButton.No - modality: Qt.ApplicationModal - onYes: - { - // Set the active material as the fallback. It will be selected when the current material is deleted - base.newRootMaterialIdToSwitchTo = base.active_root_material_id - base.materialManagementModel.removeMaterial(base.currentItem.container_node); - } + id: materialDetailsPanel + anchors.fill: parent } - FileDialog + Item { - id: importMaterialDialog - title: catalog.i18nc("@title:window", "Import Material") - selectExisting: true - nameFilters: Cura.ContainerManager.getContainerNameFilters("material") - folder: CuraApplication.getDefaultPath("dialog_material_path") - onAccepted: + Cura.Menu { - var result = Cura.ContainerManager.importMaterialContainer(fileUrl); + id: menu + Cura.MenuItem + { + id: activateMenuButton + text: catalog.i18nc("@action:button", "Activate") + onClicked: + { + forceActiveFocus() - messageDialog.title = catalog.i18nc("@title:window", "Import Material"); - messageDialog.text = catalog.i18nc("@info:status Don't translate the XML tags <filename> or <message>!", "Could not import material <filename>%1</filename>: <message>%2</message>").arg(fileUrl).arg(result.message); - if (result.status == "success") + // Set the current material as the one to be activated (needed to force the UI update) + base.newRootMaterialIdToSwitchTo = base.currentItem.root_material_id + const extruder_position = Cura.ExtruderManager.activeExtruderIndex + Cura.MachineManager.setMaterial(extruder_position, base.currentItem.container_node) + } + } + Cura.MenuItem { - messageDialog.icon = StandardIcon.Information; - messageDialog.text = catalog.i18nc("@info:status Don't translate the XML tag <filename>!", "Successfully imported material <filename>%1</filename>").arg(fileUrl); + id: duplicateMenuButton + text: catalog.i18nc("@action:button", "Duplicate"); + enabled: base.hasCurrentItem + onClicked: + { + forceActiveFocus(); + base.newRootMaterialIdToSwitchTo = base.materialManagementModel.duplicateMaterial(base.currentItem.container_node); + base.toActivateNewMaterial = true; + } } - else if (result.status == "duplicate") + Cura.MenuItem { - messageDialog.icon = StandardIcon.Warning; + id: removeMenuButton + text: catalog.i18nc("@action:button", "Remove") + enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated && base.materialManagementModel.canMaterialBeRemoved(base.currentItem.container_node) + + onClicked: + { + forceActiveFocus(); + confirmRemoveMaterialDialog.open(); + } } - else + Cura.MenuItem { - messageDialog.icon = StandardIcon.Critical; + id: exportMenuButton + text: catalog.i18nc("@action:button", "Export") + onClicked: + { + forceActiveFocus(); + exportMaterialDialog.open(); + } + enabled: base.hasCurrentItem } - messageDialog.open(); - CuraApplication.setDefaultPath("dialog_material_path", folder); } - } - FileDialog - { - id: exportMaterialDialog - title: catalog.i18nc("@title:window", "Export Material") - selectExisting: false - nameFilters: Cura.ContainerManager.getContainerNameFilters("material") - folder: CuraApplication.getDefaultPath("dialog_material_path") - onAccepted: + // Dialogs + Cura.MessageDialog { - var result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, selectedNameFilter, fileUrl); + id: confirmRemoveMaterialDialog + title: catalog.i18nc("@title:window", "Confirm Remove") + property string materialName: base.currentItem !== null ? base.currentItem.name : "" - messageDialog.title = catalog.i18nc("@title:window", "Export Material"); - if (result.status == "error") + text: catalog.i18nc("@label (%1 is object name)", "Are you sure you wish to remove %1? This cannot be undone!").arg(materialName) + standardButtons: Dialog.Yes | Dialog.No + onAccepted: { - messageDialog.icon = StandardIcon.Critical; - messageDialog.text = catalog.i18nc("@info:status Don't translate the XML tags <filename> and <message>!", "Failed to export material to <filename>%1</filename>: <message>%2</message>").arg(fileUrl).arg(result.message); - messageDialog.open(); + // Set the active material as the fallback. It will be selected when the current material is deleted + base.newRootMaterialIdToSwitchTo = base.active_root_material_id + base.materialManagementModel.removeMaterial(base.currentItem.container_node); } - else if (result.status == "success") + } + + FileDialog + { + id: importMaterialDialog + title: catalog.i18nc("@title:window", "Import Material") + selectExisting: true + nameFilters: Cura.ContainerManager.getContainerNameFilters("material") + folder: CuraApplication.getDefaultPath("dialog_material_path") + onAccepted: { - messageDialog.icon = StandardIcon.Information; - messageDialog.text = catalog.i18nc("@info:status Don't translate the XML tag <filename>!", "Successfully exported material to <filename>%1</filename>").arg(result.path); + const result = Cura.ContainerManager.importMaterialContainer(fileUrl); + + 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) + { + case "success": + messageDialog.text = catalog.i18nc("@info:status Don't translate the XML tag <filename>!", "Successfully imported material <filename>%1</filename>").arg(fileUrl); + break; + default: + messageDialog.text = catalog.i18nc("@info:status Don't translate the XML tags <filename> or <message>!", "Could not import material <filename>%1</filename>: <message>%2</message>").arg(fileUrl).arg(result.message); + break; + } messageDialog.open(); + CuraApplication.setDefaultPath("dialog_material_path", folder); } - CuraApplication.setDefaultPath("dialog_material_path", folder); } - } - MessageDialog - { - id: messageDialog + FileDialog + { + id: exportMaterialDialog + title: catalog.i18nc("@title:window", "Export Material") + selectExisting: false + nameFilters: Cura.ContainerManager.getContainerNameFilters("material") + folder: CuraApplication.getDefaultPath("dialog_material_path") + onAccepted: + { + const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, selectedNameFilter, fileUrl); + + 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) + { + case "error": + messageDialog.text = catalog.i18nc("@info:status Don't translate the XML tags <filename> and <message>!", "Failed to export material to <filename>%1</filename>: <message>%2</message>").arg(fileUrl).arg(result.message); + break; + case "success": + messageDialog.text = catalog.i18nc("@info:status Don't translate the XML tag <filename>!", "Successfully exported material to <filename>%1</filename>").arg(result.path); + break; + } + messageDialog.open(); + + CuraApplication.setDefaultPath("dialog_material_path", folder); + } + } } } diff --git a/resources/qml/Preferences/Materials/MaterialsSlot.qml b/resources/qml/Preferences/Materials/MaterialsSlot.qml index 840c636196..f124736fd0 100644 --- a/resources/qml/Preferences/Materials/MaterialsSlot.qml +++ b/resources/qml/Preferences/Materials/MaterialsSlot.qml @@ -1,128 +1,138 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 +import QtQuick.Controls 2.1 import QtQuick.Layouts 1.3 -import QtQuick.Dialogs 1.2 -import UM 1.2 as UM -import Cura 1.0 as Cura +import UM 1.5 as UM +import Cura 1.5 as Cura // A single material row, typically used in a MaterialsBrandSection Rectangle { id: materialSlot + property var material: null - property var hovered: false - property var is_favorite: material != null && material.is_favorite + property bool hovered: false + property bool isActive: material != null && Cura.MachineManager.currentRootMaterialId[Cura.ExtruderManager.activeExtruderIndex] == material.root_material_id - height: UM.Theme.getSize("favorites_row").height + height: UM.Theme.getSize("preferences_page_list_item").height width: parent.width - //color: material != null ? (base.currentItem.root_material_id == material.root_material_id ? UM.Theme.getColor("favorites_row_selected") : "transparent") : "transparent" - color: - { - if(material !== null && base.currentItem !== null) + color: UM.Theme.getColor("main_background") + + states: + [ + State { - if(base.currentItem.root_material_id === material.root_material_id) - { - return UM.Theme.getColor("favorites_row_selected") - } + name: "selected" + when: material !== null && base.currentItem !== null && base.currentItem.root_material_id === material.root_material_id + PropertyChanges { target: materialSlot; color: UM.Theme.getColor("background_3") } + }, + State + { + name: "hovered" + when: hovered + PropertyChanges { target: materialSlot; color: UM.Theme.getColor("background_3") } } - return "transparent" - } + ] + Rectangle { id: swatch color: material != null ? material.color_code : "transparent" - border.width: UM.Theme.getSize("default_lining").width - border.color: "black" - width: UM.Theme.getSize("favorites_button_icon").width - height: UM.Theme.getSize("favorites_button_icon").height + width: UM.Theme.getSize("icon_indicator").width + height: UM.Theme.getSize("icon_indicator").height + radius: width / 2 anchors.verticalCenter: materialSlot.verticalCenter anchors.left: materialSlot.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.leftMargin: 2 * UM.Theme.getSize("default_margin").width } - Label + UM.Label { - text: material != null ? material.brand + " " + material.name : "" + id: materialLabel + text: material != null ? `${material.brand} ${material.name}` : "" + font: isActive ? UM.Theme.getFont("default_italic") : UM.Theme.getFont("default") + elide: Text.ElideRight + wrapMode: Text.NoWrap verticalAlignment: Text.AlignVCenter - height: parent.height anchors.left: swatch.right + anchors.right: favoriteButton.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.rightMargin: UM.Theme.getSize("narrow_margin").width anchors.verticalCenter: materialSlot.verticalCenter - anchors.leftMargin: UM.Theme.getSize("narrow_margin").width - font.italic: material != null && Cura.MachineManager.currentRootMaterialId[Cura.ExtruderManager.activeExtruderIndex] == material.root_material_id } - MouseArea + + UM.TooltipArea { anchors.fill: parent + text: material != null ? `${material.brand} ${material.name}` : "" + acceptedButtons: Qt.LeftButton onClicked: { - materialList.currentBrand = material.brand - materialList.currentType = material.brand + "_" + material.material - base.setExpandedActiveMaterial(material.root_material_id) + materialList.currentBrand = material.brand; + materialList.currentType = `${material.brand}_${material.material}`; + base.setExpandedActiveMaterial(material.root_material_id); } hoverEnabled: true onEntered: { materialSlot.hovered = true } onExited: { materialSlot.hovered = false } } - Button + + Item { - id: favorite_button - text: "" - implicitWidth: UM.Theme.getSize("favorites_button").width - implicitHeight: UM.Theme.getSize("favorites_button").height - visible: materialSlot.hovered || materialSlot.is_favorite || favorite_button.hovered - anchors - { - right: materialSlot.right - verticalCenter: materialSlot.verticalCenter - } - onClicked: - { - if (materialSlot.is_favorite) + id: favoriteButton + + states: + [ + State { - CuraApplication.getMaterialManagementModel().removeFavorite(material.root_material_id) - } - else + name: "favorite" + when: material !== null && material.is_favorite + PropertyChanges { target: favoriteIndicator; source: UM.Theme.getIcon("StarFilled");} + PropertyChanges { target: favoriteButton; visible: true } + }, + State { - CuraApplication.getMaterialManagementModel().addFavorite(material.root_material_id) + name: "hovered" + when: hovered + PropertyChanges { target: favoriteButton; visible: true } } - } - style: ButtonStyle + ] + + implicitHeight: parent.height + implicitWidth: height + anchors.right: materialSlot.right + visible: false + + UM.RecolorImage { - background: Item { } + id: favoriteIndicator + anchors.centerIn: parent + width: UM.Theme.getSize("small_button_icon").width + height: UM.Theme.getSize("small_button_icon").height + color: UM.Theme.getColor("primary") + source: UM.Theme.getIcon("Star") } - UM.RecolorImage + + MouseArea { - anchors + anchors.fill: parent + onClicked: { - verticalCenter: favorite_button.verticalCenter - horizontalCenter: favorite_button.horizontalCenter - } - width: UM.Theme.getSize("favorites_button_icon").width - height: UM.Theme.getSize("favorites_button_icon").height - color: - { - if (favorite_button.hovered) - { - return UM.Theme.getColor("primary_hover") - } - else + if (material !== null) { - if (materialSlot.is_favorite) + if (material.is_favorite) { - return UM.Theme.getColor("primary") + CuraApplication.getMaterialManagementModel().removeFavorite(material.root_material_id) } else { - UM.Theme.getColor("text_inactive") + CuraApplication.getMaterialManagementModel().addFavorite(material.root_material_id) } } } - source: materialSlot.is_favorite ? UM.Theme.getIcon("StarFilled") : UM.Theme.getIcon("Star") } } } diff --git a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml b/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml index d7d158eef2..e592be6d5d 100644 --- a/resources/qml/Preferences/Materials/MaterialsSyncDialog.qml +++ b/resources/qml/Preferences/Materials/MaterialsSyncDialog.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.15 @@ -7,7 +7,7 @@ import QtQuick.Dialogs 1.2 import QtQuick.Layouts 1.15 import QtQuick.Window 2.1 import Cura 1.1 as Cura -import UM 1.4 as UM +import UM 1.5 as UM Window { @@ -20,6 +20,7 @@ Window width: minimumWidth height: minimumHeight modality: Qt.ApplicationModal + color: UM.Theme.getColor("main_background") property variant syncModel property alias pageIndex: swipeView.currentIndex @@ -32,82 +33,78 @@ Window anchors.fill: parent interactive: false - Rectangle + Item { id: introPage - color: UM.Theme.getColor("main_background") - Column + + ColumnLayout { spacing: UM.Theme.getSize("default_margin").height anchors.fill: parent anchors.margins: UM.Theme.getSize("default_margin").width - Label + UM.Label { text: catalog.i18nc("@title:header", "Sync materials with printers") font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") + Layout.fillWidth: true } - Label + UM.Label { text: catalog.i18nc("@text", "Following a few simple steps, you will be able to synchronize all your material profiles with your printers.") font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - wrapMode: Text.Wrap - width: parent.width + Layout.fillWidth: true } + Image { + Layout.fillWidth: true + Layout.fillHeight: true source: UM.Theme.getImage("material_ecosystem") - width: parent.width + fillMode: Image.PreserveAspectFit sourceSize.width: width } - } - Cura.PrimaryButton - { - id: startButton - anchors - { - right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width - bottom: parent.bottom - bottomMargin: UM.Theme.getSize("default_margin").height - } - text: catalog.i18nc("@button", "Start") - onClicked: + Item { - if(Cura.API.account.isLoggedIn) + Layout.preferredHeight: childrenRect.height + Layout.alignment: Qt.AlignBottom + Layout.fillWidth: true + + Cura.TertiaryButton { - swipeView.currentIndex += 2; //Skip sign in page. + text: catalog.i18nc("@button", "Why do I need to sync material profiles?") + iconSource: UM.Theme.getIcon("LinkExternal") + isIconOnRightSide: true + onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360013137919?utm_source=cura&utm_medium=software&utm_campaign=sync-material-printer-why") } - else + + Cura.PrimaryButton { - swipeView.currentIndex += 1; + anchors.right: parent.right + text: catalog.i18nc("@button", "Start") + onClicked: + { + if(Cura.API.account.isLoggedIn) + { + swipeView.currentIndex += 2; //Skip sign in page. + } + else + { + swipeView.currentIndex += 1; + } + } } } } - Cura.TertiaryButton - { - anchors - { - left: parent.left - leftMargin: UM.Theme.getSize("default_margin").width - verticalCenter: startButton.verticalCenter - } - text: catalog.i18nc("@button", "Why do I need to sync material profiles?") - iconSource: UM.Theme.getIcon("LinkExternal") - isIconOnRightSide: true - onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360013137919?utm_source=cura&utm_medium=software&utm_campaign=sync-material-printer-why") - } } - Rectangle + Item { id: signinPage - color: UM.Theme.getColor("main_background") - Connections //While this page is active, continue to the next page if the user logs in. + // While this page is active, continue to the next page if the user logs in. + Connections { target: Cura.API.account function onLoginStateChanged(is_logged_in) @@ -125,40 +122,35 @@ Window anchors.fill: parent anchors.margins: UM.Theme.getSize("default_margin").width - Label + UM.Label { text: catalog.i18nc("@title:header", "Sign in") font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") - Layout.preferredHeight: height + Layout.fillWidth: true } - Label + UM.Label { text: catalog.i18nc("@text", "To automatically sync the material profiles with all your printers connected to Digital Factory you need to be signed in in Cura.") font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - wrapMode: Text.Wrap - width: parent.width - Layout.maximumWidth: width - Layout.preferredHeight: height + Layout.fillWidth: true } - Item + + Image { - Layout.preferredWidth: parent.width + Layout.alignment: Qt.AlignCenter + Layout.preferredWidth: parent.width / 2 + source: UM.Theme.getImage("first_run_ultimaker_cloud") Layout.fillHeight: true - Image - { - source: UM.Theme.getImage("first_run_ultimaker_cloud") - width: parent.width / 2 - sourceSize.width: width - anchors.centerIn: parent - } + sourceSize.width: width + fillMode: Image.PreserveAspectFit } + Item { - width: parent.width - height: childrenRect.height - Layout.preferredHeight: height + Layout.preferredHeight: childrenRect.height + Layout.alignment: Qt.AlignBottom + Layout.fillWidth: true + Cura.SecondaryButton { anchors.left: parent.left @@ -175,10 +167,9 @@ Window } } - Rectangle + Item { id: printerListPage - color: UM.Theme.getColor("main_background") ColumnLayout { @@ -189,7 +180,6 @@ Window Row { - Layout.preferredHeight: childrenRect.height spacing: UM.Theme.getSize("default_margin").width states: [ @@ -220,244 +210,225 @@ Window { id: printerListHeaderIcon width: UM.Theme.getSize("section_icon").width - height: width + height: UM.Theme.getSize("section_icon").height anchors.verticalCenter: parent.verticalCenter } - Label + UM.Label { id: printerListHeader anchors.verticalCenter: parent.verticalCenter //Text is always defined by the states above. font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") } } Row { - Layout.preferredWidth: parent.width + Layout.fillWidth: true Layout.preferredHeight: childrenRect.height - Label + UM.Label { id: syncStatusLabel - - width: parent.width - UM.Theme.getSize("default_margin").width - troubleshootingLink.width - + anchors.left: parent.left wrapMode: Text.Wrap elide: Text.ElideRight visible: text !== "" - text: "" - color: UM.Theme.getColor("text") font: UM.Theme.getFont("medium") } Cura.TertiaryButton { id: troubleshootingLink + anchors.right: parent.right text: catalog.i18nc("@button", "Troubleshooting") visible: typeof syncModel !== "undefined" && syncModel.exportUploadStatus == "error" iconSource: UM.Theme.getIcon("LinkExternal") onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=sync-material-wizard-troubleshoot-cloud-printer") } } - ScrollView + ListView { - id: printerListScrollView - width: parent.width - Layout.preferredWidth: width + id: printerList + Layout.fillWidth: true Layout.fillHeight: true - clip: true - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - ListView + clip: true + ScrollBar.vertical: UM.ScrollBar { - id: printerList - width: parent.width - spacing: UM.Theme.getSize("default_margin").height + id: printerListScrollBar + } + spacing: UM.Theme.getSize("default_margin").height - model: cloudPrinterList - delegate: Rectangle + model: cloudPrinterList + delegate: Rectangle + { + id: delegateContainer + color: "transparent" + border.color: UM.Theme.getColor("lining") + border.width: UM.Theme.getSize("default_lining").width + width: printerList.width - printerListScrollBar.width + height: UM.Theme.getSize("machine_selector_icon").height + 2 * UM.Theme.getSize("default_margin").height + + property string syncStatus: { - id: delegateContainer - color: "transparent" - border.color: UM.Theme.getColor("lining") - border.width: UM.Theme.getSize("default_lining").width - width: printerListScrollView.width - height: UM.Theme.getSize("card").height + var printer_id = model.metadata["host_guid"] + if(syncModel.printerStatus[printer_id] === undefined) //No status information available. Could be added after we started syncing. + { + return "idle"; + } + return syncModel.printerStatus[printer_id]; + } - property string syncStatus: + Cura.IconWithText + { + anchors { - var printer_id = model.metadata["host_guid"] - if(syncModel.printerStatus[printer_id] === undefined) //No status information available. Could be added after we started syncing. - { - return "idle"; - } - return syncModel.printerStatus[printer_id]; + verticalCenter: parent.verticalCenter + left: parent.left + leftMargin: Math.round(parent.height - height) / 2 //Equal margin on the left as above and below. + right: parent.right + rightMargin: Math.round(parent.height - height) / 2 } - Cura.IconWithText + text: model.name + font: UM.Theme.getFont("medium") + + source: UM.Theme.getIcon("Printer", "medium") + iconColor: UM.Theme.getColor("machine_selector_printer_icon") + iconSize: UM.Theme.getSize("machine_selector_icon").width + + //Printer status badge (always cloud, but whether it's online or offline). + UM.RecolorImage { + width: UM.Theme.getSize("printer_status_icon").width + height: UM.Theme.getSize("printer_status_icon").height anchors { - verticalCenter: parent.verticalCenter + bottom: parent.bottom + bottomMargin: -Math.round(height / 6) left: parent.left - leftMargin: Math.round(parent.height - height) / 2 //Equal margin on the left as above and below. - right: parent.right - rightMargin: Math.round(parent.height - height) / 2 + leftMargin: parent.iconSize - Math.round(width * 5 / 6) } - text: model.name - font: UM.Theme.getFont("medium") - - source: UM.Theme.getIcon("Printer", "medium") - iconColor: UM.Theme.getColor("machine_selector_printer_icon") - iconSize: UM.Theme.getSize("machine_selector_icon").width + source: UM.Theme.getIcon("CloudBadge", "low") + color: UM.Theme.getColor("primary") - //Printer status badge (always cloud, but whether it's online or offline). - UM.RecolorImage + //Make a themeable circle in the background so we can change it in other themes. + Rectangle { - width: UM.Theme.getSize("printer_status_icon").width - height: UM.Theme.getSize("printer_status_icon").height - anchors - { - bottom: parent.bottom - bottomMargin: -Math.round(height / 6) - left: parent.left - leftMargin: parent.iconSize - Math.round(width * 5 / 6) - } - - source: UM.Theme.getIcon("CloudBadge", "low") - color: UM.Theme.getColor("primary") - - //Make a themeable circle in the background so we can change it in other themes. - Rectangle - { - anchors.centerIn: parent - width: parent.width - 1.5 //1.5 pixels smaller (at least sqrt(2), regardless of pixel scale) so that the circle doesn't show up behind the icon due to anti-aliasing. - height: parent.height - 1.5 - radius: width / 2 - color: UM.Theme.getColor("connection_badge_background") - z: parent.z - 1 - } + anchors.centerIn: parent + width: parent.width - 1.5 //1.5 pixels smaller (at least sqrt(2), regardless of pixel scale) so that the circle doesn't show up behind the icon due to anti-aliasing. + height: parent.height - 1.5 + radius: width / 2 + color: UM.Theme.getColor("connection_badge_background") + z: parent.z - 1 } } + } - UM.RecolorImage - { - id: printerSpinner - width: UM.Theme.getSize("section_icon").width - height: width - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: Math.round((parent.height - height) / 2) //Same margin on the right as above and below. - - visible: delegateContainer.syncStatus === "uploading" - source: UM.Theme.getIcon("ArrowDoubleCircleRight") - color: UM.Theme.getColor("primary") + UM.RecolorImage + { + id: printerSpinner + width: UM.Theme.getSize("section_icon").width + height: width + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: Math.round((parent.height - height) / 2) //Same margin on the right as above and below. + + visible: delegateContainer.syncStatus === "uploading" + source: UM.Theme.getIcon("ArrowDoubleCircleRight") + color: UM.Theme.getColor("primary") - RotationAnimator - { - target: printerSpinner - from: 0 - to: 360 - duration: 1000 - loops: Animation.Infinite - running: true - } - } - UM.StatusIcon + RotationAnimator { - width: UM.Theme.getSize("section_icon").width - height: width - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: Math.round((parent.height - height) / 2) //Same margin on the right as above and below. - - visible: delegateContainer.syncStatus === "failed" || delegateContainer.syncStatus === "success" - status: delegateContainer.syncStatus === "success" ? UM.StatusIcon.Status.POSITIVE : UM.StatusIcon.Status.ERROR + target: printerSpinner + from: 0 + to: 360 + duration: 1000 + loops: Animation.Infinite + running: true } } + UM.StatusIcon + { + width: UM.Theme.getSize("section_icon").width + height: width + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: Math.round((parent.height - height) / 2) //Same margin on the right as above and below. + + visible: delegateContainer.syncStatus === "failed" || delegateContainer.syncStatus === "success" + status: delegateContainer.syncStatus === "success" ? UM.StatusIcon.Status.POSITIVE : UM.StatusIcon.Status.ERROR + } + } - footer: Item + footer: Item + { + width: printerList.width - printerListScrollBar.width + height: childrenRect.height + UM.Theme.getSize("default_margin").height + visible: includeOfflinePrinterList.count - cloudPrinterList.count > 0 && typeof syncModel !== "undefined" && syncModel.exportUploadStatus === "idle" + Rectangle { - width: printerListScrollView.width - height: { - if(!visible) + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + border.color: UM.Theme.getColor("lining") + border.width: UM.Theme.getSize("default_lining").width + anchors.topMargin: UM.Theme.getSize("default_margin").height + height: childrenRect.height + 2 * UM.Theme.getSize("thick_margin").height + + color: "transparent" + + GridLayout + { + columns: 3 + rows: 2 + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.leftMargin: UM.Theme.getSize("thick_margin").width + anchors.rightMargin: UM.Theme.getSize("thick_margin").width + anchors.topMargin: UM.Theme.getSize("thick_margin").height + anchors.bottomMargin: UM.Theme.getSize("thick_margin").height + columnSpacing: UM.Theme.getSize("default_margin").width + rowSpacing: UM.Theme.getSize("default_margin").height + + UM.StatusIcon { - return 0; + Layout.preferredWidth: UM.Theme.getSize("section_icon").width + Layout.preferredHeight: UM.Theme.getSize("section_icon").height + status: UM.StatusIcon.Status.WARNING } - let h = UM.Theme.getSize("card").height + printerListTroubleshooting.height + UM.Theme.getSize("default_margin").height * 2; //1 margin between content and footer, 1 for troubleshooting link. - return h; - } - visible: includeOfflinePrinterList.count - cloudPrinterList.count > 0 && typeof syncModel !== "undefined" && syncModel.exportUploadStatus === "idle" - Rectangle - { - anchors.fill: parent - anchors.topMargin: UM.Theme.getSize("default_margin").height - border.color: UM.Theme.getColor("lining") - border.width: UM.Theme.getSize("default_lining").width - color: "transparent" + UM.Label + { + Layout.fillWidth: true + Layout.alignment: Qt.AlignVCenter + text: catalog.i18nc("@text Asking the user whether printers are missing in a list.", "Printers missing?") + + "\n" + + catalog.i18nc("@text", "Make sure all your printers are turned ON and connected to Digital Factory.") + font: UM.Theme.getFont("medium") + elide: Text.ElideRight + } - Row + Cura.SecondaryButton { - anchors - { - fill: parent - margins: Math.round(UM.Theme.getSize("card").height - UM.Theme.getSize("machine_selector_icon").width) / 2 //Same margin as in other cards. - } - spacing: UM.Theme.getSize("default_margin").width - - UM.StatusIcon - { - id: infoIcon - width: UM.Theme.getSize("section_icon").width - height: width - //Fake anchor.verticalCenter: printersMissingText.verticalCenter, since we can't anchor to things that aren't siblings. - anchors.top: parent.top - anchors.topMargin: Math.round(printersMissingText.height / 2 - height / 2) - - status: UM.StatusIcon.Status.WARNING - } - - Column - { - //Fill the total width. Can't use layouts because we need the anchors for vertical alignment. - width: parent.width - infoIcon.width - refreshListButton.width - parent.spacing * 2 - - spacing: UM.Theme.getSize("default_margin").height - - Label - { - id: printersMissingText - text: catalog.i18nc("@text Asking the user whether printers are missing in a list.", "Printers missing?") - + "\n" - + catalog.i18nc("@text", "Make sure all your printers are turned ON and connected to Digital Factory.") - font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - elide: Text.ElideRight - } - Cura.TertiaryButton - { - id: printerListTroubleshooting - leftPadding: 0 //Want to visually align this to the text. - - text: catalog.i18nc("@button", "Troubleshooting") - iconSource: UM.Theme.getIcon("LinkExternal") - onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=sync-material-wizard-troubleshoot-cloud-printer") - } - } - - Cura.SecondaryButton - { - id: refreshListButton - //Fake anchor.verticalCenter: printersMissingText.verticalCenter, since we can't anchor to things that aren't siblings. - anchors.top: parent.top - anchors.topMargin: Math.round(printersMissingText.height / 2 - height / 2) - - text: catalog.i18nc("@button", "Refresh List") - iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight") - onClicked: Cura.API.account.sync(true) - } + id: refreshListButton + Layout.alignment: Qt.AlignVCenter + text: catalog.i18nc("@button", "Refresh List") + iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight") + onClicked: Cura.API.account.sync(true) + } + + Cura.TertiaryButton + { + id: printerListTroubleshooting + Layout.column: 1 + Layout.row: 1 + Layout.fillWidth: true + leftPadding: 0 + text: catalog.i18nc("@button", "Troubleshooting") + iconSource: UM.Theme.getIcon("LinkExternal") + onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=sync-material-wizard-troubleshoot-cloud-printer") } } } @@ -465,10 +436,9 @@ Window } Item { - width: parent.width - height: childrenRect.height - Layout.preferredWidth: width - Layout.preferredHeight: height + Layout.fillWidth: true + Layout.preferredHeight: childrenRect.height + Layout.alignment: Qt.AlignBottom Cura.SecondaryButton { @@ -540,7 +510,7 @@ Window running: true } } - Label + UM.Label { id: syncingLabel anchors.left: syncingIcon.right @@ -554,56 +524,62 @@ Window } } - ColumnLayout //Placeholder for when the user has no cloud printers. + // Placeholder for when the user has no cloud printers. + ColumnLayout { spacing: UM.Theme.getSize("default_margin").height anchors.fill: parent anchors.margins: UM.Theme.getSize("default_margin").width visible: cloudPrinterList.count == 0 - Label + UM.Label { text: catalog.i18nc("@title:header", "No printers found") font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") - Layout.preferredWidth: width - Layout.preferredHeight: height + Layout.fillWidth: true } - Image + + Item { - source: UM.Theme.getImage("3d_printer_faded") - sourceSize.width: width - fillMode: Image.PreserveAspectFit - Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: parent.width / 3 + Layout.fillWidth: true + Layout.fillHeight: true + + Image + { + anchors.fill: parent + source: UM.Theme.getImage("3d_printer_faded") + sourceSize.width: width + fillMode: Image.PreserveAspectFit + } } - Label + + UM.Label { text: catalog.i18nc("@text", "It seems like you don't have any compatible printers connected to Digital Factory. Make sure your printer is connected and it's running the latest firmware.") - width: parent.width + Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter wrapMode: Text.Wrap - Layout.preferredWidth: width - Layout.preferredHeight: height } + Item { - Layout.preferredWidth: parent.width - Layout.fillHeight: true + Layout.fillWidth: true + Layout.preferredHeight: parent.height / 4 Cura.TertiaryButton { text: catalog.i18nc("@button", "Learn how to connect your printer to Digital Factory") iconSource: UM.Theme.getIcon("LinkExternal") onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/360012019239?utm_source=cura&utm_medium=software&utm_campaign=sync-material-wizard-add-cloud-printer") anchors.horizontalCenter: parent.horizontalCenter + maximumWidth: parent.width } } + Item { - width: parent.width - height: childrenRect.height - Layout.preferredWidth: width - Layout.preferredHeight: height + Layout.preferredHeight: childrenRect.height + Layout.alignment: Qt.AlignBottom + Layout.fillWidth: true Cura.SecondaryButton { @@ -611,30 +587,34 @@ Window text: catalog.i18nc("@button", "Sync materials with USB") onClicked: swipeView.currentIndex = removableDriveSyncPage.SwipeView.index } - Cura.PrimaryButton + + RowLayout { - id: disabledSyncButton anchors.right: parent.right - text: catalog.i18nc("@button", "Sync") - enabled: false //If there are no printers, always disable this button. - } - Cura.SecondaryButton - { - anchors.right: disabledSyncButton.left - anchors.rightMargin: UM.Theme.getSize("default_margin").width - text: catalog.i18nc("@button", "Refresh") - iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight") - outlineColor: "transparent" - onClicked: Cura.API.account.sync(true) + spacing: UM.Theme.getSize("default_margin").width + + Cura.SecondaryButton + { + text: catalog.i18nc("@button", "Refresh") + iconSource: UM.Theme.getIcon("ArrowDoubleCircleRight") + outlineColor: "transparent" + onClicked: Cura.API.account.sync(true) + } + + Cura.PrimaryButton + { + id: disabledSyncButton + text: catalog.i18nc("@button", "Sync") + enabled: false // If there are no printers, always disable this button. + } } } } } - Rectangle + Item { id: removableDriveSyncPage - color: UM.Theme.getColor("main_background") ColumnLayout { @@ -642,53 +622,56 @@ Window anchors.fill: parent anchors.margins: UM.Theme.getSize("default_margin").width - Label + UM.Label { text: catalog.i18nc("@title:header", "Sync material profiles via USB") font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") - Layout.preferredHeight: height + Layout.fillWidth: true } - Label + UM.Label { text: catalog.i18nc("@text In the UI this is followed by a list of steps the user needs to take.", "Follow the following steps to load the new material profiles to your printer.") font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") wrapMode: Text.Wrap - width: parent.width - Layout.maximumWidth: width - Layout.preferredHeight: height + Layout.fillWidth: true } - Row + + RowLayout { - width: parent.width - Layout.preferredWidth: width + Layout.fillWidth: true Layout.fillHeight: true spacing: UM.Theme.getSize("default_margin").width - Image + Item { - source: UM.Theme.getImage("insert_usb") - width: parent.width / 3 - height: width - anchors.verticalCenter: parent.verticalCenter - sourceSize.width: width + Layout.preferredWidth: parent.width / 3 + Layout.fillHeight: true + + Image + { + anchors.fill: parent + source: UM.Theme.getImage("insert_usb") + verticalAlignment: Image.AlignVCenter + horizontalAlignment: Image.AlignHCenter + fillMode: Image.PreserveAspectFit + sourceSize.width: width + } } - Label + + UM.Label { + Layout.alignment: Qt.AlignCenter + Layout.fillWidth: true text: "1. " + catalog.i18nc("@text", "Click the export material archive button.") + "\n2. " + catalog.i18nc("@text", "Save the .umm file on a USB stick.") + "\n3. " + catalog.i18nc("@text", "Insert the USB stick into your printer and launch the procedure to load new material profiles.") font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - wrapMode: Text.Wrap - width: parent.width * 2 / 3 - UM.Theme.getSize("default_margin").width - anchors.verticalCenter: parent.verticalCenter } } Cura.TertiaryButton { + Layout.fillWidth: true text: catalog.i18nc("@button", "How to load new material profiles to my printer") iconSource: UM.Theme.getIcon("LinkExternal") onClicked: Qt.openUrlExternally("https://support.ultimaker.com/hc/en-us/articles/4403319801106/?utm_source=cura&utm_medium=software&utm_campaign=add-material-profiles-via-usb") @@ -696,10 +679,9 @@ Window Item { - width: parent.width - height: childrenRect.height - Layout.preferredWidth: width - Layout.preferredHeight: height + Layout.preferredHeight: childrenRect.height + Layout.alignment: Qt.AlignBottom + Layout.fillWidth: true Cura.SecondaryButton { @@ -732,24 +714,22 @@ Window } } - Cura.GlobalStacksModel + property variant cloudPrinterList: Cura.GlobalStacksModel { - id: cloudPrinterList filterConnectionType: 3 //Only show cloud connections. filterOnlineOnly: true //Only show printers that are online. filterCapabilities: ["import_material"] //Only show printers that can receive the material profiles. } - Cura.GlobalStacksModel + + property variant includeOfflinePrinterList: Cura.GlobalStacksModel { //In order to show a refresh button only when there are offline cloud printers, we need to know if there are any offline printers. //A global stacks model without the filter for online-only printers allows this. - id: includeOfflinePrinterList filterConnectionType: 3 //Still only show cloud connections. } - FileDialog + property variant exportUsbDialog: FileDialog { - id: exportUsbDialog title: catalog.i18nc("@title:window", "Export All Materials") selectExisting: false nameFilters: ["Material archives (*.umm)", "All files (*)"] diff --git a/resources/qml/Preferences/Materials/MaterialsTypeSection.qml b/resources/qml/Preferences/Materials/MaterialsTypeSection.qml index 09f9964604..d781218027 100644 --- a/resources/qml/Preferences/Materials/MaterialsTypeSection.qml +++ b/resources/qml/Preferences/Materials/MaterialsTypeSection.qml @@ -1,116 +1,53 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 import QtQuick.Layouts 1.3 -import QtQuick.Dialogs 1.2 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura -Item +Column { id: material_type_section - property var materialType + property var materialType: null + property string materialBrand: materialType !== null ? materialType.brand : "" + property string materialName: materialType !== null ? materialType.name : "" + property bool expanded: materialList.expandedTypes.indexOf(`${materialBrand}_${materialName}`) !== -1 + property var colorsModel: materialType !== null ? materialType.colors : null + property alias indented: categoryButton.indented + width: parent.width - property string materialBrand: materialType != null ? materialType.brand : "" - property string materialName: materialType != null ? materialType.name : "" - property var expanded: materialList.expandedTypes.indexOf(materialBrand + "_" + materialName) > -1 - property var colorsModel: materialType != null ? materialType.colors: null - height: childrenRect.height - width: parent ? parent.width :undefined - anchors.left: parent ? parent.left : undefined - Rectangle + Cura.CategoryButton { - id: material_type_header_background - color: - { - if(!expanded && materialBrand + "_" + materialName == materialList.currentType) - { - return UM.Theme.getColor("favorites_row_selected") - } - else - { - return "transparent" - } - } - width: parent.width - height: material_type_header.height - } - Rectangle - { - id: material_type_header_border - color: UM.Theme.getColor("favorites_header_bar") - anchors.bottom: material_type_header.bottom - anchors.left: material_type_header.left - height: UM.Theme.getSize("default_lining").height - width: material_type_header.width - } - Row - { - id: material_type_header + id: categoryButton width: parent.width - leftPadding: UM.Theme.getSize("default_margin").width - anchors + height: UM.Theme.getSize("preferences_page_list_item").height + labelText: materialName + labelFont: UM.Theme.getFont("default") + expanded: material_type_section.expanded + onClicked: { - left: parent ? parent.left : undefined - } - Label - { - text: materialName - height: UM.Theme.getSize("favorites_row").height - width: parent.width - parent.leftPadding - UM.Theme.getSize("favorites_button").width - id: material_type_name - verticalAlignment: Text.AlignVCenter - } - Item // this one causes lots of warnings - { - implicitWidth: UM.Theme.getSize("favorites_button").width - implicitHeight: UM.Theme.getSize("favorites_button").height - UM.RecolorImage { - anchors - { - verticalCenter: parent ? parent.verticalCenter : undefined - horizontalCenter: parent ? parent.horizontalCenter : undefined - } - width: UM.Theme.getSize("standard_arrow").width - height: UM.Theme.getSize("standard_arrow").height - color: "black" - source: material_type_section.expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft") - } - - } - } - MouseArea // causes lots of warnings - { - anchors.fill: material_type_header - onPressed: - { - const identifier = materialBrand + "_" + materialName; - const i = materialList.expandedTypes.indexOf(identifier) - if (i > -1) + const identifier = `${materialBrand}_${materialName}`; + const i = materialList.expandedTypes.indexOf(identifier); + if (i !== -1) { - // Remove it - materialList.expandedTypes.splice(i, 1) - material_type_section.expanded = false + materialList.expandedTypes.splice(i, 1); // remove } else { - // Add it - materialList.expandedTypes.push(identifier) - material_type_section.expanded = true + materialList.expandedTypes.push(identifier); // add } UM.Preferences.setValue("cura/expanded_types", materialList.expandedTypes.join(";")); } } + Column { - height: material_type_section.expanded ? childrenRect.height : 0 visible: material_type_section.expanded width: parent.width - anchors.top: material_type_header.bottom + Repeater { model: colorsModel @@ -131,7 +68,7 @@ Item return; } - expanded = materialList.expandedTypes.indexOf(materialBrand + "_" + materialName) > -1 + material_type_section.expanded = materialList.expandedTypes.indexOf(`${materialBrand}_${materialName}`) !== -1; } } } diff --git a/resources/qml/Preferences/Materials/MaterialsView.qml b/resources/qml/Preferences/Materials/MaterialsView.qml index 2c68973e55..2cbadc6bd6 100644 --- a/resources/qml/Preferences/Materials/MaterialsView.qml +++ b/resources/qml/Preferences/Materials/MaterialsView.qml @@ -1,16 +1,15 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 +import QtQuick.Controls 2.15 import QtQuick.Dialogs 1.2 +import QtQuick.Layouts 1.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura -import ".." // Access to ReadOnlyTextArea.qml - -TabView +Item { id: base @@ -19,8 +18,6 @@ TabView property bool editingEnabled: false property string currency: UM.Preferences.getValue("cura/currency") ? UM.Preferences.getValue("cura/currency") : "€" - property real firstColumnWidth: (width * 0.50) | 0 - property real secondColumnWidth: (width * 0.40) | 0 property string containerId: "" property var materialPreferenceValues: UM.Preferences.getValue("cura/material_settings") ? JSON.parse(UM.Preferences.getValue("cura/material_settings")) : {} property var materialManagementModel: CuraApplication.getMaterialManagementModel() @@ -67,47 +64,69 @@ TabView } } - Tab + Rectangle { - title: catalog.i18nc("@title", "Information") + color: UM.Theme.getColor("main_background") - anchors.margins: UM.Theme.getSize("default_margin").width + anchors + { + top: pageSelectorTabRow.bottom + topMargin: -UM.Theme.getSize("default_lining").width + left: parent.left + right: parent.right + bottom: parent.bottom + } + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("border_main") ScrollView { - id: scrollView - anchors.fill: parent - horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff - flickableItem.flickableDirection: Flickable.VerticalFlick - frameVisible: true - - property real columnWidth: (viewport.width * 0.5 - UM.Theme.getSize("default_margin").width) | 0 + id: informationPage + anchors + { + fill: parent + topMargin: UM.Theme.getSize("thin_margin").height + bottomMargin: UM.Theme.getSize("thin_margin").height + leftMargin: UM.Theme.getSize("thin_margin").width + rightMargin: UM.Theme.getSize("thin_margin").width + } - Flow + ScrollBar.vertical: UM.ScrollBar { - id: containerGrid + id: scrollBar + parent: informationPage.parent + anchors + { + top: parent.top + right: parent.right + bottom: parent.bottom + } + } + ScrollBar.horizontal.policy: ScrollBar.AlwaysOff + clip: true + visible: pageSelectorTabRow.currentItem.activeView === "information" - x: UM.Theme.getSize("default_margin").width - y: UM.Theme.getSize("default_lining").height + property real columnWidth: Math.floor((width - scrollBar.width - UM.Theme.getSize("narrow_margin").width) / 2) + property real rowHeight: UM.Theme.getSize("setting_control").height - width: base.width - property real rowHeight: brandTextField.height + UM.Theme.getSize("default_lining").height + Column + { + width: informationPage.width + spacing: UM.Theme.getSize("narrow_margin").height - MessageDialog + Cura.MessageDialog { id: confirmDiameterChangeDialog - icon: StandardIcon.Question; title: catalog.i18nc("@title:window", "Confirm Diameter Change") text: catalog.i18nc("@label (%1 is a number)", "The new filament diameter is set to %1 mm, which is not compatible with the current extruder. Do you wish to continue?".arg(new_diameter_value)) - standardButtons: StandardButton.Yes | StandardButton.No - modality: Qt.ApplicationModal + standardButtons: Dialog.Yes | Dialog.No - property var new_diameter_value: null; - property var old_diameter_value: null; - property var old_approximate_diameter_value: null; + property var new_diameter_value: null + property var old_diameter_value: null + property var old_approximate_diameter_value: null - onYes: + onAccepted: { base.setMetaDataEntry("approximate_diameter", old_approximate_diameter_value, getApproximateDiameter(new_diameter_value).toString()); base.setMetaDataEntry("properties/diameter", properties.diameter, new_diameter_value); @@ -116,209 +135,337 @@ TabView base.resetSelectedMaterial() } - onNo: + onRejected: { base.properties.diameter = old_diameter_value; - diameterSpinBox.value = Qt.binding(function() { return base.properties.diameter }) + diameterTextField.valueText = Qt.binding(function() { return base.properties.diameter }) } - - onRejected: no() } - Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Display Name") } - ReadOnlyTextField + Row { - id: displayNameTextField; - width: scrollView.columnWidth; - text: properties.name; - readOnly: !base.editingEnabled; - onEditingFinished: base.updateMaterialDisplayName(properties.name, text) + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label + { + height: informationPage.rowHeight + width: informationPage.columnWidth + text: catalog.i18nc("@label", "Display Name") + } + Cura.TextField + { + id: displayNameTextField + width: informationPage.columnWidth + text: properties.name + enabled: base.editingEnabled + onEditingFinished: base.updateMaterialDisplayName(properties.name, text) + } } - Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Brand") } - ReadOnlyTextField + Row { - id: brandTextField; - width: scrollView.columnWidth; - text: properties.brand; - readOnly: !base.editingEnabled; - onEditingFinished: base.updateMaterialBrand(properties.brand, text) + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label + { + height: informationPage.rowHeight + width: informationPage.columnWidth + text: catalog.i18nc("@label", "Brand") + } + Cura.TextField + { + id: brandTextField + width: informationPage.columnWidth + text: properties.brand + enabled: base.editingEnabled + onEditingFinished: base.updateMaterialBrand(properties.brand, text) + } } - Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Material Type") } - ReadOnlyTextField + Row { - id: materialTypeField; - width: scrollView.columnWidth; - text: properties.material; - readOnly: !base.editingEnabled; - onEditingFinished: base.updateMaterialType(properties.material, text) + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label + { + height: informationPage.rowHeight + width: informationPage.columnWidth + text: catalog.i18nc("@label", "Material Type") + } + Cura.TextField + { + id: materialTypeField + width: informationPage.columnWidth + text: properties.material + enabled: base.editingEnabled + onEditingFinished: base.updateMaterialType(properties.material, text) + } } - Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Color") } Row { - width: scrollView.columnWidth - height: parent.rowHeight - spacing: Math.round(UM.Theme.getSize("default_margin").width / 2) + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label + { + height: informationPage.rowHeight + width: informationPage.columnWidth + verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Color") + } - // color indicator square - Rectangle + Row { - id: colorSelector - color: properties.color_code + width: informationPage.columnWidth + spacing: Math.round(UM.Theme.getSize("default_margin").width / 2) + + // color indicator square + Item + { + id: colorSelector - width: Math.round(colorLabel.height * 0.75) - height: Math.round(colorLabel.height * 0.75) - border.width: UM.Theme.getSize("default_lining").height + anchors.verticalCenter: parent.verticalCenter - anchors.verticalCenter: parent.verticalCenter + width: colorSelectorBackground.width + 2 * UM.Theme.getSize("narrow_margin").width + height: colorSelectorBackground.height + 2 * UM.Theme.getSize("narrow_margin").height - // open the color selection dialog on click - MouseArea + Rectangle + { + id: colorSelectorBackground + color: properties.color_code + width: UM.Theme.getSize("icon_indicator").width + height: UM.Theme.getSize("icon_indicator").height + radius: width / 2 + anchors.centerIn: parent + } + + // open the color selection dialog on click + MouseArea + { + anchors.fill: parent + onClicked: colorDialog.open() + enabled: base.editingEnabled + } + } + + // pretty color name text field + Cura.TextField { - anchors.fill: parent - onClicked: colorDialog.open() + id: colorLabel; + width: parent.width - colorSelector.width - parent.spacing + text: properties.color_name; enabled: base.editingEnabled + onEditingFinished: base.setMetaDataEntry("color_name", properties.color_name, text) + } + + // popup dialog to select a new color + // if successful it sets the properties.color_code value to the new color + Cura.ColorDialog + { + id: colorDialog + title: catalog.i18nc("@title", "Material color picker") + color: properties.color_code + onAccepted: base.setMetaDataEntry("color_code", properties.color_code, color) } } + } - // pretty color name text field - ReadOnlyTextField + UM.Label + { + width: parent.width + height: parent.rowHeight + font: UM.Theme.getFont("default_bold") + verticalAlignment: Qt.AlignVCenter + text: catalog.i18nc("@label", "Properties") + } + + Row + { + height: parent.rowHeight + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label { - id: colorLabel; - width: parent.width - colorSelector.width - parent.spacing - text: properties.color_name; - readOnly: !base.editingEnabled - onEditingFinished: base.setMetaDataEntry("color_name", properties.color_name, text) + height: informationPage.rowHeight + width: informationPage.columnWidth + text: catalog.i18nc("@label", "Density") } - // popup dialog to select a new color - // if successful it sets the properties.color_code value to the new color - ColorDialog + Cura.NumericTextFieldWithUnit { - id: colorDialog - color: properties.color_code - onAccepted: base.setMetaDataEntry("color_code", properties.color_code, color) + id: densityTextField + enabled: base.editingEnabled + valueText: properties.density + controlWidth: informationPage.columnWidth + controlHeight: informationPage.rowHeight + spacing: 0 + unitText: "g/cm³" + decimals: 2 + maximum: 1000 + + editingFinishedFunction: function() + { + var modified_text = valueText.replace(",", "."); + base.setMetaDataEntry("properties/density", properties.density, modified_text) + } + + onValueTextChanged: updateCostPerMeter() } } - Item { width: parent.width; height: UM.Theme.getSize("default_margin").height } + Row + { + height: parent.rowHeight + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label + { + height: informationPage.rowHeight + width: informationPage.columnWidth + text: catalog.i18nc("@label", "Diameter") + } - Label { width: parent.width; height: parent.rowHeight; font.bold: true; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Properties") } + Cura.NumericTextFieldWithUnit + { + id: diameterTextField + enabled: base.editingEnabled + valueText: properties.diameter + controlWidth: informationPage.columnWidth + controlHeight: informationPage.rowHeight + spacing: 0 + unitText: "mm" + decimals: 2 + maximum: 1000 + + editingFinishedFunction: function() + { + // This does not use a SettingPropertyProvider, because we need to make the change to all containers + // which derive from the same base_file + var old_diameter = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties/diameter"); + var old_approximate_diameter = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "approximate_diameter"); + var modified_value = valueText.replace(",", "."); + var new_approximate_diameter = getApproximateDiameter(modified_value); + + if (new_approximate_diameter != Cura.ExtruderManager.getActiveExtruderStack().approximateMaterialDiameter) + { + confirmDiameterChangeDialog.old_diameter_value = old_diameter; + confirmDiameterChangeDialog.new_diameter_value = modified_value; + confirmDiameterChangeDialog.old_approximate_diameter_value = old_approximate_diameter; - Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Density") } - ReadOnlySpinBox - { - id: densitySpinBox - width: scrollView.columnWidth - value: properties.density - decimals: 2 - suffix: " g/cm³" - stepSize: 0.01 - readOnly: !base.editingEnabled + confirmDiameterChangeDialog.open() + } + else { + base.setMetaDataEntry("approximate_diameter", old_approximate_diameter, new_approximate_diameter); + base.setMetaDataEntry("properties/diameter", properties.diameter, modified_value); + } + } - onEditingFinished: base.setMetaDataEntry("properties/density", properties.density, value) - onValueChanged: updateCostPerMeter() + onValueTextChanged: updateCostPerMeter() + } } - Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Diameter") } - ReadOnlySpinBox + Row { - id: diameterSpinBox - width: scrollView.columnWidth - value: properties.diameter - decimals: 2 - suffix: " mm" - stepSize: 0.01 - readOnly: !base.editingEnabled + height: parent.rowHeight + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label + { + height: informationPage.rowHeight + width: informationPage.columnWidth + text: catalog.i18nc("@label", "Filament Cost") + } - onEditingFinished: + Cura.NumericTextFieldWithUnit { - // This does not use a SettingPropertyProvider, because we need to make the change to all containers - // which derive from the same base_file - var old_diameter = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties/diameter"); - var old_approximate_diameter = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "approximate_diameter"); - var new_approximate_diameter = getApproximateDiameter(value); - if (new_approximate_diameter != Cura.ExtruderManager.getActiveExtruderStack().approximateMaterialDiameter) + id: spoolCostTextField + valueText: base.getMaterialPreferenceValue(properties.guid, "spool_cost") + controlWidth: informationPage.columnWidth + controlHeight: informationPage.rowHeight + spacing: 0 + unitText: base.currency + decimals: 2 + maximum: 100000000 + + editingFinishedFunction: function() { - confirmDiameterChangeDialog.old_diameter_value = old_diameter; - confirmDiameterChangeDialog.new_diameter_value = value; - confirmDiameterChangeDialog.old_approximate_diameter_value = old_approximate_diameter; - - confirmDiameterChangeDialog.open() - } - else { - base.setMetaDataEntry("approximate_diameter", old_approximate_diameter, getApproximateDiameter(value).toString()); - base.setMetaDataEntry("properties/diameter", properties.diameter, value); + var modified_text = valueText.replace(",", "."); + base.setMaterialPreferenceValue(properties.guid, "spool_cost", modified_text); } + + onValueTextChanged: updateCostPerMeter() } - onValueChanged: updateCostPerMeter() } - Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Filament Cost") } - SpinBox + Row { - id: spoolCostSpinBox - width: scrollView.columnWidth - value: base.getMaterialPreferenceValue(properties.guid, "spool_cost") - prefix: base.currency + " " - decimals: 2 - maximumValue: 100000000 - - onValueChanged: + height: parent.rowHeight + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label { - base.setMaterialPreferenceValue(properties.guid, "spool_cost", parseFloat(value)) - updateCostPerMeter() + height: informationPage.rowHeight + width: informationPage.columnWidth + text: catalog.i18nc("@label", "Filament weight") } - } - Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Filament weight") } - SpinBox - { - id: spoolWeightSpinBox - width: scrollView.columnWidth - value: base.getMaterialPreferenceValue(properties.guid, "spool_weight", Cura.ContainerManager.getContainerMetaDataEntry(properties.container_id, "properties/weight")) - suffix: " g" - stepSize: 100 - decimals: 0 - maximumValue: 10000 - - onValueChanged: + Cura.NumericTextFieldWithUnit { - base.setMaterialPreferenceValue(properties.guid, "spool_weight", parseFloat(value)) - updateCostPerMeter() + id: spoolWeightTextField + valueText: base.getMaterialPreferenceValue(properties.guid, "spool_weight", Cura.ContainerManager.getContainerMetaDataEntry(properties.container_id, "properties/weight")) + controlWidth: informationPage.columnWidth + controlHeight: informationPage.rowHeight + spacing: 0 + unitText: " g" + decimals: 0 + maximum: 10000 + + editingFinishedFunction: function() + { + var modified_text = valueText.replace(",", ".") + base.setMaterialPreferenceValue(properties.guid, "spool_weight", modified_text) + } + + onValueTextChanged: updateCostPerMeter() } } - Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Filament length") } - Label + Row { - width: scrollView.columnWidth - text: "~ %1 m".arg(Math.round(base.spoolLength)) - verticalAlignment: Qt.AlignVCenter height: parent.rowHeight + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label + { + height: informationPage.rowHeight + width: informationPage.columnWidth + text: catalog.i18nc("@label", "Filament length") + } + UM.Label + { + width: informationPage.columnWidth + text: "~ %1 m".arg(Math.round(base.spoolLength)) + height: informationPage.rowHeight + } } - Label { width: scrollView.columnWidth; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Cost per Meter") } - Label + Row { - width: scrollView.columnWidth - text: "~ %1 %2/m".arg(base.costPerMeter.toFixed(2)).arg(base.currency) - verticalAlignment: Qt.AlignVCenter height: parent.rowHeight + spacing: UM.Theme.getSize("narrow_margin").width + UM.Label + { + height: informationPage.rowHeight + width: informationPage.columnWidth + text: catalog.i18nc("@label", "Cost per Meter") + } + UM.Label + { + height: informationPage.rowHeight + width: informationPage.columnWidth + text: "~ %1 %2/m".arg(base.costPerMeter.toFixed(2)).arg(base.currency) + } } - Item { width: parent.width; height: UM.Theme.getSize("default_margin").height; visible: unlinkMaterialButton.visible } - Label + UM.Label { - width: 2 * scrollView.columnWidth - verticalAlignment: Qt.AlignVCenter + height: parent.rowHeight + width: informationPage.width text: catalog.i18nc("@label", "This material is linked to %1 and shares some of its properties.").arg(base.linkedMaterialNames) wrapMode: Text.WordWrap visible: unlinkMaterialButton.visible } - Button + Cura.SecondaryButton { id: unlinkMaterialButton text: catalog.i18nc("@label", "Unlink Material") @@ -330,141 +477,183 @@ TabView } } - Item { width: parent.width; height: UM.Theme.getSize("default_margin").height } - - Label { width: parent.width; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Description") } - - ReadOnlyTextArea + UM.Label + { + width: informationPage.width + height: parent.rowHeight + text: catalog.i18nc("@label", "Description") + } + Cura.ReadOnlyTextArea { - text: properties.description; - width: 2 * scrollView.columnWidth + text: properties.description + width: informationPage.width - scrollBar.width + height: 0.4 * informationPage.width wrapMode: Text.WordWrap - readOnly: !base.editingEnabled; + readOnly: !base.editingEnabled onEditingFinished: base.setMetaDataEntry("description", properties.description, text) } - Label { width: parent.width; height: parent.rowHeight; verticalAlignment: Qt.AlignVCenter; text: catalog.i18nc("@label", "Adhesion Information") } + UM.Label + { + width: informationPage.width + height: parent.rowHeight + text: catalog.i18nc("@label", "Adhesion Information") + } - ReadOnlyTextArea + Cura.ReadOnlyTextArea { - text: properties.adhesion_info; - width: 2 * scrollView.columnWidth + text: properties.adhesion_info + width: informationPage.width - scrollBar.width + height: 0.4 * informationPage.width wrapMode: Text.WordWrap - - readOnly: !base.editingEnabled; + readOnly: !base.editingEnabled onEditingFinished: base.setMetaDataEntry("adhesion_info", properties.adhesion_info, text) } - - Item { width: parent.width; height: UM.Theme.getSize("default_margin").height } - } - - function updateCostPerMeter() - { - base.spoolLength = calculateSpoolLength(diameterSpinBox.value, densitySpinBox.value, spoolWeightSpinBox.value); - base.costPerMeter = calculateCostPerMeter(spoolCostSpinBox.value); } } - } - Tab - { - title: catalog.i18nc("@label", "Print settings") - anchors + ListView { - leftMargin: UM.Theme.getSize("default_margin").width - topMargin: UM.Theme.getSize("default_margin").height - bottomMargin: UM.Theme.getSize("default_margin").height - rightMargin: 0 - } + id: settingsPage + visible: pageSelectorTabRow.currentItem.activeView === "settings" + clip: true - ScrollView - { - anchors.fill: parent; + anchors + { + fill: parent + topMargin: UM.Theme.getSize("thin_margin").height + bottomMargin: UM.Theme.getSize("thin_margin").height + leftMargin: UM.Theme.getSize("thin_margin").width + rightMargin: UM.Theme.getSize("thin_margin").width + } + + width: settingsPage.width + spacing: UM.Theme.getSize("narrow_margin").height - ListView + ScrollBar.vertical: UM.ScrollBar { - model: UM.SettingDefinitionsModel + id: settingScrollBar + parent: settingsPage.parent + anchors { - containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" - visibilityHandler: Cura.MaterialSettingsVisibilityHandler { } - expanded: ["*"] + top: parent.top + right: parent.right + bottom: parent.bottom } + } + + property real columnWidth: Math.floor((width - settingScrollBar.width - UM.Theme.getSize("narrow_margin").width) / 2) + + model: UM.SettingDefinitionsModel + { + containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" + visibilityHandler: Cura.MaterialSettingsVisibilityHandler { } + expanded: ["*"] + } + + delegate: UM.TooltipArea + { + width: childrenRect.width + height: childrenRect.height - delegate: UM.TooltipArea + UM.TooltipArea { - width: childrenRect.width - height: childrenRect.height + anchors.fill: parent text: model.description - Label - { - id: label - width: base.firstColumnWidth; - height: spinBox.height + UM.Theme.getSize("default_lining").height - text: model.label - elide: Text.ElideRight - verticalAlignment: Qt.AlignVCenter - } - ReadOnlySpinBox + } + UM.Label + { + id: label + width: settingsPage.columnWidth + height: spinBox.height + UM.Theme.getSize("default_lining").height + text: model.label + elide: Text.ElideRight + verticalAlignment: Qt.AlignVCenter + } + Cura.SpinBox + { + id: spinBox + anchors.left: label.right + value: { - id: spinBox - anchors.left: label.right - value: + // In case the setting is not in the material... + if (!isNaN(parseFloat(materialPropertyProvider.properties.value))) { - // In case the setting is not in the material... - if (!isNaN(parseFloat(materialPropertyProvider.properties.value))) - { - return parseFloat(materialPropertyProvider.properties.value); - } - // ... we search in the variant, and if it is not there... - if (!isNaN(parseFloat(variantPropertyProvider.properties.value))) - { - return parseFloat(variantPropertyProvider.properties.value); - } - // ... then look in the definition container. - if (!isNaN(parseFloat(machinePropertyProvider.properties.value))) - { - return parseFloat(machinePropertyProvider.properties.value); - } - return 0; + return parseFloat(materialPropertyProvider.properties.value); } - width: base.secondColumnWidth - readOnly: !base.editingEnabled - suffix: " " + model.unit - maximumValue: 99999 - decimals: model.unit == "mm" ? 2 : 0 - - onEditingFinished: materialPropertyProvider.setPropertyValue("value", value) + // ... we search in the variant, and if it is not there... + if (!isNaN(parseFloat(variantPropertyProvider.properties.value))) + { + return parseFloat(variantPropertyProvider.properties.value); + } + // ... then look in the definition container. + if (!isNaN(parseFloat(machinePropertyProvider.properties.value))) + { + return parseFloat(machinePropertyProvider.properties.value); + } + return 0; } + width: settingsPage.columnWidth + suffix: " " + model.unit + to: 99999 + decimals: model.unit == "mm" ? 2 : 0 - UM.ContainerPropertyProvider - { - id: materialPropertyProvider - containerId: base.containerId - watchedProperties: [ "value" ] - key: model.key - } - UM.ContainerPropertyProvider - { - id: variantPropertyProvider - containerId: Cura.MachineManager.activeStack.variant.id - watchedProperties: [ "value" ] - key: model.key - } - UM.ContainerPropertyProvider - { - id: machinePropertyProvider - containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" - watchedProperties: [ "value" ] - key: model.key - } + onEditingFinished: materialPropertyProvider.setPropertyValue("value", value) + } + + UM.ContainerPropertyProvider + { + id: materialPropertyProvider + containerId: base.containerId + watchedProperties: [ "value" ] + key: model.key + } + UM.ContainerPropertyProvider + { + id: variantPropertyProvider + containerId: Cura.MachineManager.activeStack.variant.id + watchedProperties: [ "value" ] + key: model.key + } + UM.ContainerPropertyProvider + { + id: machinePropertyProvider + containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" + watchedProperties: ["value"] + key: model.key } } } } + UM.TabRow + { + id: pageSelectorTabRow + UM.TabRowButton + { + text: catalog.i18nc("@title", "Information") + property string activeView: "information" //To determine which page gets displayed. + } + UM.TabRowButton + { + text: catalog.i18nc("@label", "Print settings") + property string activeView: "settings" + } + } + + function updateCostPerMeter() + { + var modified_weight = spoolWeightTextField.valueText.replace(",", ".") + var modified_cost = spoolCostTextField.valueText.replace(",", ".") + var modified_diameter = diameterTextField.valueText.replace(",", ".") + var modified_density = densityTextField.valueText.replace(",", ".") + base.spoolLength = calculateSpoolLength(modified_diameter, modified_density, parseInt(modified_weight)); + base.costPerMeter = calculateCostPerMeter(parseFloat(modified_cost)); + } + function calculateSpoolLength(diameter, density, spoolWeight) { if(!diameter) diff --git a/resources/qml/Preferences/ProfileTab.qml b/resources/qml/Preferences/ProfileTab.qml deleted file mode 100644 index 3c0c46ed72..0000000000 --- a/resources/qml/Preferences/ProfileTab.qml +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.7 -import QtQuick.Controls 1.4 - -import UM 1.2 as UM -import Cura 1.0 as Cura - -Tab -{ - id: base - - property int extruderPosition: -1 //Denotes the global stack. - property var qualityItem: null - - property bool isQualityItemCurrentlyActivated: - { - if (qualityItem == null) - { - return false; - } - return qualityItem.name == Cura.MachineManager.activeQualityOrQualityChangesName; - } - - TableView - { - anchors.fill: parent - anchors.margins: UM.Theme.getSize("default_margin").width - id: profileSettingsView - - Component - { - id: itemDelegate - - UM.TooltipArea - { - property var setting: qualitySettings.getItem(styleData.row) - height: childrenRect.height - width: (parent != null) ? parent.width : 0 - text: - { - if (styleData.value === undefined) - { - return "" - } - return (styleData.value.substr(0,1) == "=") ? styleData.value : "" - } - - Label - { - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.right: parent.right - text: - { - if (styleData.value === undefined) - { - return "" - } - return (styleData.value.substr(0,1) == "=") ? catalog.i18nc("@info:status", "Calculated") : styleData.value - } - font.strikeout: styleData.column == 1 && setting.user_value != "" && base.isQualityItemCurrentlyActivated - font.italic: setting.profile_value_source == "quality_changes" || (setting.user_value != "" && base.isQualityItemCurrentlyActivated) - opacity: font.strikeout ? 0.5 : 1 - color: styleData.textColor - elide: Text.ElideRight - } - } - } - - TableViewColumn - { - role: "label" - title: catalog.i18nc("@title:column", "Setting") - width: (parent.width * 0.4) | 0 - delegate: itemDelegate - } - TableViewColumn - { - role: "profile_value" - title: catalog.i18nc("@title:column", "Profile") - width: (parent.width * 0.18) | 0 - delegate: itemDelegate - } - TableViewColumn - { - role: "user_value" - title: catalog.i18nc("@title:column", "Current"); - visible: base.isQualityItemCurrentlyActivated - width: (parent.width * 0.18) | 0 - delegate: itemDelegate - } - TableViewColumn - { - role: "unit" - title: catalog.i18nc("@title:column", "Unit") - width: (parent.width * 0.14) | 0 - delegate: itemDelegate - } - - section.property: "category" - section.delegate: Label - { - text: section - font.bold: true - } - - model: Cura.QualitySettingsModel - { - id: qualitySettings - selectedPosition: base.extruderPosition - selectedQualityItem: base.qualityItem == null ? {} : base.qualityItem - } - - SystemPalette { id: palette } - } -} diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 9144d4dbe1..9ea23194e7 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -1,51 +1,29 @@ -// Copyright (c) 2019 Ultimaker B.V. -// Uranium is released under the terms of the LGPLv3 or higher. +//Copyright (c) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 +import QtQuick.Controls 2.15 import QtQuick.Layouts 1.3 import QtQuick.Dialogs 1.2 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.6 as Cura -Item +UM.ManagementPage { id: base - property var resetEnabled: false // Keep PreferencesDialog happy property var extrudersModel: CuraApplication.getExtrudersModel() property var qualityManagementModel: CuraApplication.getQualityManagementModel() + property bool hasCurrentItem: base.currentItem != null - UM.I18nCatalog { id: catalog; name: "cura"; } + property var currentItem: objectList.currentIndex == -1 ? null : base.qualityManagementModel.getItem(objectList.currentIndex) - Label - { - id: titleLabel - anchors - { - top: parent.top - left: parent.left - right: parent.right - margins: 5 * screenScaleFactor - } - font.pointSize: 18 - text: catalog.i18nc("@title:tab", "Profiles") - } + property string currentItemName: hasCurrentItem ? base.currentItem.name : "" + property string currentItemDisplayName: hasCurrentItem ? base.qualityManagementModel.getQualityItemDisplayName(base.currentItem) : "" - property var hasCurrentItem: base.currentItem != null - - property var currentItem: - { - var current_index = qualityListView.currentIndex; - return (current_index == -1) ? null : base.qualityManagementModel.getItem(current_index); - } - - property var currentItemName: hasCurrentItem ? base.currentItem.name : "" - property var currentItemDisplayName: hasCurrentItem ? base.qualityManagementModel.getQualityItemDisplayName(base.currentItem) : "" - - property var isCurrentItemActivated: + property bool isCurrentItemActivated: { if (!base.currentItem) { @@ -61,567 +39,391 @@ Item } } - property var canCreateProfile: - { - return isCurrentItemActivated && Cura.MachineManager.hasUserSettings; - } + property bool canCreateProfile: Cura.MachineManager.hasUserSettings - Row // Button Row - { - id: buttonRow - anchors - { - left: parent.left - right: parent.right - top: titleLabel.bottom - } - height: childrenRect.height + signal createProfile() // Click create profile from ... in Profile context menu - // Activate button - Button - { - id: activateMenuButton - text: catalog.i18nc("@action:button", "Activate") - iconName: "list-activate" - enabled: !isCurrentItemActivated && base.currentItem - onClicked: - { - if(base.currentItem.is_read_only) - { - Cura.IntentManager.selectIntent(base.currentItem.intent_category, base.currentItem.quality_type); - } - else - { - Cura.MachineManager.setQualityChangesGroup(base.currentItem.quality_changes_group); - } - } - } + property string newQualityNameToSelect: "" + property bool toActivateNewQuality: false - // Create button - Button - { - id: createMenuButton - text: catalog.i18nc("@label", "Create") - iconName: "list-add" - enabled: base.canCreateProfile && !Cura.MachineManager.stacksHaveErrors - visible: base.canCreateProfile + onCreateProfile: + { + createQualityDialog.object = Cura.ContainerManager.makeUniqueName(Cura.MachineManager.activeQualityOrQualityChangesName); + createQualityDialog.open(); + createQualityDialog.selectText(); + } - onClicked: - { - createQualityDialog.object = Cura.ContainerManager.makeUniqueName(base.currentItem.name); - createQualityDialog.open(); - createQualityDialog.selectText(); - } - } + title: catalog.i18nc("@title:tab", "Profiles") + detailsPlaneCaption: base.currentItemDisplayName + scrollviewCaption: catalog.i18nc("@label", "Profiles compatible with active printer:") + "<br><b>" + Cura.MachineManager.activeMachine.name + "</b>" - // Duplicate button - Button - { - id: duplicateMenuButton - text: catalog.i18nc("@label", "Duplicate") - iconName: "list-add" - enabled: !base.canCreateProfile - visible: !base.canCreateProfile + hamburgerButtonVisible: hasCurrentItem + onHamburgeButtonClicked: { + const hamburerButtonHeight = hamburger_button.height; + menu.popup(hamburger_button, -menu.width + hamburger_button.width / 2, hamburger_button.height); - onClicked: - { - duplicateQualityDialog.object = Cura.ContainerManager.makeUniqueName(base.currentItem.name); - duplicateQualityDialog.open(); - duplicateQualityDialog.selectText(); - } - } + // for some reason the height of the hamburger changes when opening the popup + // reset height to initial heigt + hamburger_button.height = hamburerButtonHeight; + } - // Remove button - Button + isActiveModelFunction: function(model, id) { + if (model.is_read_only) { - id: removeMenuButton - text: catalog.i18nc("@action:button", "Remove") - iconName: "list-remove" - enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated - onClicked: - { - forceActiveFocus(); - confirmRemoveQualityDialog.open(); - } + return (model.name == Cura.MachineManager.activeQualityOrQualityChangesName) && (model.intent_category == Cura.MachineManager.activeIntentCategory); } - - // Rename button - Button + else { - id: renameMenuButton - text: catalog.i18nc("@action:button", "Rename") - iconName: "edit-rename" - enabled: base.hasCurrentItem && !base.currentItem.is_read_only - onClicked: - { - renameQualityDialog.object = base.currentItem.name; - renameQualityDialog.open(); - renameQualityDialog.selectText(); - } + return model.name == Cura.MachineManager.activeQualityOrQualityChangesName; } + } - // Import button - Button + sectionRole: "section_name" + + model: qualityManagementModel + buttons: [ + Cura.SecondaryButton { - id: importMenuButton text: catalog.i18nc("@action:button", "Import") - iconName: "document-import" + onClicked:importDialog.open() + }, + Cura.SecondaryButton + { + id: createMenuButton + text: catalog.i18nc("@action:button", "Create new") + + enabled: !Cura.MachineManager.stacksHaveErrors + visible: base.canCreateProfile + tooltip: catalog.i18nc("@action:tooltip", "Create new profile from current settings/overrides") onClicked: { - importDialog.open(); + createQualityDialog.object = Cura.ContainerManager.makeUniqueName("<new name>") + createQualityDialog.open() + createQualityDialog.selectText() } } + ] - // Export button - Button + Column + { + id: detailsPanelHeaderColumn + anchors { - id: exportMenuButton - text: catalog.i18nc("@action:button", "Export") - iconName: "document-export" - enabled: base.hasCurrentItem && !base.currentItem.is_read_only - onClicked: - { - exportDialog.open(); - } + left: parent.left + right: parent.right + top: parent.top } - } - // Click create profile from ... in Profile context menu - signal createProfile() - onCreateProfile: - { - createQualityDialog.object = Cura.ContainerManager.makeUniqueName(Cura.MachineManager.activeQualityOrQualityChangesName); - createQualityDialog.open(); - createQualityDialog.selectText(); - } + spacing: UM.Theme.getSize("default_margin").height + visible: base.currentItem != null - // Dialog to request a name when creating a new profile - UM.RenameDialog - { - id: createQualityDialog - title: catalog.i18nc("@title:window", "Create Profile") - object: "<new name>" - explanation: catalog.i18nc("@info", "Please provide a name for this profile.") - onAccepted: + UM.Label { - base.newQualityNameToSelect = newName; // We want to switch to the new profile once it's created - base.toActivateNewQuality = true; - base.qualityManagementModel.createQualityChanges(newName); + anchors.left: parent.left + anchors.right: parent.right + text: catalog.i18nc("@action:label", "Some settings from current profile were overwritten.") + visible: currentSettingsActions.visible } - } - property string newQualityNameToSelect: "" - property bool toActivateNewQuality: false - - // This connection makes sure that we will switch to the correct quality after the model gets updated - Connections - { - target: base.qualityManagementModel - function onItemsChanged() + Flow { - var toSelectItemName = base.currentItem == null ? "" : base.currentItem.name; - if (newQualityNameToSelect != "") + id: currentSettingsActions + width: parent.width + + visible: base.hasCurrentItem && base.currentItem.name == Cura.MachineManager.activeQualityOrQualityChangesName && base.currentItem.intent_category == Cura.MachineManager.activeIntentCategory + + spacing: UM.Theme.getSize("default_margin").width + + Cura.SecondaryButton { - toSelectItemName = newQualityNameToSelect; + text: catalog.i18nc("@action:button", "Update profile.") + enabled: Cura.MachineManager.hasUserSettings && objectList.currentIndex && !objectList.currentIndex.is_read_only + onClicked: Cura.ContainerManager.updateQualityChanges() + tooltip: catalog.i18nc("@action:tooltip", "Update profile with current settings/overrides") } - var newIdx = -1; // Default to nothing if nothing can be found - if (toSelectItemName != "") + Cura.SecondaryButton { - // Select the required quality name if given - for (var idx = 0; idx < base.qualityManagementModel.count; ++idx) - { - var item = base.qualityManagementModel.getItem(idx); - if (item && item.name == toSelectItemName) - { - // Switch to the newly created profile if needed - newIdx = idx; - if (base.toActivateNewQuality) - { - // Activate this custom quality if required - if(item.quality_changes_group) - { - Cura.MachineManager.setQualityChangesGroup(item.quality_changes_group); - } - } - break; - } - } + text: catalog.i18nc("@action:button", "Discard current changes") + enabled: Cura.MachineManager.hasUserSettings + onClicked: Cura.ContainerManager.clearUserContainers() } - qualityListView.currentIndex = newIdx; - - // Reset states - base.newQualityNameToSelect = ""; - base.toActivateNewQuality = false; } - } - // Dialog to request a name when duplicating a new profile - UM.RenameDialog - { - id: duplicateQualityDialog - title: catalog.i18nc("@title:window", "Duplicate Profile") - object: "<new name>" - onAccepted: + UM.Label { - base.qualityManagementModel.duplicateQualityChanges(newName, base.currentItem); + id: defaultsMessage + visible: false + text: catalog.i18nc("@action:label", "This profile uses the defaults specified by the printer, so it has no settings/overrides in the list below.") + width: parent.width } - } - - // Confirmation dialog for removing a profile - MessageDialog - { - id: confirmRemoveQualityDialog - - icon: StandardIcon.Question; - title: catalog.i18nc("@title:window", "Confirm Remove") - text: catalog.i18nc("@label (%1 is object name)", "Are you sure you wish to remove %1? This cannot be undone!").arg(base.currentItemName) - standardButtons: StandardButton.Yes | StandardButton.No - modality: Qt.ApplicationModal - - onYes: + UM.Label { - base.qualityManagementModel.removeQualityChangesGroup(base.currentItem.quality_changes_group); - // reset current item to the first if available - qualityListView.currentIndex = -1; // Reset selection. + id: noCurrentSettingsMessage + visible: base.isCurrentItemActivated && !Cura.MachineManager.hasUserSettings + text: catalog.i18nc("@action:label", "Your current settings match the selected profile.") + width: parent.width } - } - // Dialog to rename a quality profile - UM.RenameDialog - { - id: renameQualityDialog - title: catalog.i18nc("@title:window", "Rename Profile") - object: "<new name>" - onAccepted: - { - var actualNewName = base.qualityManagementModel.renameQualityChangesGroup(base.currentItem.quality_changes_group, newName); - base.newQualityNameToSelect = actualNewName; // Select the new name after the model gets updated - } - } - - // Dialog for importing a quality profile - FileDialog - { - id: importDialog - title: catalog.i18nc("@title:window", "Import Profile") - selectExisting: true - nameFilters: base.qualityManagementModel.getFileNameFilters("profile_reader") - folder: CuraApplication.getDefaultPath("dialog_profile_path") - onAccepted: + UM.TabRow { - var result = Cura.ContainerManager.importProfile(fileUrl); - messageDialog.text = result.message; - if (result.status == "ok") + id: profileExtruderTabs + // One extra tab for the global settings. + UM.TabRowButton { - messageDialog.icon = StandardIcon.Information; + text: catalog.i18nc("@title:tab", "Global Settings") } - else if (result.status == "warning" || result.status == "duplicate") - { - messageDialog.icon = StandardIcon.Warning; - } - else - { - messageDialog.icon = StandardIcon.Critical; - } - messageDialog.open(); - CuraApplication.setDefaultPath("dialog_profile_path", folder); - } - } - - // Dialog for exporting a quality profile - FileDialog - { - id: exportDialog - title: catalog.i18nc("@title:window", "Export Profile") - selectExisting: false - nameFilters: base.qualityManagementModel.getFileNameFilters("profile_writer") - folder: CuraApplication.getDefaultPath("dialog_profile_path") - onAccepted: - { - var result = Cura.ContainerManager.exportQualityChangesGroup(base.currentItem.quality_changes_group, - fileUrl, selectedNameFilter); - if (result && result.status == "error") + Repeater { - messageDialog.icon = StandardIcon.Critical; - messageDialog.text = result.message; - messageDialog.open(); - } + model: base.extrudersModel - // else pop-up Message thing from python code - CuraApplication.setDefaultPath("dialog_profile_path", folder); + UM.TabRowButton + { + text: model.name + } + } } } - Item + Rectangle { - id: contentsItem - + color: UM.Theme.getColor("main_background") anchors { - top: titleLabel.bottom + top: detailsPanelHeaderColumn.bottom + topMargin: -UM.Theme.getSize("default_lining").width left: parent.left right: parent.right bottom: parent.bottom - margins: 5 * screenScaleFactor - bottomMargin: 0 } - - clip: true + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("thick_lining") + visible: base.hasCurrentItem } - Item + Cura.ProfileOverview { anchors { - top: buttonRow.bottom - topMargin: UM.Theme.getSize("default_margin").height + top: detailsPanelHeaderColumn.bottom + margins: UM.Theme.getSize("default_margin").height left: parent.left right: parent.right bottom: parent.bottom } - SystemPalette - { - id: palette - } - - Label - { - id: captionLabel - anchors - { - top: parent.top - left: parent.left - } - visible: text != "" - text: catalog.i18nc("@label %1 is printer name", "Printer: %1").arg(Cura.MachineManager.activeMachine.name) - width: profileScrollView.width - elide: Text.ElideRight - } + visible: detailsPanelHeaderColumn.visible + qualityItem: base.currentItem + extruderPosition: profileExtruderTabs.currentIndex - 1 + } - ScrollView + Item + { + id: content_item + anchors.fill: parent + // This connection makes sure that we will switch to the correct quality after the model gets updated + Connections { - id: profileScrollView - anchors + target: base.qualityManagementModel + function onItemsChanged() { - top: captionLabel.visible ? captionLabel.bottom : parent.top - topMargin: captionLabel.visible ? UM.Theme.getSize("default_margin").height : 0 - bottom: parent.bottom - left: parent.left - } - - Rectangle - { - parent: viewport - anchors.fill: parent - color: palette.light - } - - width: true ? (parent.width * 0.4) | 0 : parent.width - frameVisible: true - clip: true - - ListView - { - id: qualityListView - - model: base.qualityManagementModel - - Component.onCompleted: + var toSelectItemName = base.currentItem == null ? "" : base.currentItem.name; + if (newQualityNameToSelect != "") { - var selectedItemName = Cura.MachineManager.activeQualityOrQualityChangesName; + toSelectItemName = newQualityNameToSelect; + } + var newIdx = -1; // Default to nothing if nothing can be found + if (toSelectItemName != "") + { // Select the required quality name if given - for (var idx = 0; idx < base.qualityManagementModel.count; idx++) + for (var idx = 0; idx < base.qualityManagementModel.count; ++idx) { var item = base.qualityManagementModel.getItem(idx); - if (item.name == selectedItemName) + if (item && item.name == toSelectItemName) { - currentIndex = idx; + // Switch to the newly created profile if needed + newIdx = idx; + if (base.toActivateNewQuality) + { + // Activate this custom quality if required + if(item.quality_changes_group) + { + Cura.MachineManager.setQualityChangesGroup(item.quality_changes_group); + } + } break; } } } + objectList.currentIndex = newIdx; - section.property: "section_name" - section.delegate: Rectangle - { - height: childrenRect.height - - Label - { - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_lining").width - text: section - font.bold: true - } - } - - delegate: Rectangle - { - width: profileScrollView.width - height: childrenRect.height + // Reset states + base.newQualityNameToSelect = ""; + base.toActivateNewQuality = false; + } + } + Cura.MessageDialog + { + id: messageDialog + standardButtons: Dialog.Ok + } - // Added this property to identify custom profiles in automated system tests (Squish) - property bool isReadOnly: model.is_read_only + // Dialog to request a name when creating a new profile + Cura.RenameDialog + { + id: createQualityDialog + title: catalog.i18nc("@title:window", "Create Profile") + object: "<new name>" + explanation: catalog.i18nc("@info", "Please provide a name for this profile.") + onAccepted: + { + base.newQualityNameToSelect = newName; // We want to switch to the new profile once it's created + base.toActivateNewQuality = true; + base.qualityManagementModel.createQualityChanges(newName); + } + } - property bool isCurrentItem: ListView.isCurrentItem - color: isCurrentItem ? palette.highlight : (model.index % 2) ? palette.base : palette.alternateBase + Cura.Menu + { + id: menu + Cura.MenuItem + { + text: catalog.i18nc("@action:button", "Activate") - Label + enabled: !isCurrentItemActivated && base.currentItem + onTriggered: + { + if(base.currentItem.is_read_only) { - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - anchors.right: parent.right - width: Math.floor((parent.width * 0.8)) - text: model.name - elide: Text.ElideRight - font.italic: - { - if (model.is_read_only) - { - // For built-in qualities, it needs to match both the intent category and the quality name - return model.name == Cura.MachineManager.activeQualityOrQualityChangesName && model.intent_category == Cura.MachineManager.activeIntentCategory - } - else - { - // For custom qualities, it only needs to match the name - return model.name == Cura.MachineManager.activeQualityOrQualityChangesName - } - } - color: parent.isCurrentItem ? palette.highlightedText : palette.text + Cura.IntentManager.selectIntent(base.currentItem.intent_category, base.currentItem.quality_type) } - - MouseArea + else { - anchors.fill: parent - onClicked: - { - parent.ListView.view.currentIndex = model.index; - } + Cura.MachineManager.setQualityChangesGroup(base.currentItem.quality_changes_group) } } } - } - - // details panel on the right - Item - { - id: detailsPanel - - anchors + Cura.MenuItem { - left: profileScrollView.right - leftMargin: UM.Theme.getSize("default_margin").width - top: parent.top - bottom: parent.bottom - right: parent.right + text: catalog.i18nc("@action:button", "Duplicate") + enabled: base.hasCurrentItem + onTriggered: + { + forceActiveFocus() + duplicateQualityDialog.open() + } } - - Item + Cura.MenuItem { - anchors.fill: parent - visible: base.currentItem != null - - Item // Profile title Label + text: catalog.i18nc("@action:button", "Remove") + enabled: base.hasCurrentItem && !base.currentItem.is_read_only && !base.isCurrentItemActivated + onTriggered: { - id: profileName - - width: parent.width - height: childrenRect.height - - Label - { - anchors.left: parent.left - anchors.right: parent.right - text: base.currentItemDisplayName - font: UM.Theme.getFont("large_bold") - elide: Text.ElideRight - renderType: Text.NativeRendering - } + forceActiveFocus() + confirmRemoveQualityDialog.open() } - - Flow + } + Cura.MenuItem + { + text: catalog.i18nc("@action:button", "Rename") + enabled: base.hasCurrentItem && !base.currentItem.is_read_only + onTriggered: { - id: currentSettingsActions - visible: base.hasCurrentItem && base.currentItem.name == Cura.MachineManager.activeQualityOrQualityChangesName && base.currentItem.intent_category == Cura.MachineManager.activeIntentCategory - anchors.left: parent.left - anchors.right: parent.right - anchors.top: profileName.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height - - Button - { - text: catalog.i18nc("@action:button", "Update profile with current settings/overrides") - enabled: Cura.MachineManager.hasUserSettings && !base.currentItem.is_read_only - onClicked: Cura.ContainerManager.updateQualityChanges() - } - - Button - { - text: catalog.i18nc("@action:button", "Discard current changes"); - enabled: Cura.MachineManager.hasUserSettings - onClicked: Cura.ContainerManager.clearUserContainers(); - } + renameQualityDialog.object = base.currentItem.name + renameQualityDialog.open() + renameQualityDialog.selectText() } + } + Cura.MenuItem + { + text: catalog.i18nc("@action:button", "Export") + enabled: base.hasCurrentItem && !base.currentItem.is_read_only + onTriggered: exportDialog.open() + } + } - Column + // Dialog for exporting a quality profile + FileDialog + { + id: exportDialog + title: catalog.i18nc("@title:window", "Export Profile") + selectExisting: false + nameFilters: base.qualityManagementModel.getFileNameFilters("profile_writer") + folder: CuraApplication.getDefaultPath("dialog_profile_path") + onAccepted: + { + var result = Cura.ContainerManager.exportQualityChangesGroup(base.currentItem.quality_changes_group, + fileUrl, selectedNameFilter); + + if (result && result.status == "error") { - id: profileNotices - anchors.top: currentSettingsActions.visible ? currentSettingsActions.bottom : currentSettingsActions.anchors.top - anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.left: parent.left - anchors.right: parent.right - spacing: UM.Theme.getSize("default_margin").height - - Label - { - id: defaultsMessage - visible: false - text: catalog.i18nc("@action:label", "This profile uses the defaults specified by the printer, so it has no settings/overrides in the list below.") - wrapMode: Text.WordWrap - width: parent.width - } - Label - { - id: noCurrentSettingsMessage - visible: base.isCurrentItemActivated && !Cura.MachineManager.hasUserSettings - text: catalog.i18nc("@action:label", "Your current settings match the selected profile.") - wrapMode: Text.WordWrap - width: parent.width - } + messageDialog.title = catalog.i18nc("@title:window", "Export Profile") + messageDialog.text = result.message; + messageDialog.open(); } - TabView - { - anchors.left: parent.left - anchors.top: profileNotices.visible ? profileNotices.bottom : profileNotices.anchors.top - anchors.topMargin: UM.Theme.getSize("default_margin").height - anchors.right: parent.right - anchors.bottom: parent.bottom + // else pop-up Message thing from python code + CuraApplication.setDefaultPath("dialog_profile_path", folder); + } + } - currentIndex: 0 + // Dialog to request a name when duplicating a new profile + Cura.RenameDialog + { + id: duplicateQualityDialog + title: catalog.i18nc("@title:window", "Duplicate Profile") + object: "<new name>" + onAccepted: base.qualityManagementModel.duplicateQualityChanges(newName, base.currentItem) + } - ProfileTab - { - title: catalog.i18nc("@title:tab", "Global Settings") - qualityItem: base.currentItem - } + // Confirmation dialog for removing a profile + Cura.MessageDialog + { + id: confirmRemoveQualityDialog - Repeater - { - model: base.extrudersModel + title: catalog.i18nc("@title:window", "Confirm Remove") + text: catalog.i18nc("@label (%1 is object name)", "Are you sure you wish to remove %1? This cannot be undone!").arg(base.currentItemName) + standardButtons: StandardButton.Yes | StandardButton.No + modal: true - ProfileTab - { - title: model.name - extruderPosition: model.index - qualityItem: base.currentItem - } - } - } + onAccepted: + { + base.qualityManagementModel.removeQualityChangesGroup(base.currentItem.quality_changes_group); + // reset current item to the first if available + qualityListView.currentIndex = -1; // Reset selection. + } + } + + // Dialog to rename a quality profile + Cura.RenameDialog + { + id: renameQualityDialog + title: catalog.i18nc("@title:window", "Rename Profile") + object: "<new name>" + onAccepted: + { + var actualNewName = base.qualityManagementModel.renameQualityChangesGroup(base.currentItem.quality_changes_group, newName); + base.newQualityNameToSelect = actualNewName; // Select the new name after the model gets updated + } + } + + // Dialog for importing a quality profile + FileDialog + { + id: importDialog + title: catalog.i18nc("@title:window", "Import Profile") + selectExisting: true + nameFilters: base.qualityManagementModel.getFileNameFilters("profile_reader") + folder: CuraApplication.getDefaultPath("dialog_profile_path") + onAccepted: + { + var result = Cura.ContainerManager.importProfile(fileUrl); + messageDialog.title = catalog.i18nc("@title:window", "Import Profile") + messageDialog.text = result.message; + messageDialog.open(); + CuraApplication.setDefaultPath("dialog_profile_path", folder); } } } diff --git a/resources/qml/Preferences/ReadOnlySpinBox.qml b/resources/qml/Preferences/ReadOnlySpinBox.qml deleted file mode 100644 index 11e47b38b2..0000000000 --- a/resources/qml/Preferences/ReadOnlySpinBox.qml +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2016 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Dialogs 1.2 - -Item -{ - id: base - - property alias value: spinBox.value - property alias minimumValue: spinBox.minimumValue - property alias maximumValue: spinBox.maximumValue - property alias stepSize: spinBox.stepSize - property alias prefix: spinBox.prefix - property alias suffix: spinBox.suffix - property alias decimals: spinBox.decimals - - signal editingFinished(); - - property bool readOnly: false - - width: spinBox.width - height: spinBox.height - - SpinBox - { - id: spinBox - - enabled: !base.readOnly - opacity: base.readOnly ? 0.5 : 1.0 - - anchors.fill: parent - - onEditingFinished: base.editingFinished() - Keys.onEnterPressed: spinBox.focus = false - Keys.onReturnPressed: spinBox.focus = false - } - - Label - { - visible: base.readOnly - text: base.prefix + base.value.toFixed(spinBox.decimals) + base.suffix - - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: spinBox.__style ? spinBox.__style.padding.left : 0 - - color: palette.buttonText - } - - SystemPalette { id: palette } -} diff --git a/resources/qml/Preferences/ReadOnlyTextArea.qml b/resources/qml/Preferences/ReadOnlyTextArea.qml index 2c553ac2ca..291e241718 100644 --- a/resources/qml/Preferences/ReadOnlyTextArea.qml +++ b/resources/qml/Preferences/ReadOnlyTextArea.qml @@ -2,9 +2,10 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.1 -import QtQuick.Controls 1.1 +import QtQuick.Controls 2.15 +import UM 1.5 as UM -Item +ScrollView { id: base @@ -15,27 +16,22 @@ Item property bool readOnly: false - width: textArea.width - height: textArea.height - TextArea { id: textArea enabled: !base.readOnly - opacity: base.readOnly ? 0.5 : 1.0 + selectByMouse: true - anchors.fill: parent + background: UM.UnderlineBackground { id: backgroundRectangle } - Keys.onReturnPressed: - { - base.editingFinished() - } + color: UM.Theme.getColor("text") + selectionColor: UM.Theme.getColor("text_selection") + font: UM.Theme.getFont("default") - Keys.onEnterPressed: - { - base.editingFinished() - } + Keys.onReturnPressed: base.editingFinished() + + Keys.onEnterPressed: base.editingFinished() onActiveFocusChanged: { diff --git a/resources/qml/Preferences/ReadOnlyTextField.qml b/resources/qml/Preferences/ReadOnlyTextField.qml deleted file mode 100644 index 38d07d7d6a..0000000000 --- a/resources/qml/Preferences/ReadOnlyTextField.qml +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2016 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. -// Different than the name suggests, it is not always read-only. - -import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Dialogs 1.2 - -Item -{ - id: base - - property alias text: textField.text - - signal editingFinished(); - - property bool readOnly: false - - width: textField.width - height: textField.height - - TextField - { - id: textField - - enabled: !base.readOnly - opacity: base.readOnly ? 0.5 : 1.0 - - anchors.fill: parent - - onEditingFinished: base.editingFinished() - Keys.onEnterPressed: base.editingFinished() - Keys.onReturnPressed: base.editingFinished() - } - - Label - { - visible: base.readOnly - text: textField.text - - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: textField.__panel ? textField.__panel.leftMargin : 0 - - color: palette.buttonText - } - - SystemPalette { id: palette } -} diff --git a/resources/qml/Preferences/RenameDialog.qml b/resources/qml/Preferences/RenameDialog.qml new file mode 100644 index 0000000000..6e4c628114 --- /dev/null +++ b/resources/qml/Preferences/RenameDialog.qml @@ -0,0 +1,86 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 2.0 +import QtQuick.Window 2.1 + +import UM 1.5 as UM +import Cura 1.0 as Cura + +UM.Dialog +{ + id: base + + buttonSpacing: UM.Theme.getSize("default_margin").width + + property string object: "" + + property alias newName: nameField.text + property bool validName: true + property string validationError + property string dialogTitle: catalog.i18nc("@title:window", "Rename") + property string explanation: catalog.i18nc("@info", "Please provide a new name.") + + title: dialogTitle + + minimumWidth: UM.Theme.getSize("small_popup_dialog").width + minimumHeight: UM.Theme.getSize("small_popup_dialog").height + width: minimumWidth + height: minimumHeight + + property variant catalog: UM.I18nCatalog { name: "cura" } + + signal textChanged(string text) + signal selectText() + onSelectText: + { + nameField.selectAll(); + nameField.focus = true; + } + + Column + { + anchors.fill: parent + + UM.Label + { + text: base.explanation + "\n" //Newline to make some space using system theming. + width: parent.width + wrapMode: Text.WordWrap + } + + Cura.TextField + { + id: nameField + width: parent.width + text: base.object + maximumLength: 40 + selectByMouse: true + onTextChanged: base.textChanged(text) + } + + UM.Label + { + visible: !base.validName + text: base.validationError + } + } + + rightButtons: [ + Cura.SecondaryButton + { + id: cancelButton + text: catalog.i18nc("@action:button","Cancel") + onClicked: base.reject() + }, + Cura.PrimaryButton + { + id: okButton + text: catalog.i18nc("@action:button", "OK") + onClicked: base.accept() + enabled: base.validName + } + ] +} + diff --git a/resources/qml/Preferences/SettingVisibilityCategory.qml b/resources/qml/Preferences/SettingVisibilityCategory.qml new file mode 100644 index 0000000000..f9ed989076 --- /dev/null +++ b/resources/qml/Preferences/SettingVisibilityCategory.qml @@ -0,0 +1,23 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 2.1 + +import UM 1.5 as UM +import Cura 1.5 as Cura + +Cura.CategoryButton +{ + id: base + + categoryIcon: definition ? UM.Theme.getIcon(definition.icon) : "" + labelText: definition ? definition.label : "" + expanded: definition ? definition.expanded : false + + signal showTooltip(string text) + signal hideTooltip() + signal contextMenuRequested() + + onClicked: expanded ? settingDefinitionsModel.collapseRecursive(definition.key) : settingDefinitionsModel.expandRecursive(definition.key) +} diff --git a/resources/qml/Preferences/SettingVisibilityItem.qml b/resources/qml/Preferences/SettingVisibilityItem.qml new file mode 100644 index 0000000000..b7edd54c35 --- /dev/null +++ b/resources/qml/Preferences/SettingVisibilityItem.qml @@ -0,0 +1,99 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 2.1 + +import UM 1.5 as UM + +Item +{ + // Use the depth of the model to move the item, but also leave space for the visibility / enabled exclamation mark. + + // Align checkbox with SettingVisibilityCategory icon with + 5 + x: definition ? definition.depth * UM.Theme.getSize("narrow_margin").width : UM.Theme.getSize("default_margin").width + + UM.TooltipArea + { + text: definition ? definition.description : "" + + width: childrenRect.width; + height: childrenRect.height; + id: checkboxTooltipArea + UM.CheckBox + { + id: check + + text: definition ? definition.label: "" + checked: definition ? definition.visible: false + enabled: definition ? !definition.prohibited: false + + MouseArea + { + anchors.fill: parent + onClicked: definitionsModel.setVisible(definition.key, !check.checked) + } + } + } + + UM.TooltipArea + { + width: height + height: check.height + anchors.left: checkboxTooltipArea.right + anchors.leftMargin: 2 * screenScaleFactor + + text: + { + if(provider.properties.enabled == "True") + { + return "" + } + var key = definition ? definition.key : "" + var requires = settingDefinitionsModel.getRequires(key, "enabled") + if (requires.length == 0) + { + return catalog.i18nc("@item:tooltip", "This setting has been hidden by the active machine and will not be visible."); + } + else + { + var requires_text = "" + for (var i in requires) + { + if (requires_text == "") + { + requires_text = requires[i].label + } + else + { + requires_text += ", " + requires[i].label + } + } + + return catalog.i18ncp("@item:tooltip %1 is list of setting names", "This setting has been hidden by the value of %1. Change the value of that setting to make this setting visible.", "This setting has been hidden by the values of %1. Change the values of those settings to make this setting visible.", requires.length) .arg(requires_text); + } + } + + UM.RecolorImage + { + anchors.centerIn: parent + width: Math.round(check.height * 0.75) | 0 + height: width + + source: UM.Theme.getIcon("Information") + + color: UM.Theme.getColor("primary_button_text") + } + + visible: provider.properties.enabled == "False" + } + + UM.SettingPropertyProvider + { + id: provider + + containerStackId: "global" + watchedProperties: [ "enabled" ] + key: definition ? definition.key : "" + } +} diff --git a/resources/qml/Preferences/SettingVisibilityPage.qml b/resources/qml/Preferences/SettingVisibilityPage.qml index 53df99b912..035f121537 100644 --- a/resources/qml/Preferences/SettingVisibilityPage.qml +++ b/resources/qml/Preferences/SettingVisibilityPage.qml @@ -1,11 +1,8 @@ -// Copyright (c) 2016 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.1 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 - -import QtQuick.Controls 2.3 as NewControls +import QtQuick.Controls 2.15 import UM 1.5 as UM @@ -13,12 +10,20 @@ import Cura 1.0 as Cura UM.PreferencesPage { - title: catalog.i18nc("@title:tab", "Setting Visibility"); + title: catalog.i18nc("@title:tab", "Setting Visibility") property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel() property int scrollToIndex: 0 + buttons: [ + Cura.SecondaryButton + { + text: catalog.i18nc("@action:button", "Defaults") + onClicked: reset() + } + ] + signal scrollToSection( string key ) onScrollToSection: { @@ -33,16 +38,16 @@ UM.PreferencesPage Item { - id: base; - anchors.fill: parent; + id: base + anchors.fill: parent UM.CheckBox { id: toggleVisibleSettings anchors { - verticalCenter: filter.verticalCenter; - left: parent.left; + verticalCenter: filter.verticalCenter + left: parent.left leftMargin: UM.Theme.getSize("default_margin").width } text: catalog.i18nc("@label:textbox", "Check all") @@ -61,13 +66,13 @@ UM.PreferencesPage return Qt.PartiallyChecked } } - + tristate: true MouseArea { anchors.fill: parent; onClicked: { - if(parent.checkState == Qt.Unchecked || parent.checkState == Qt.PartiallyChecked) + if (parent.checkState == Qt.Unchecked || parent.checkState == Qt.PartiallyChecked) { definitionsModel.setAllExpandedVisible(true) } @@ -79,9 +84,9 @@ UM.PreferencesPage } } - TextField + Cura.TextField { - id: filter; + id: filter anchors { @@ -97,15 +102,15 @@ UM.PreferencesPage onTextChanged: definitionsModel.filter = {"i18n_label|i18n_description": "*" + text} } - NewControls.ComboBox + Cura.ComboBox { id: visibilityPreset - width: 150 * screenScaleFactor + width: UM.Theme.getSize("action_button").width anchors { top: parent.top right: parent.right - bottom: scrollView.top + verticalCenter: filter.verticalCenter } model: settingVisibilityPresetsModel.items @@ -132,76 +137,58 @@ UM.PreferencesPage } } - ScrollView + ListView { - id: scrollView - - frameVisible: true - + id: settingsListView anchors { - top: filter.bottom; + top: filter.bottom topMargin: UM.Theme.getSize("default_margin").height - left: parent.left; - right: parent.right; - bottom: parent.bottom; + left: parent.left + right: parent.right + bottom: parent.bottom } - ListView + + clip: true + ScrollBar.vertical: UM.ScrollBar { id: scrollBar } + + model: UM.SettingDefinitionsModel { - id: settingsListView + id: definitionsModel + containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" + showAll: true + exclude: ["machine_settings", "command_line_settings"] + showAncestors: true + expanded: ["*"] + visibilityHandler: UM.SettingPreferenceVisibilityHandler {} + } - model: UM.SettingDefinitionsModel - { - id: definitionsModel - containerId: Cura.MachineManager.activeMachine != null ? Cura.MachineManager.activeMachine.definition.id: "" - showAll: true - exclude: ["machine_settings", "command_line_settings"] - showAncestors: true - expanded: ["*"] - visibilityHandler: UM.SettingPreferenceVisibilityHandler {} - } + property Component settingVisibilityCategory: Cura.SettingVisibilityCategory {} + property Component settingVisibilityItem: Cura.SettingVisibilityItem {} - delegate: Loader - { - id: loader + delegate: Loader + { + id: loader - width: settingsListView.width - height: model.type != undefined ? UM.Theme.getSize("section").height : 0 + width: settingsListView.width - scrollBar.width + height: model.type != undefined ? UM.Theme.getSize("section").height : 0 - property var definition: model - property var settingDefinitionsModel: definitionsModel + property var definition: model + property var settingDefinitionsModel: definitionsModel - asynchronous: true - active: model.type != undefined - sourceComponent: + asynchronous: true + active: model.type != undefined + sourceComponent: + { + switch (model.type) { - switch(model.type) - { - case "category": - return settingVisibilityCategory - default: - return settingVisibilityItem - } + case "category": + return settingsListView.settingVisibilityCategory + default: + return settingsListView.settingVisibilityItem } } } } - - UM.I18nCatalog { name: "cura"; } - SystemPalette { id: palette; } - - Component - { - id: settingVisibilityCategory; - - UM.SettingVisibilityCategory { } - } - - Component - { - id: settingVisibilityItem; - - UM.SettingVisibilityItem { } - } } -}
\ No newline at end of file +} diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index 19c2562874..adb004298d 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -2,20 +2,34 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.15 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura import "PrinterOutput" - -Item +ScrollView { id: base - UM.I18nCatalog { id: catalog; name: "cura"} + width: parent.width + height: parent.height + + contentHeight: printMonitor.height + + ScrollBar.vertical: UM.ScrollBar + { + id: scrollbar + parent: base.parent + anchors + { + right: parent.right + top: parent.top + bottom: parent.bottom + } + } + clip: true function showTooltip(item, position, text) { @@ -53,7 +67,9 @@ Item { id: printMonitor - anchors.fill: parent + UM.I18nCatalog { id: catalog; name: "cura" } + + width: parent.width - scrollbar.width property var extrudersModel: CuraApplication.getExtrudersModel() diff --git a/resources/qml/PrintSetupHeaderButton.qml b/resources/qml/PrintSetupHeaderButton.qml new file mode 100644 index 0000000000..a4f95148da --- /dev/null +++ b/resources/qml/PrintSetupHeaderButton.qml @@ -0,0 +1,117 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +// Button with a label-like appearance that displays different states (these can be displayed by setting the +// `valueError` or `valueWarning` properties). Mainly used within the `CustomConfiguration` component. + +import QtQuick 2.1 +import QtQuick.Controls 2.1 + +import Cura 1.0 as Cura +import UM 1.5 as UM + +ToolButton +{ + id: base + + property alias tooltip: tooltip.text + + property bool valueError: false; + property bool valueWarning: false; + + UM.ToolTip + { + id: tooltip + visible: base.hovered + targetPoint: Qt.point(parent.x, Math.round(parent.y + parent.height / 2)) + } + + states: + [ + State + { + name: "disabled" + when: !base.enabled; + PropertyChanges + { + target: background + color: UM.Theme.getColor("setting_control_disabled") + liningColor: UM.Theme.getColor("setting_control_disabled_border") + } + }, + State + { + name: "value_error" + when: base.enabled && base.valueError + PropertyChanges + { + target: background + color: UM.Theme.getColor("setting_validation_error_background") + liningColor: UM.Theme.getColor("setting_validation_error") + } + }, + State + { + name: "value_warning" + when: base.enabled && base.valueWarning + PropertyChanges + { + target: background + color: UM.Theme.getColor("setting_validation_warning_background") + liningColor: UM.Theme.getColor("setting_validation_warning") + } + }, + State + { + name: "highlight" + when: base.enabled && base.hovered + PropertyChanges + { + target: background + color: UM.Theme.getColor("setting_control") + liningColor: UM.Theme.getColor("border_main") + } + }, + State + { + name: "neutral" + when: base.enabled && !base.hovered && !base.valueWarning && !base.valueError + PropertyChanges + { + target: background + color: UM.Theme.getColor("setting_control") + liningColor: UM.Theme.getColor("border_field_light") + } + } + ] + + background: UM.UnderlineBackground + { + id: background + + UM.RecolorImage + { + id: downArrow + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("default_margin").width + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.height: width + color: base.enabled ? UM.Theme.getColor("setting_control_button") : UM.Theme.getColor("setting_category_disabled_text") + source: UM.Theme.getIcon("ChevronSingleDown") + } + } + + contentItem: UM.Label + { + id: printSetupComboBoxLabel + text: base.text + elide: Text.ElideRight; + anchors.left: parent.left; + anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width + anchors.right: downArrow.lef + anchors.rightMargin: base.rightMargin + anchors.verticalCenter: parent.verticalCenter + } +} diff --git a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml index cde2cd8dfc..2ca4a9f9bf 100644 --- a/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Custom/CustomPrintSetup.qml @@ -1,12 +1,11 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. +//Copyright (c) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 -import QtQuick.Controls 1.4 as OldControls import QtQuick.Layouts 1.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.6 as Cura import ".." @@ -34,7 +33,7 @@ Item rightMargin: parent.padding } - Label + UM.Label { id: profileLabel anchors @@ -46,9 +45,6 @@ Item } text: catalog.i18nc("@label", "Profile") font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering - color: UM.Theme.getColor("text") - verticalAlignment: Text.AlignVCenter } NoIntentIcon @@ -80,33 +76,27 @@ Item anchors.right: customisedSettings.left anchors.leftMargin: UM.Theme.getSize("default_margin").width - Label + UM.Label { id: textLabel text: Cura.MachineManager.activeQualityDisplayNameMap["main"] - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") Layout.margins: 0 Layout.maximumWidth: Math.floor(parent.width * 0.7) // Always leave >= 30% for the rest of the row. height: contentHeight - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering elide: Text.ElideRight + wrapMode: Text.NoWrap } - Label + UM.Label { text: activeQualityDetailText() - font: UM.Theme.getFont("default") color: UM.Theme.getColor("text_detail") Layout.margins: 0 Layout.fillWidth: true height: contentHeight - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering elide: Text.ElideRight - + wrapMode: Text.NoWrap function activeQualityDetailText() { var resultMap = Cura.MachineManager.activeQualityDisplayNameMap @@ -136,13 +126,10 @@ Item } } - background: Rectangle + background: UM.UnderlineBackground { id: backgroundItem - border.color: intentSelection.hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border") - border.width: UM.Theme.getSize("default_lining").width - radius: UM.Theme.getSize("default_radius").width - color: UM.Theme.getColor("main_background") + liningColor: intentSelection.hovered ? UM.Theme.getColor("border_main") : UM.Theme.getColor("border_field_light") } UM.SimpleButton @@ -222,6 +209,7 @@ Item model: extrudersModel delegate: UM.TabRowButton { + checked: model.index == 0 contentItem: Item { Cura.ExtruderIcon diff --git a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml index b637e20d58..112edbbf77 100644 --- a/resources/qml/PrintSetupSelector/Custom/MenuButton.qml +++ b/resources/qml/PrintSetupSelector/Custom/MenuButton.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.6 as Cura Button @@ -18,15 +18,15 @@ Button property string labelText: "" id: button hoverEnabled: true - leftPadding:UM.Theme.getSize("wide_margin").width + leftPadding: UM.Theme.getSize("default_margin").width + implicitWidth: UM.Theme.getSize("menu").width + implicitHeight: UM.Theme.getSize("menu").height + UM.Theme.getSize("narrow_margin").height background: Rectangle { - id: backgroundRectangle - border.width: UM.Theme.getSize("default_lining").width - border.color: button.checked ? UM.Theme.getColor("setting_control_border_highlight") : "transparent" - color: button.hovered ? UM.Theme.getColor("action_button_hovered") : "transparent" - radius: UM.Theme.getSize("action_button_radius").width + height: button.height + width: button.width + color: button.hovered ? UM.Theme.getColor("background_2") : UM.Theme.getColor("background_1") } // Workaround to ensure that the mnemonic highlighting happens correctly @@ -40,14 +40,29 @@ Button return txt } - contentItem: Label + contentItem: Item { - id: textLabel - text: button.text != "" ? replaceText(button.text) : replaceText(button.labelText) - height: contentHeight - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering - font: UM.Theme.getFont("default") - color: button.enabled ? UM.Theme.getColor("text") :UM.Theme.getColor("text_inactive") + height: button.height + width: button.width + UM.RecolorImage + { + id: check + height: UM.Theme.getSize("default_arrow").height + width: height + source: UM.Theme.getIcon("Check", "low") + color: UM.Theme.getColor("setting_control_text") + anchors.verticalCenter: parent.verticalCenter + visible: button.checked + } + UM.Label + { + id: textLabel + text: button.text != "" ? replaceText(button.text) : replaceText(button.labelText) + height: contentHeight + color: button.enabled ? UM.Theme.getColor("text") :UM.Theme.getColor("text_inactive") + anchors.left: check.right + anchors.leftMargin: UM.Theme.getSize("narrow_margin").width + anchors.verticalCenter: parent.verticalCenter + } } }
\ No newline at end of file diff --git a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml index c879ff53fd..a2624dbf14 100644 --- a/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml +++ b/resources/qml/PrintSetupSelector/Custom/QualitiesWithIntentMenu.qml @@ -1,10 +1,10 @@ -// Copyright (c) 2020 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.6 as Cura Popup @@ -43,17 +43,29 @@ Popup // This repeater adds the intent labels ScrollView { + id: qualityListScrollView property real maximumHeight: screenScaleFactor * 400 contentHeight: dataColumn.height height: Math.min(contentHeight, maximumHeight) - clip: true + width: parent.width - ScrollBar.vertical.policy: height == maximumHeight ? ScrollBar.AlwaysOn: ScrollBar.AlwaysOff + clip: true + ScrollBar.vertical: UM.ScrollBar + { + id: qualityListScrollBar + parent: qualityListScrollView + anchors + { + top: parent.top + right: parent.right + bottom: parent.bottom + } + } Column { id: dataColumn - width: parent.width + width: qualityListScrollView.width - qualityListScrollBar.width Repeater { model: dataModel @@ -64,14 +76,13 @@ Popup property variant subItemModel: model.qualities height: childrenRect.height - width: popup.contentWidth + width: dataColumn.width - Label + UM.Label { id: headerLabel text: model.name color: UM.Theme.getColor("text_inactive") - renderType: Text.NativeRendering width: parent.width height: visible ? contentHeight: 0 visible: qualitiesList.visibleChildren.length > 0 @@ -119,6 +130,7 @@ Popup checkable: true visible: model.available text: model.name + " - " + model.layer_height + " mm" + leftPadding: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width checked: { if (Cura.MachineManager.hasCustomQuality) @@ -138,13 +150,12 @@ Popup Item { height: childrenRect.height - width: popup.contentWidth + width: dataColumn.width - Label + UM.Label { id: customProfileHeader text: catalog.i18nc("@label:header", "Custom profiles") - renderType: Text.NativeRendering height: visible ? contentHeight: 0 enabled: false visible: profilesList.visibleChildren.length > 1 @@ -185,6 +196,7 @@ Popup checkable: true visible: model.available text: model.name + leftPadding: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width checked: { var active_quality_group = Cura.MachineManager.activeQualityChangesGroup @@ -280,29 +292,20 @@ Popup width: parent.width height: childrenRect.height - Label + UM.Label { id: textLabel text: manageProfilesButton.text height: contentHeight - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width + UM.Theme.getSize("narrow_margin").width - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") } - Label + UM.Label { id: shortcutLabel text: Cura.Actions.manageProfiles.shortcut + color: UM.Theme.getColor("text_lighter") height: contentHeight anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") } } onClicked: diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml index 3b6fc37eb4..41e913a2c1 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorHeader.qml @@ -39,7 +39,7 @@ RowLayout } font: UM.Theme.getFont("medium") elide: Text.ElideMiddle - + wrapMode: Text.NoWrap UM.SettingPropertyProvider { id: layerHeight diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml index a3a5047ee9..74c496f824 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedAdhesionSelector.qml @@ -2,10 +2,8 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -44,7 +42,7 @@ Item verticalCenter: enableAdhesionRowTitle.verticalCenter } - CheckBox + UM.CheckBox { id: enableAdhesionCheckBox anchors.verticalCenter: parent.verticalCenter @@ -52,7 +50,6 @@ Item property alias _hovered: adhesionMouseArea.containsMouse //: Setting enable printing build-plate adhesion helper checkbox - style: UM.Theme.styles.checkbox enabled: recommendedPrintSetup.settingsEnabled visible: platformAdhesionType.properties.enabled == "True" diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml index dd2e0aef2b..434945e172 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedInfillDensitySelector.qml @@ -1,11 +1,10 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 +import QtQuick.Controls 2.15 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -87,10 +86,9 @@ Item width: parent.width height: UM.Theme.getSize("print_setup_slider_handle").height // The handle is the widest element of the slider - minimumValue: 0 - maximumValue: 100 + from: 0 + to: 100 stepSize: 1 - tickmarksEnabled: true // disable slider when gradual support is enabled enabled: parseInt(infillSteps.properties.value) == 0 @@ -98,53 +96,37 @@ Item // set initial value from stack value: parseInt(infillDensity.properties.value) - style: SliderStyle + //Draw line + background: Rectangle { - //Draw line - groove: Item - { - Rectangle - { - height: UM.Theme.getSize("print_setup_slider_groove").height - width: control.width - UM.Theme.getSize("print_setup_slider_handle").width - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable") - } - } - - handle: Rectangle - { - id: handleButton - color: control.enabled ? UM.Theme.getColor("primary") : UM.Theme.getColor("quality_slider_unavailable") - implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width - implicitHeight: implicitWidth - radius: Math.round(implicitWidth / 2) - border.color: UM.Theme.getColor("slider_groove_fill") - border.width: UM.Theme.getSize("default_lining").height - } - - tickmarks: Repeater + id: backgroundLine + height: UM.Theme.getSize("print_setup_slider_groove").height + width: infillSlider.width - UM.Theme.getSize("print_setup_slider_handle").width + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable") + + Repeater { id: repeater - model: control.maximumValue / control.stepSize + 1 + anchors.fill: parent + model: infillSlider.to / infillSlider.stepSize + 1 Rectangle { - color: control.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable") + color: infillSlider.enabled ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable") implicitWidth: UM.Theme.getSize("print_setup_slider_tickmarks").width implicitHeight: UM.Theme.getSize("print_setup_slider_tickmarks").height anchors.verticalCenter: parent.verticalCenter // Do not use Math.round otherwise the tickmarks won't be aligned - x: ((styleData.handleWidth / 2) - (implicitWidth / 2) + (index * ((repeater.width - styleData.handleWidth) / (repeater.count-1)))) - radius: Math.round(implicitWidth / 2) + x: ((handleButton.width / 2) - (backgroundLine.implicitWidth / 2) + (index * ((repeater.width - handleButton.width) / (repeater.count-1)))) + radius: Math.round(backgroundLine.implicitWidth / 2) visible: (index % 10) == 0 // Only show steps of 10% - Label + UM.Label { text: index - font: UM.Theme.getFont("default") visible: (index % 20) == 0 // Only show steps of 20% anchors.horizontalCenter: parent.horizontalCenter y: UM.Theme.getSize("thin_margin").height @@ -155,36 +137,53 @@ Item } } - onValueChanged: + handle: Rectangle { - // Don't round the value if it's already the same - if (parseInt(infillDensity.properties.value) == infillSlider.value) + id: handleButton + x: infillSlider.leftPadding + infillSlider.visualPosition * (infillSlider.availableWidth - width) + y: infillSlider.topPadding + infillSlider.availableHeight / 2 - height / 2 + color: infillSlider.enabled ? UM.Theme.getColor("primary") : UM.Theme.getColor("quality_slider_unavailable") + implicitWidth: UM.Theme.getSize("print_setup_slider_handle").width + implicitHeight: implicitWidth + radius: Math.round(implicitWidth / 2) + border.color: UM.Theme.getColor("slider_groove_fill") + border.width: UM.Theme.getSize("default_lining").height + } + + Connections + { + target: infillSlider + function onValueChanged() { - return - } + // Don't round the value if it's already the same + if (parseInt(infillDensity.properties.value) == infillSlider.value) + { + return + } - // Round the slider value to the nearest multiple of 10 (simulate step size of 10) - var roundedSliderValue = Math.round(infillSlider.value / 10) * 10 + // Round the slider value to the nearest multiple of 10 (simulate step size of 10) + var roundedSliderValue = Math.round(infillSlider.value / 10) * 10 - // Update the slider value to represent the rounded value - infillSlider.value = roundedSliderValue + // Update the slider value to represent the rounded value + infillSlider.value = roundedSliderValue - // Update value only if the Recommended mode is Active, - // Otherwise if I change the value in the Custom mode the Recommended view will try to repeat - // same operation - var active_mode = UM.Preferences.getValue("cura/active_mode") + // Update value only if the Recommended mode is Active, + // Otherwise if I change the value in the Custom mode the Recommended view will try to repeat + // same operation + const active_mode = UM.Preferences.getValue("cura/active_mode") - if (active_mode == 0 || active_mode == "simple") - { - Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue) - Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance") + if (active_mode == 0 || active_mode == "simple") + { + Cura.MachineManager.setSettingForAllExtruders("infill_sparse_density", "value", roundedSliderValue) + Cura.MachineManager.resetSettingForAllExtruders("infill_line_distance") + } } } } } // Gradual Support Infill Checkbox - CheckBox + UM.CheckBox { id: enableGradualInfillCheckBox property alias _hovered: enableGradualInfillMouseArea.containsMouse @@ -194,7 +193,6 @@ Item anchors.left: infillSliderContainer.left text: catalog.i18nc("@label", "Gradual infill") - style: UM.Theme.styles.checkbox enabled: recommendedPrintSetup.settingsEnabled visible: infillSteps.properties.enabled == "True" checked: parseInt(infillSteps.properties.value) > 0 diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml index 22c4039063..de8cce6e94 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedPrintSetup.qml @@ -2,8 +2,6 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 import UM 1.2 as UM import Cura 1.0 as Cura @@ -14,8 +12,6 @@ Item height: childrenRect.height + 2 * padding - property Action configureSettings - property bool settingsEnabled: Cura.ExtruderManager.activeExtruderStackId || extrudersEnabledCount.properties.value == 1 property real padding: UM.Theme.getSize("thick_margin").width diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml index 0823b5cb62..1176142b3b 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml @@ -1,10 +1,8 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 1.4 -import QtQuick.Controls 2.3 as Controls2 -import QtQuick.Controls.Styles 1.4 +import QtQuick.Controls 2.3 import UM 1.2 as UM import Cura 1.6 as Cura @@ -30,7 +28,7 @@ Item spacing: UM.Theme.getSize("default_margin").height - Controls2.ButtonGroup + ButtonGroup { id: activeProfileButtonGroup exclusive: true diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml index 4e2341fb57..49be0fae1c 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedSupportSelector.qml @@ -1,12 +1,10 @@ -// Copyright (c) 2020 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import QtQuick.Controls 2.3 as Controls2 +import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -45,14 +43,13 @@ Item verticalCenter: enableSupportRowTitle.verticalCenter } - CheckBox + UM.CheckBox { id: enableSupportCheckBox anchors.verticalCenter: parent.verticalCenter property alias _hovered: enableSupportMouseArea.containsMouse - style: UM.Theme.styles.checkbox enabled: recommendedPrintSetup.settingsEnabled visible: supportEnabled.properties.enabled == "True" @@ -75,7 +72,7 @@ Item } } - Controls2.ComboBox + ComboBox { id: supportExtruderCombobox @@ -202,7 +199,7 @@ Item } } - contentItem: Controls2.Label + contentItem: UM.Label { anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left @@ -212,12 +209,10 @@ Item text: supportExtruderCombobox.currentText textFormat: Text.PlainText - renderType: Text.NativeRendering - font: UM.Theme.getFont("default") color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") elide: Text.ElideLeft - verticalAlignment: Text.AlignVCenter + background: Rectangle { @@ -233,7 +228,7 @@ Item } } - popup: Controls2.Popup + popup: Popup { y: supportExtruderCombobox.height - UM.Theme.getSize("default_lining").height width: supportExtruderCombobox.width @@ -242,12 +237,12 @@ Item contentItem: ListView { - clip: true implicitHeight: contentHeight + + ScrollBar.vertical: UM.ScrollBar {} + clip: true model: supportExtruderCombobox.popup.visible ? supportExtruderCombobox.delegateModel : null currentIndex: supportExtruderCombobox.highlightedIndex - - Controls2.ScrollIndicator.vertical: Controls2.ScrollIndicator { } } background: Rectangle @@ -257,34 +252,22 @@ Item } } - delegate: Controls2.ItemDelegate + delegate: ItemDelegate { width: supportExtruderCombobox.width - 2 * UM.Theme.getSize("default_lining").width height: supportExtruderCombobox.height highlighted: supportExtruderCombobox.highlightedIndex == index - contentItem: Controls2.Label + contentItem: UM.Label { anchors.fill: parent anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width text: model.name - renderType: Text.NativeRendering - color: - { - if (model.enabled) - { - UM.Theme.getColor("setting_control_text") - } - else - { - UM.Theme.getColor("action_button_disabled_text"); - } - } - font: UM.Theme.getFont("default") + color: model.enabled ? UM.Theme.getColor("setting_control_text"): UM.Theme.getColor("action_button_disabled_text") + elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width background: Rectangle diff --git a/resources/qml/PrintSetupTooltip.qml b/resources/qml/PrintSetupTooltip.qml index 91f044ceed..29fe7d6508 100644 --- a/resources/qml/PrintSetupTooltip.qml +++ b/resources/qml/PrintSetupTooltip.qml @@ -4,7 +4,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.3 -import UM 1.0 as UM +import UM 1.5 as UM UM.PointingRectangle { @@ -88,18 +88,16 @@ UM.PointingRectangle active: false //Only allow vertical scrolling. We should grow vertically only, but due to how the label is positioned it allocates space in the ScrollView horizontally. } - Label + UM.Label { id: label x: UM.Theme.getSize("tooltip_margins").width y: UM.Theme.getSize("tooltip_margins").height width: base.width - UM.Theme.getSize("tooltip_margins").width * 2 - wrapMode: Text.Wrap; + wrapMode: Text.Wrap textFormat: Text.RichText - font: UM.Theme.getFont("default"); - color: UM.Theme.getColor("tooltip_text"); - renderType: Text.NativeRendering + color: UM.Theme.getColor("tooltip_text") } } } diff --git a/resources/qml/PrinterOutput/ExtruderBox.qml b/resources/qml/PrinterOutput/ExtruderBox.qml index 63927cd98d..bea7c3bdd8 100644 --- a/resources/qml/PrinterOutput/ExtruderBox.qml +++ b/resources/qml/PrinterOutput/ExtruderBox.qml @@ -1,12 +1,10 @@ -//Copyright (c) 2019 Ultimaker B.V. +//Copyright (c) 2022 Ultimaker B.V. //Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.1 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -36,17 +34,17 @@ Item id: background anchors.fill: parent - Label //Extruder name. + // Extruder name. + UM.Label { text: Cura.MachineManager.activeMachine.extruderList[position].name !== "" ? Cura.MachineManager.activeMachine.extruderList[position].name : catalog.i18nc("@label", "Extruder") - color: UM.Theme.getColor("text") - font: UM.Theme.getFont("default") anchors.left: parent.left anchors.top: parent.top anchors.margins: UM.Theme.getSize("default_margin").width } - Label //Target temperature. + // Target temperature. + UM.Label { id: extruderTargetTemperature text: Math.round(extruderModel.targetHotendTemperature) + "°C" @@ -56,7 +54,8 @@ Item anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.bottom: extruderCurrentTemperature.bottom - MouseArea //For tooltip. + //For tooltip. + MouseArea { id: extruderTargetTemperatureTooltipArea hoverEnabled: true @@ -78,17 +77,20 @@ Item } } } - Label //Temperature indication. + + //Temperature indication. + UM.Label { id: extruderCurrentTemperature text: Math.round(extruderModel.hotendTemperature) + "°C" - color: UM.Theme.getColor("text") font: UM.Theme.getFont("large_bold") anchors.right: extruderTargetTemperature.left anchors.top: parent.top anchors.margins: UM.Theme.getSize("default_margin").width - MouseArea //For tooltip. + + //For tooltip. + MouseArea { id: extruderCurrentTemperatureTooltipArea hoverEnabled: true @@ -111,7 +113,8 @@ Item } } - Rectangle //Input field for pre-heat temperature. + //Input field for pre-heat temperature. + Rectangle { id: preheatTemperatureControl color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok") @@ -153,14 +156,16 @@ Item width: UM.Theme.getSize("monitor_preheat_temperature_control").width height: UM.Theme.getSize("monitor_preheat_temperature_control").height visible: extruderModel != null ? enabled && extruderModel.canPreHeatHotends && !extruderModel.isPreheating : true - Rectangle //Highlight of input field. + //Highlight of input field. + Rectangle { anchors.fill: parent anchors.margins: UM.Theme.getSize("default_lining").width color: UM.Theme.getColor("setting_control_highlight") opacity: preheatTemperatureControl.hovered ? 1.0 : 0 } - MouseArea //Change cursor on hovering. + //Change cursor on hovering. + MouseArea { id: preheatTemperatureInputMouseArea hoverEnabled: true @@ -183,7 +188,7 @@ Item } } } - Label + UM.Label { id: unit anchors.right: parent.right @@ -192,7 +197,6 @@ Item text: "°C"; color: UM.Theme.getColor("setting_unit") - font: UM.Theme.getFont("default") } TextInput { @@ -223,7 +227,7 @@ Item } } - Button //The pre-heat button. + Cura.SecondaryButton { id: preheatButton height: UM.Theme.getSize("setting_control").height @@ -255,96 +259,19 @@ Item anchors.right: parent.right anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("default_margin").width - style: ButtonStyle { - background: Rectangle - { - border.width: UM.Theme.getSize("default_lining").width - implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2) - border.color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled_border"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active_border"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered_border"); - } - else - { - return UM.Theme.getColor("action_button_border"); - } - } - color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered"); - } - else - { - return UM.Theme.getColor("action_button"); - } - } - Behavior on color - { - ColorAnimation - { - duration: 50 - } - } - Label - { - id: actualLabel - anchors.centerIn: parent - color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled_text"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active_text"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered_text"); - } - else - { - return UM.Theme.getColor("action_button_text"); - } - } - font: UM.Theme.getFont("medium") - text: - { - if(extruderModel == null) - { - return "" - } - if(extruderModel.isPreheating ) - { - return catalog.i18nc("@button Cancel pre-heating", "Cancel") - } else - { - return catalog.i18nc("@button", "Pre-heat") - } - } - } + text: + { + if(extruderModel == null) + { + return "" + } + if(extruderModel.isPreheating ) + { + return catalog.i18nc("@button Cancel pre-heating", "Cancel") + } else + { + return catalog.i18nc("@button", "Pre-heat") } } @@ -377,7 +304,8 @@ Item } } - Rectangle //Material colour indication. + //Material colour indication. + Rectangle { id: materialColor width: Math.floor(materialName.height * 0.75) @@ -391,7 +319,8 @@ Item anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: materialName.verticalCenter - MouseArea //For tooltip. + //For tooltip. + MouseArea { id: materialColorTooltipArea hoverEnabled: true @@ -413,17 +342,17 @@ Item } } } - Label //Material name. + //Material name. + UM.Label { id: materialName text: extruderModel.activeMaterial != null ? extruderModel.activeMaterial.type : "" - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") anchors.left: materialColor.right anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("default_margin").width - MouseArea //For tooltip. + //For tooltip. + MouseArea { id: materialNameTooltipArea hoverEnabled: true @@ -445,17 +374,18 @@ Item } } } - Label //Variant name. + + //Variant name. + UM.Label { id: variantName text: extruderModel.hotendID - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") anchors.right: parent.right anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("default_margin").width - MouseArea //For tooltip. + //For tooltip. + MouseArea { id: variantNameTooltipArea hoverEnabled: true @@ -466,7 +396,7 @@ Item { base.showTooltip( base, - {x: 0, y: parent.mapToItem(base, 0, -parent.height / 4).y}, + { x: 0, y: parent.mapToItem(base, 0, -parent.height / 4).y }, catalog.i18nc("@tooltip", "The nozzle inserted in this extruder.") ); } diff --git a/resources/qml/PrinterOutput/HeatedBedBox.qml b/resources/qml/PrinterOutput/HeatedBedBox.qml index 2e3e319c89..288e9cab3f 100644 --- a/resources/qml/PrinterOutput/HeatedBedBox.qml +++ b/resources/qml/PrinterOutput/HeatedBedBox.qml @@ -1,12 +1,10 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.4 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item @@ -21,17 +19,17 @@ Item color: UM.Theme.getColor("main_background") anchors.fill: parent - Label //Build plate label. + // Build plate label. + UM.Label { text: catalog.i18nc("@label", "Build plate") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") anchors.left: parent.left anchors.top: parent.top anchors.margins: UM.Theme.getSize("default_margin").width } - Label //Target temperature. + // Target temperature. + UM.Label { id: bedTargetTemperature text: printerModel != null ? printerModel.targetBedTemperature + "°C" : "" @@ -41,7 +39,8 @@ Item anchors.rightMargin: UM.Theme.getSize("default_margin").width anchors.bottom: bedCurrentTemperature.bottom - MouseArea //For tooltip. + // For tooltip. + MouseArea { id: bedTargetTemperatureTooltipArea hoverEnabled: true @@ -63,17 +62,18 @@ Item } } } - Label //Current temperature. + // Current temperature. + UM.Label { id: bedCurrentTemperature text: printerModel != null ? printerModel.bedTemperature + "°C" : "" font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") anchors.right: bedTargetTemperature.left anchors.top: parent.top anchors.margins: UM.Theme.getSize("default_margin").width - MouseArea //For tooltip. + //For tooltip. + MouseArea { id: bedTemperatureTooltipArea hoverEnabled: true @@ -95,7 +95,8 @@ Item } } } - Rectangle //Input field for pre-heat temperature. + //Input field for pre-heat temperature. + Rectangle { id: preheatTemperatureControl color: !enabled ? UM.Theme.getColor("setting_control_disabled") : showError ? UM.Theme.getColor("setting_validation_error_background") : UM.Theme.getColor("setting_validation_ok") @@ -167,7 +168,7 @@ Item } } } - Label + UM.Label { id: unit anchors.right: parent.right @@ -176,7 +177,6 @@ Item text: "°C"; color: UM.Theme.getColor("setting_unit") - font: UM.Theme.getFont("default") } TextInput { @@ -214,7 +214,8 @@ Item } } - Button // The pre-heat button. + // The pre-heat button. + Cura.SecondaryButton { id: preheatButton height: UM.Theme.getSize("setting_control").height @@ -246,96 +247,20 @@ Item anchors.right: parent.right anchors.bottom: parent.bottom anchors.margins: UM.Theme.getSize("default_margin").width - style: ButtonStyle { - background: Rectangle - { - border.width: UM.Theme.getSize("default_lining").width - implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("default_margin").width * 2) - border.color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled_border"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active_border"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered_border"); - } - else - { - return UM.Theme.getColor("action_button_border"); - } - } - color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered"); - } - else - { - return UM.Theme.getColor("action_button"); - } - } - Behavior on color - { - ColorAnimation - { - duration: 50 - } - } - Label - { - id: actualLabel - anchors.centerIn: parent - color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled_text"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active_text"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered_text"); - } - else - { - return UM.Theme.getColor("action_button_text"); - } - } - font: UM.Theme.getFont("medium") - text: - { - if(printerModel == null) - { - return "" - } - if(printerModel.isPreheating ) - { - return catalog.i18nc("@button Cancel pre-heating", "Cancel") - } else - { - return catalog.i18nc("@button", "Pre-heat") - } - } - } + text: + { + if (printerModel == null) + { + return "" + } + if (printerModel.isPreheating ) + { + return catalog.i18nc("@button Cancel pre-heating", "Cancel") + } + else + { + return catalog.i18nc("@button", "Pre-heat") } } @@ -357,7 +282,7 @@ Item { base.showTooltip( base, - {x: 0, y: preheatButton.mapToItem(base, 0, 0).y}, + { x: 0, y: preheatButton.mapToItem(base, 0, 0).y }, catalog.i18nc("@tooltip of pre-heat", "Heat the bed in advance before printing. You can continue adjusting your print while it is heating, and you won't have to wait for the bed to heat up when you're ready to print.") ); } diff --git a/resources/qml/PrinterOutput/ManualPrinterControl.qml b/resources/qml/PrinterOutput/ManualPrinterControl.qml index 3213f1ace8..bf987b282f 100644 --- a/resources/qml/PrinterOutput/ManualPrinterControl.qml +++ b/resources/qml/PrinterOutput/ManualPrinterControl.qml @@ -1,12 +1,11 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 +import QtQuick.Controls 2.1 import QtQuick.Layouts 1.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.0 as Cura import "." @@ -17,7 +16,7 @@ Item property var printerModel: null property var activePrintJob: printerModel != null ? printerModel.activePrintJob : null property var connectedPrinter: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null - + property var _buttonSize: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("thin_margin").height implicitWidth: parent.width implicitHeight: childrenRect.height @@ -62,15 +61,13 @@ Item spacing: UM.Theme.getSize("default_margin").width - Label + UM.Label { text: catalog.i18nc("@label", "Jog Position") color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("setting_control").height - verticalAlignment: Text.AlignVCenter } GridLayout @@ -80,14 +77,12 @@ Item rowSpacing: UM.Theme.getSize("default_lining").width columnSpacing: UM.Theme.getSize("default_lining").height - Label + UM.Label { text: catalog.i18nc("@label", "X/Y") color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") width: height height: UM.Theme.getSize("setting_control").height - verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter Layout.row: 0 @@ -96,89 +91,64 @@ Item Layout.preferredHeight: height } - Button + Cura.SecondaryButton { Layout.row: 1 Layout.column: 1 - Layout.preferredWidth: width - Layout.preferredHeight: height - iconSource: UM.Theme.getIcon("ChevronSingleUp"); - style: UM.Theme.styles.monitor_button_style - width: height - height: UM.Theme.getSize("setting_control").height + Layout.preferredWidth: _buttonSize + Layout.preferredHeight: _buttonSize + iconSource: UM.Theme.getIcon("ChevronSingleUp") + leftPadding: (Layout.preferredWidth - iconSize) / 2 - onClicked: - { - printerModel.moveHead(0, distancesRow.currentDistance, 0) - } + onClicked: printerModel.moveHead(0, distancesRow.currentDistance, 0) } - Button + Cura.SecondaryButton { Layout.row: 2 Layout.column: 0 - Layout.preferredWidth: width - Layout.preferredHeight: height - iconSource: UM.Theme.getIcon("ChevronSingleLeft"); - style: UM.Theme.styles.monitor_button_style - width: height - height: UM.Theme.getSize("setting_control").height + Layout.preferredWidth: _buttonSize + Layout.preferredHeight: _buttonSize + iconSource: UM.Theme.getIcon("ChevronSingleLeft") + leftPadding: (Layout.preferredWidth - iconSize) / 2 - onClicked: - { - printerModel.moveHead(-distancesRow.currentDistance, 0, 0) - } + onClicked: printerModel.moveHead(-distancesRow.currentDistance, 0, 0) } - Button + Cura.SecondaryButton { Layout.row: 2 Layout.column: 2 - Layout.preferredWidth: width - Layout.preferredHeight: height - iconSource: UM.Theme.getIcon("ChevronSingleRight"); - style: UM.Theme.styles.monitor_button_style - width: height - height: UM.Theme.getSize("setting_control").height + Layout.preferredWidth: _buttonSize + Layout.preferredHeight: _buttonSize + iconSource: UM.Theme.getIcon("ChevronSingleRight") + leftPadding: (Layout.preferredWidth - iconSize) / 2 - onClicked: - { - printerModel.moveHead(distancesRow.currentDistance, 0, 0) - } + onClicked: printerModel.moveHead(distancesRow.currentDistance, 0, 0) } - Button + Cura.SecondaryButton { Layout.row: 3 Layout.column: 1 - Layout.preferredWidth: width - Layout.preferredHeight: height - iconSource: UM.Theme.getIcon("ChevronSingleDown"); - style: UM.Theme.styles.monitor_button_style - width: height - height: UM.Theme.getSize("setting_control").height + Layout.preferredWidth: _buttonSize + Layout.preferredHeight: _buttonSize + iconSource: UM.Theme.getIcon("ChevronSingleDown") + leftPadding: (Layout.preferredWidth - iconSize) / 2 - onClicked: - { - printerModel.moveHead(0, -distancesRow.currentDistance, 0) - } + onClicked: printerModel.moveHead(0, -distancesRow.currentDistance, 0) } - Button + Cura.SecondaryButton { Layout.row: 2 Layout.column: 1 - Layout.preferredWidth: width - Layout.preferredHeight: height - iconSource: UM.Theme.getIcon("House"); - style: UM.Theme.styles.monitor_button_style - width: height - height: UM.Theme.getSize("setting_control").height + Layout.preferredWidth: _buttonSize + Layout.preferredHeight: _buttonSize + iconSource: UM.Theme.getIcon("House") + leftPadding: (Layout.preferredWidth - iconSize) / 2 - onClicked: - { - printerModel.homeHead() - } + onClicked: printerModel.homeHead() } } @@ -187,54 +157,44 @@ Item { spacing: UM.Theme.getSize("default_lining").height - Label + UM.Label { text: catalog.i18nc("@label", "Z") color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") width: UM.Theme.getSize("section").height height: UM.Theme.getSize("setting_control").height - verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter } - Button + Cura.SecondaryButton { - iconSource: UM.Theme.getIcon("ChevronSingleUp"); - style: UM.Theme.styles.monitor_button_style + iconSource: UM.Theme.getIcon("ChevronSingleUp") width: height - height: UM.Theme.getSize("setting_control").height + height: _buttonSize + leftPadding: (width - iconSize) / 2 + + onClicked: printerModel.moveHead(0, 0, distancesRow.currentDistance) - onClicked: - { - printerModel.moveHead(0, 0, distancesRow.currentDistance) - } } - Button + Cura.SecondaryButton { - iconSource: UM.Theme.getIcon("House"); - style: UM.Theme.styles.monitor_button_style + iconSource: UM.Theme.getIcon("House") width: height - height: UM.Theme.getSize("setting_control").height + height: _buttonSize + leftPadding: (width - iconSize) / 2 - onClicked: - { - printerModel.homeBed() - } + onClicked: printerModel.homeBed() } - Button + Cura.SecondaryButton { - iconSource: UM.Theme.getIcon("ChevronSingleDown"); - style: UM.Theme.styles.monitor_button_style + iconSource: UM.Theme.getIcon("ChevronSingleDown") width: height - height: UM.Theme.getSize("setting_control").height + height: _buttonSize + leftPadding: (width - iconSize) / 2 - onClicked: - { - printerModel.moveHead(0, 0, -distancesRow.currentDistance) - } + onClicked: printerModel.moveHead(0, 0, -distancesRow.currentDistance) } } } @@ -252,15 +212,13 @@ Item property real currentDistance: 10 - Label + UM.Label { text: catalog.i18nc("@label", "Jog Distance") color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("setting_control").height - verticalAlignment: Text.AlignVCenter } Row @@ -268,18 +226,16 @@ Item Repeater { model: distancesModel - delegate: Button + delegate: Cura.SecondaryButton { height: UM.Theme.getSize("setting_control").height - width: height + UM.Theme.getSize("default_margin").width text: model.label - exclusiveGroup: distanceGroup - checkable: true - checked: distancesRow.currentDistance == model.value + ButtonGroup.group: distanceGroup + color: distancesRow.currentDistance == model.value ? UM.Theme.getColor("primary_button") : UM.Theme.getColor("secondary_button") + textColor: distancesRow.currentDistance == model.value ? UM.Theme.getColor("primary_button_text"): UM.Theme.getColor("secondary_button_text") + hoverColor: distancesRow.currentDistance == model.value ? UM.Theme.getColor("primary_button_hover"): UM.Theme.getColor("secondary_button_hover") onClicked: distancesRow.currentDistance = model.value - - style: UM.Theme.styles.monitor_checkable_button_style } } } @@ -296,15 +252,13 @@ Item spacing: UM.Theme.getSize("default_margin").width - Label + UM.Label { text: catalog.i18nc("@label", "Send G-code") color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") width: Math.floor(parent.width * 0.4) - UM.Theme.getSize("default_margin").width height: UM.Theme.getSize("setting_control").height - verticalAlignment: Text.AlignVCenter } Row @@ -410,6 +364,6 @@ Item ListElement { label: "10"; value: 10 } ListElement { label: "100"; value: 100 } } - ExclusiveGroup { id: distanceGroup } + ButtonGroup { id: distanceGroup } } } diff --git a/resources/qml/PrinterOutput/MonitorItem.qml b/resources/qml/PrinterOutput/MonitorItem.qml index a26ec20f64..a6e78ba837 100644 --- a/resources/qml/PrinterOutput/MonitorItem.qml +++ b/resources/qml/PrinterOutput/MonitorItem.qml @@ -1,19 +1,16 @@ -// Copyright (c) 2017 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Layouts 1.1 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item { property string label: "" property string value: "" - height: childrenRect.height; + height: childrenRect.height property var connectedPrinter: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null @@ -24,22 +21,20 @@ Item anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width - Label + UM.Label { width: Math.floor(parent.width * 0.4) anchors.verticalCenter: parent.verticalCenter text: label color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") - font: UM.Theme.getFont("default") elide: Text.ElideRight } - Label + UM.Label { width: Math.floor(parent.width * 0.6) anchors.verticalCenter: parent.verticalCenter text: value color: connectedPrinter != null && connectedPrinter.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") - font: UM.Theme.getFont("default") elide: Text.ElideRight } } diff --git a/resources/qml/PrinterOutput/MonitorSection.qml b/resources/qml/PrinterOutput/MonitorSection.qml index 1d9df777b6..219be45d06 100644 --- a/resources/qml/PrinterOutput/MonitorSection.qml +++ b/resources/qml/PrinterOutput/MonitorSection.qml @@ -2,11 +2,8 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import QtQuick.Layouts 1.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item @@ -21,14 +18,12 @@ Item width: base.width height: UM.Theme.getSize("section").height - Label + UM.Label { anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width text: label - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("setting_category_text") } } } diff --git a/resources/qml/PrinterOutput/OutputDeviceHeader.qml b/resources/qml/PrinterOutput/OutputDeviceHeader.qml index cbb9461778..aeb9d14363 100644 --- a/resources/qml/PrinterOutput/OutputDeviceHeader.qml +++ b/resources/qml/PrinterOutput/OutputDeviceHeader.qml @@ -1,10 +1,11 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.1 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -28,7 +29,7 @@ Item height: childrenRect.height color: UM.Theme.getColor("setting_category") - Label + UM.Label { id: outputDeviceNameLabel font: UM.Theme.getFont("large_bold") @@ -39,7 +40,7 @@ Item text: outputDevice != null ? outputDevice.activePrinter.name : "" } - Label + UM.Label { id: outputDeviceAddressLabel text: (outputDevice != null && outputDevice.address != null) ? outputDevice.address : "" @@ -50,11 +51,10 @@ Item anchors.margins: UM.Theme.getSize("default_margin").width } - Label + UM.Label { text: outputDevice != null ? "" : catalog.i18nc("@info:status", "The printer is not connected.") color: outputDevice != null && outputDevice.acceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") - font: UM.Theme.getFont("default") wrapMode: Text.WordWrap anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 0c2f80fb37..12f495f7a8 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -1,10 +1,10 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.1 as Cura Cura.ExpandablePopup @@ -172,7 +172,7 @@ Cura.ExpandablePopup onExited: { tooltip.hide() } } - Cura.ToolTip + UM.ToolTip { id: tooltip @@ -193,42 +193,27 @@ Cura.ExpandablePopup { id: popup width: UM.Theme.getSize("machine_selector_widget_content").width + height: Math.min(machineSelectorList.contentHeight + separator.height + buttonRow.height, UM.Theme.getSize("machine_selector_widget_content").height) //Maximum height is the theme entry. - ScrollView + MachineSelectorList { - id: scroll - width: parent.width - clip: true - leftPadding: UM.Theme.getSize("default_lining").width - rightPadding: UM.Theme.getSize("default_lining").width - - MachineSelectorList + id: machineSelectorList + anchors { - id: machineSelectorList - // Can't use parent.width since the parent is the flickable component and not the ScrollView - width: scroll.width - scroll.leftPadding - scroll.rightPadding - property real maximumHeight: UM.Theme.getSize("machine_selector_widget_content").height - buttonRow.height - - // We use an extra property here, since we only want to to be informed about the content size changes. - onContentHeightChanged: - { - scroll.height = Math.min(contentHeight, maximumHeight) - popup.height = scroll.height + buttonRow.height - } - - Component.onCompleted: - { - scroll.height = Math.min(contentHeight, maximumHeight) - popup.height = scroll.height + buttonRow.height - } + left: parent.left + leftMargin: UM.Theme.getSize("default_lining").width + right: parent.right + rightMargin: UM.Theme.getSize("default_lining").width + top: parent.top + bottom: separator.top } + clip: true } Rectangle { id: separator - - anchors.top: scroll.bottom + anchors.bottom: buttonRow.top width: parent.width height: UM.Theme.getSize("default_lining").height color: UM.Theme.getColor("lining") @@ -238,8 +223,7 @@ Cura.ExpandablePopup { id: buttonRow - // The separator is inside the buttonRow. This is to avoid some weird behaviours with the scroll bar. - anchors.top: separator.top + anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter padding: UM.Theme.getSize("default_margin").width spacing: UM.Theme.getSize("default_margin").width diff --git a/resources/qml/PrinterSelector/MachineSelectorButton.qml b/resources/qml/PrinterSelector/MachineSelectorButton.qml index bb30cded9f..74c833f691 100644 --- a/resources/qml/PrinterSelector/MachineSelectorButton.qml +++ b/resources/qml/PrinterSelector/MachineSelectorButton.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.1 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -43,7 +43,7 @@ Button width: machineSelectorButton.width - machineSelectorButton.leftPadding height: UM.Theme.getSize("action_button").height - Label + UM.Label { id: buttonText anchors @@ -56,8 +56,6 @@ Button color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("small_button_text") font: UM.Theme.getFont("medium") visible: text != "" - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } diff --git a/resources/qml/PrinterSelector/MachineSelectorList.qml b/resources/qml/PrinterSelector/MachineSelectorList.qml index 18b1a68b20..ae2706f9ab 100644 --- a/resources/qml/PrinterSelector/MachineSelectorList.qml +++ b/resources/qml/PrinterSelector/MachineSelectorList.qml @@ -4,7 +4,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura ListView @@ -14,22 +14,25 @@ ListView section.property: "hasRemoteConnection" property real contentHeight: childrenRect.height - section.delegate: Label + ScrollBar.vertical: UM.ScrollBar + { + id: scrollBar + } + + section.delegate: UM.Label { text: section == "true" ? catalog.i18nc("@label", "Connected printers") : catalog.i18nc("@label", "Preset printers") - width: parent.width + width: parent.width - scrollBar.width height: UM.Theme.getSize("action_button").height leftPadding: UM.Theme.getSize("default_margin").width - renderType: Text.NativeRendering font: UM.Theme.getFont("medium") color: UM.Theme.getColor("text_medium") - verticalAlignment: Text.AlignVCenter } delegate: MachineSelectorButton { text: model.name ? model.name : "" - width: listView.width + width: listView.width - scrollBar.width outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null checked: Cura.MachineManager.activeMachine ? Cura.MachineManager.activeMachine.id == model.id : false diff --git a/resources/qml/ProfileOverview.qml b/resources/qml/ProfileOverview.qml new file mode 100644 index 0000000000..e1009cd010 --- /dev/null +++ b/resources/qml/ProfileOverview.qml @@ -0,0 +1,52 @@ +//Copyright (c) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. + +import Qt.labs.qmlmodels 1.0 +import QtQuick 2.7 +import QtQuick.Controls 2.15 + +import UM 1.5 as UM +import Cura 1.6 as Cura + +Cura.TableView +{ + id: profileOverview + + property var qualityItem //The quality profile to display here. + property int extruderPosition: -1 //The extruder to display. -1 denotes the global stack. + property bool isQualityItemCurrentlyActivated: qualityItem != null && qualityItem.name == Cura.MachineManager.activeQualityOrQualityChangesName + + // Hack to make sure that when the data of our model changes the tablemodel is also updated + // If we directly set the rows (So without the clear being called) it doesn't seem to + // get updated correctly. + property var modelRows: qualitySettings.items + onModelRowsChanged: + { + tableModel.clear() + tableModel.rows = modelRows + } + + Cura.QualitySettingsModel + { + id: qualitySettings + selectedPosition: profileOverview.extruderPosition + selectedQualityItem: profileOverview.qualityItem == null ? {} : profileOverview.qualityItem + } + + columnHeaders: [ + catalog.i18nc("@title:column", "Setting"), + catalog.i18nc("@title:column", "Profile"), + catalog.i18nc("@title:column", "Current"), + catalog.i18nc("@title:column Unit of measurement", "Unit") + ] + model: TableModel + { + id: tableModel + TableModelColumn { display: "label" } + TableModelColumn { display: "profile_value" } + TableModelColumn { display: "user_value" } + TableModelColumn { display: "unit" } + rows: modelRows + } + sectionRole: "category" +}
\ No newline at end of file diff --git a/resources/qml/SecondaryButton.qml b/resources/qml/SecondaryButton.qml index ba4e0bb2c1..068d65c7b8 100644 --- a/resources/qml/SecondaryButton.qml +++ b/resources/qml/SecondaryButton.qml @@ -11,8 +11,9 @@ Cura.ActionButton { color: UM.Theme.getColor("secondary_button") textColor: UM.Theme.getColor("secondary_button_text") - outlineColor: UM.Theme.getColor("secondary_button_text") - disabledColor: UM.Theme.getColor("action_button_disabled") + outlineColor: UM.Theme.getColor("border_accent_1") + disabledColor: UM.Theme.getColor("secondary_button") textDisabledColor: UM.Theme.getColor("action_button_disabled_text") hoverColor: UM.Theme.getColor("secondary_button_hover") + outlineDisabledColor: UM.Theme.getColor("action_button_disabled_text") }
\ No newline at end of file diff --git a/resources/qml/Settings/SettingCategory.qml b/resources/qml/Settings/SettingCategory.qml index d8b9b2c83f..0619017b2d 100644 --- a/resources/qml/Settings/SettingCategory.qml +++ b/resources/qml/Settings/SettingCategory.qml @@ -1,42 +1,21 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 2.0 -import UM 1.1 as UM -import Cura 1.0 as Cura +import UM 1.5 as UM +import Cura 1.5 as Cura -Button +Cura.CategoryButton { id: base anchors.left: parent.left anchors.right: parent.right - // To avoid overlapping with the scrollBars - anchors.rightMargin: 2 * UM.Theme.getSize("thin_margin").width - hoverEnabled: true - height: UM.Theme.getSize("section_icon_column").height - - background: Rectangle - { - id: backgroundRectangle - height: UM.Theme.getSize("section").height - anchors.verticalCenter: parent.verticalCenter - color: - { - if (!base.enabled) - { - return UM.Theme.getColor("setting_category_disabled") - } - else if (base.hovered) - { - return UM.Theme.getColor("setting_category_hover") - } - return UM.Theme.getColor("setting_category") - } - Behavior on color { ColorAnimation { duration: 50; } } - } + categoryIcon: UM.Theme.getIcon(definition.icon) + expanded: definition.expanded + labelText: definition.label signal showTooltip(string text) signal hideTooltip() @@ -46,73 +25,6 @@ Button signal setActiveFocusToNextSetting(bool forward) property var focusItem: base - property bool expanded: definition.expanded - - - property color text_color: - { - if (!base.enabled) - { - return UM.Theme.getColor("setting_category_disabled_text") - } else if (base.hovered || base.pressed || base.activeFocus) - { - return UM.Theme.getColor("setting_category_active_text") - } - - return UM.Theme.getColor("setting_category_text") - - } - - contentItem: Item - { - anchors.fill: parent - - Label - { - id: settingNameLabel - anchors - { - left: parent.left - leftMargin: 2 * UM.Theme.getSize("default_margin").width + UM.Theme.getSize("section_icon").width - right: parent.right - verticalCenter: parent.verticalCenter - } - text: definition.label - textFormat: Text.PlainText - renderType: Text.NativeRendering - font: UM.Theme.getFont("medium_bold") - color: base.text_color - fontSizeMode: Text.HorizontalFit - minimumPointSize: 8 - } - - UM.RecolorImage - { - id: category_arrow - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width - width: UM.Theme.getSize("standard_arrow").width - height: UM.Theme.getSize("standard_arrow").height - sourceSize.height: width - color: UM.Theme.getColor("setting_control_button") - source: definition.expanded ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleLeft") - } - } - - UM.RecolorImage - { - id: icon - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("thin_margin").width - color: base.text_color - source: UM.Theme.getIcon(definition.icon) - width: UM.Theme.getSize("section_icon").width - height: UM.Theme.getSize("section_icon").height - sourceSize.width: width - sourceSize.height: width - } onClicked: { @@ -151,7 +63,7 @@ Button { right: inheritButton.visible ? inheritButton.left : parent.right // Use 1.9 as the factor because there is a 0.1 difference between the settings and inheritance warning icons - rightMargin: inheritButton.visible ? Math.round(UM.Theme.getSize("default_margin").width / 2) : category_arrow.width + Math.round(UM.Theme.getSize("default_margin").width * 1.9) + rightMargin: inheritButton.visible ? Math.round(UM.Theme.getSize("default_margin").width / 2) : arrow.width + Math.round(UM.Theme.getSize("default_margin").width * 1.9) verticalCenter: parent.verticalCenter } @@ -168,7 +80,7 @@ Button anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right - anchors.rightMargin: category_arrow.width + UM.Theme.getSize("default_margin").width * 2 + anchors.rightMargin: arrow.width + UM.Theme.getSize("default_margin").width * 2 visible: { diff --git a/resources/qml/Settings/SettingCheckBox.qml b/resources/qml/Settings/SettingCheckBox.qml index 1b4e4ac143..4987eedb83 100644 --- a/resources/qml/Settings/SettingCheckBox.qml +++ b/resources/qml/Settings/SettingCheckBox.qml @@ -98,7 +98,7 @@ SettingItem { if(!enabled) { - return UM.Theme.getColor("checkbox_border") + return UM.Theme.getColor("checkbox_border_disabled") } switch (propertyProvider.properties.validationState) { @@ -116,7 +116,7 @@ SettingItem { return UM.Theme.getColor("checkbox_border_hover") } - return UM.Theme.getColor("setting_control_border") + return UM.Theme.getColor("checkbox_border") } color: { @@ -138,7 +138,7 @@ SettingItem // Validation is OK. if (control.containsMouse || control.activeFocus) { - return UM.Theme.getColor("setting_control_highlight") + return UM.Theme.getColor("checkbox_hover") } return UM.Theme.getColor("checkbox") } @@ -150,7 +150,7 @@ SettingItem height: UM.Theme.getSize("checkbox_mark").height width: UM.Theme.getSize("checkbox_mark").width sourceSize.height: width - color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text"); + color: !enabled ? UM.Theme.getColor("checkbox_mark_disabled") : UM.Theme.getColor("checkbox_mark"); source: UM.Theme.getIcon("Check", "low") opacity: control.checked ? 1 : 0 Behavior on opacity { NumberAnimation { duration: 100; } } diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index ea514eb069..c3bc472fbe 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -1,18 +1,18 @@ -// Copyright (c) 2016 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 2.0 -import UM 1.1 as UM -import Cura 1.0 as Cura +import UM 1.5 as UM +import Cura 1.5 as Cura SettingItem { id: base property var focusItem: control - contents: ComboBox + contents: Cura.ComboBox { id: control anchors.fill: parent @@ -113,7 +113,7 @@ SettingItem color: UM.Theme.getColor("setting_control_button"); } - background: Rectangle + background: UM.UnderlineBackground { color: { @@ -127,9 +127,7 @@ SettingItem } return UM.Theme.getColor("setting_control") } - radius: UM.Theme.getSize("setting_control_radius").width - border.width: UM.Theme.getSize("default_lining").width - border.color: + liningColor: { if (!enabled) { @@ -137,13 +135,13 @@ SettingItem } if (control.hovered || control.activeFocus) { - return UM.Theme.getColor("setting_control_border_highlight") + return UM.Theme.getColor("border_main") } - return UM.Theme.getColor("setting_control_border") + return UM.Theme.getColor("border_field_light") } } - contentItem: Label + contentItem: UM.Label { anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left @@ -153,13 +151,8 @@ SettingItem text: control.currentText textFormat: Text.PlainText - renderType: Text.NativeRendering - font: UM.Theme.getFont("default") color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") - elide: Text.ElideLeft - verticalAlignment: Text.AlignVCenter - background: Rectangle { id: swatch @@ -183,12 +176,12 @@ SettingItem contentItem: ListView { - clip: true implicitHeight: contentHeight + + ScrollBar.vertical: UM.ScrollBar {} + clip: true model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex - - ScrollIndicator.vertical: ScrollIndicator { } } background: Rectangle @@ -204,27 +197,15 @@ SettingItem height: control.height highlighted: control.highlightedIndex == index - contentItem: Label + contentItem: UM.Label { anchors.fill: parent anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width text: model.name - renderType: Text.NativeRendering - color: - { - if (model.enabled) - { - UM.Theme.getColor("setting_control_text") - } else - { - UM.Theme.getColor("action_button_disabled_text"); - } - } - font: UM.Theme.getFont("default") + color: model.enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("action_button_disabled_text") elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width background: Rectangle @@ -244,7 +225,6 @@ SettingItem background: Rectangle { color: parent.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent" - border.color: parent.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent" } } } diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index 0470e91faa..6787855775 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -13,12 +13,9 @@ import "." Item { id: base - - height: UM.Theme.getSize("section").height + height: enabled ? UM.Theme.getSize("section").height + UM.Theme.getSize("narrow_margin").height : 0 anchors.left: parent.left anchors.right: parent.right - // To avoid overlapping with the scrollBars - anchors.rightMargin: 2 * UM.Theme.getSize("thin_margin").width property alias contents: controlContainer.children property alias hovered: mouse.containsMouse @@ -137,7 +134,7 @@ Item id: label anchors.left: parent.left - anchors.leftMargin: doDepthIndentation ? Math.round(UM.Theme.getSize("thin_margin").width + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width)) : 0 + anchors.leftMargin: doDepthIndentation ? Math.round(UM.Theme.getSize("thin_margin").width + ((definition.depth - 1) * UM.Theme.getSize("default_margin").width)) : 0 anchors.right: settingControls.left anchors.verticalCenter: parent.verticalCenter diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index 94df1bcc03..2a4db2ab31 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -1,11 +1,11 @@ -// Copyright (c) 2018 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 import QtQuick.Controls 2.0 -import UM 1.1 as UM -import Cura 1.0 as Cura +import UM 1.5 as UM +import Cura 1.5 as Cura SettingItem { @@ -19,7 +19,7 @@ SettingItem // this extra property to keep the ExtrudersModel and use this in the rest of the code. property var extrudersWithOptionalModel: CuraApplication.getExtrudersModelWithOptional() - contents: ComboBox + contents: Cura.ComboBox { id: control anchors.fill: parent @@ -111,26 +111,24 @@ SettingItem sourceSize.width: width + 5 * screenScaleFactor sourceSize.height: width + 5 * screenScaleFactor - color: UM.Theme.getColor("setting_control_button"); + color: UM.Theme.getColor("setting_control_button") } - background: Rectangle + background: UM.UnderlineBackground { color: { if (!enabled) { - return UM.Theme.getColor("setting_control_disabled"); + return UM.Theme.getColor("setting_control_disabled") } - if (control.hovered || control.activeFocus) + if (control.hovered || base.activeFocus) { - return UM.Theme.getColor("setting_control_highlight"); + return UM.Theme.getColor("setting_control_highlight") } - return UM.Theme.getColor("setting_control"); + return UM.Theme.getColor("setting_control") } - radius: UM.Theme.getSize("setting_control_radius").width - border.width: UM.Theme.getSize("default_lining").width - border.color: + liningColor: { if (!enabled) { @@ -138,13 +136,13 @@ SettingItem } if (control.hovered || control.activeFocus) { - return UM.Theme.getColor("setting_control_border_highlight") + return UM.Theme.getColor("border_main") } - return UM.Theme.getColor("setting_control_border") + return UM.Theme.getColor("border_field_light") } } - contentItem: Label + contentItem: UM.Label { anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left @@ -154,12 +152,9 @@ SettingItem text: control.currentText textFormat: Text.PlainText - renderType: Text.NativeRendering - font: UM.Theme.getFont("default") color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter background: Rectangle { @@ -175,19 +170,21 @@ SettingItem } } - popup: Popup { + popup: Popup + { y: control.height - UM.Theme.getSize("default_lining").height width: control.width implicitHeight: contentItem.implicitHeight + 2 * UM.Theme.getSize("default_lining").width padding: UM.Theme.getSize("default_lining").width - contentItem: ListView { - clip: true + contentItem: ListView + { implicitHeight: contentHeight + + ScrollBar.vertical: UM.ScrollBar {} + clip: true model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex - - ScrollIndicator.vertical: ScrollIndicator { } } background: Rectangle { @@ -202,7 +199,7 @@ SettingItem height: control.height highlighted: control.highlightedIndex == index - contentItem: Label + contentItem: UM.Label { anchors.fill: parent anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width @@ -210,18 +207,15 @@ SettingItem text: model.name textFormat: Text.PlainText - renderType: Text.NativeRendering color: { if (model.enabled) { UM.Theme.getColor("setting_control_text") } else { - UM.Theme.getColor("action_button_disabled_text"); + UM.Theme.getColor("action_button_disabled_text") } } - font: UM.Theme.getFont("default") elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width background: Rectangle @@ -241,7 +235,6 @@ SettingItem background: Rectangle { color: parent.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent" - border.color: parent.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent" } } } diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index a5647e2d3a..95976ad58e 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -4,7 +4,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 -import UM 1.1 as UM +import UM 1.5 as UM SettingItem { @@ -26,19 +26,17 @@ SettingItem } } - contents: Rectangle + contents: UM.UnderlineBackground { id: control anchors.fill: parent - radius: UM.Theme.getSize("setting_control_radius").width - border.width: UM.Theme.getSize("default_lining").width - border.color: + liningColor: { if(!enabled) { - return UM.Theme.getColor("setting_control_disabled_border") + return UM.Theme.getColor("text_field_border_disabled") } switch(propertyProvider.properties.validationState) { @@ -54,15 +52,15 @@ SettingItem //Validation is OK. if(hovered || input.activeFocus) { - return UM.Theme.getColor("setting_control_border_highlight") + return UM.Theme.getColor("text_field_border_hovered") } - return UM.Theme.getColor("setting_control_border") + return UM.Theme.getColor("text_field_border") } color: { if(!enabled) { - return UM.Theme.getColor("setting_control_disabled") + return UM.Theme.getColor("text_field") } switch(propertyProvider.properties.validationState) { @@ -78,19 +76,11 @@ SettingItem return UM.Theme.getColor("setting_validation_ok") default: - return UM.Theme.getColor("setting_control") + return UM.Theme.getColor("text_field") } } - Rectangle - { - anchors.fill: parent - anchors.margins: Math.round(UM.Theme.getSize("default_lining").width) - color: UM.Theme.getColor("setting_control_highlight") - opacity: !control.hovered ? 0 : propertyProvider.properties.validationState == "ValidatorState.Valid" ? 1.0 : 0.35 - } - - Label + UM.Label { anchors { @@ -105,9 +95,7 @@ SettingItem //However the setting value is aligned, align the unit opposite. That way it stays readable with right-to-left languages. horizontalAlignment: (input.effectiveHorizontalAlignment == Text.AlignLeft) ? Text.AlignRight : Text.AlignLeft textFormat: Text.PlainText - renderType: Text.NativeRendering color: UM.Theme.getColor("setting_unit") - font: UM.Theme.getFont("default") } TextInput @@ -155,8 +143,9 @@ SettingItem } color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text") + selectedTextColor: UM.Theme.getColor("setting_control_text") font: UM.Theme.getFont("default") - + selectionColor: UM.Theme.getColor("text_selection") selectByMouse: true maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10 diff --git a/resources/qml/Settings/SettingUnknown.qml b/resources/qml/Settings/SettingUnknown.qml index 8eeb2fb6a0..645e4571b0 100644 --- a/resources/qml/Settings/SettingUnknown.qml +++ b/resources/qml/Settings/SettingUnknown.qml @@ -4,17 +4,13 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 -import UM 1.2 as UM +import UM 1.5 as UM SettingItem { - contents: Label + contents: UM.Label { anchors.fill: parent text: propertyProvider.properties.value + " " + unit - renderType: Text.NativeRendering - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - verticalAlignment: Text.AlignVCenter } } diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 9d8916f8f4..40e9e19b01 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -1,12 +1,10 @@ -// 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 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Layouts 1.2 +import QtQuick.Controls 2.1 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura import "../Menus" @@ -16,7 +14,6 @@ Item id: settingsView property QtObject settingVisibilityPresetsModel: CuraApplication.getSettingVisibilityPresetsModel() - property Action configureSettings property bool findingSettings Item @@ -28,7 +25,6 @@ Item top: parent.top left: parent.left right: settingVisibilityMenu.left - rightMargin: UM.Theme.getSize("default_margin").width } height: UM.Theme.getSize("print_setup_big_item").height @@ -41,18 +37,35 @@ Item repeat: false } - Cura.SearchBar + Cura.TextField { id: filter height: parent.height anchors.left: parent.left anchors.right: parent.right - - placeholderText: catalog.i18nc("@label:textbox", "Search settings") // Overwrite + leftPadding: searchIcon.width + UM.Theme.getSize("default_margin").width * 2 + placeholderText: catalog.i18nc("@label:textbox", "Search settings") + font.italic: true property var expandedCategories property bool lastFindingSettings: false + UM.RecolorImage + { + id: searchIcon + + anchors + { + verticalCenter: parent.verticalCenter + left: parent.left + leftMargin: UM.Theme.getSize("default_margin").width + } + source: UM.Theme.getIcon("search") + height: UM.Theme.getSize("small_button_icon").height + width: height + color: UM.Theme.getColor("text") + } + onTextChanged: settingsSearchTimer.restart() onEditingFinished: @@ -117,8 +130,6 @@ Item SettingVisibilityPresetsMenu { id: settingVisibilityPresetsMenu - x: settingVisibilityMenu.x - y: settingVisibilityMenu.y onCollapseAllCategories: { settingsSearchTimer.stop() @@ -128,60 +139,45 @@ Item } } - ToolButton + UM.BurgerButton { id: settingVisibilityMenu anchors { - top: filterContainer.top - bottom: filterContainer.bottom + verticalCenter: filterContainer.verticalCenter right: parent.right - rightMargin: UM.Theme.getSize("wide_margin").width - } - width: UM.Theme.getSize("medium_button_icon").width - height: UM.Theme.getSize("medium_button_icon").height - - style: ButtonStyle - { - background: Item - { - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: UM.Theme.getSize("medium_button_icon").width - height: UM.Theme.getSize("medium_button_icon").height - sourceSize.width: width - sourceSize.height: height - color: control.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text") - source: UM.Theme.getIcon("Hamburger") - } - } - label: Label {} } onClicked: { settingVisibilityPresetsMenu.popup( - settingVisibilityMenu, + popupContainer, -settingVisibilityPresetsMenu.width + UM.Theme.getSize("default_margin").width, settingVisibilityMenu.height ) } } + Item + { + // Work around to prevent the buttom from being rescaled if a popup is attached + id: popupContainer + anchors.bottom: settingVisibilityMenu.bottom + anchors.right: settingVisibilityMenu.right + } // Mouse area that gathers the scroll events to not propagate it to the main view. MouseArea { - anchors.fill: scrollView + anchors.fill: contents acceptedButtons: Qt.AllButtons onWheel: wheel.accepted = true } - ScrollView + ListView { - id: scrollView + id: contents + maximumFlickVelocity: 1000 anchors { top: filterContainer.bottom @@ -190,340 +186,340 @@ Item right: parent.right left: parent.left } - - style: UM.Theme.styles.scrollview - flickableItem.flickableDirection: Flickable.VerticalFlick - __wheelAreaScrollSpeed: 75 // Scroll three lines in one scroll event - - ListView + clip: true + cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item. + ScrollBar.vertical: UM.ScrollBar { - id: contents - cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item. + id: scrollBar + onPositionChanged: { + // This removes focus from items when scrolling. + // This fixes comboboxes staying open and scrolling container + if (!activeFocus) { + forceActiveFocus(); + } + } + } - model: UM.SettingDefinitionsModel + model: UM.SettingDefinitionsModel + { + id: definitionsModel + containerId: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.definition.id: "" + visibilityHandler: UM.SettingPreferenceVisibilityHandler { } + exclude: ["machine_settings", "command_line_settings", "infill_mesh", "infill_mesh_order", "cutting_mesh", "support_mesh", "anti_overhang_mesh"] // TODO: infill_mesh settings are excluded hardcoded, but should be based on the fact that settable_globally, settable_per_meshgroup and settable_per_extruder are false. + expanded: CuraApplication.expandedCategories + onExpandedChanged: { - id: definitionsModel - containerId: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.definition.id: "" - visibilityHandler: UM.SettingPreferenceVisibilityHandler { } - exclude: ["machine_settings", "command_line_settings", "infill_mesh", "infill_mesh_order", "cutting_mesh", "support_mesh", "anti_overhang_mesh"] // TODO: infill_mesh settings are excluded hardcoded, but should be based on the fact that settable_globally, settable_per_meshgroup and settable_per_extruder are false. - expanded: CuraApplication.expandedCategories - onExpandedChanged: + if (!findingSettings) { - if (!findingSettings) - { - // Do not change expandedCategories preference while filtering settings - // because all categories are expanded while filtering - CuraApplication.setExpandedCategories(expanded) - } + // Do not change expandedCategories preference while filtering settings + // because all categories are expanded while filtering + CuraApplication.setExpandedCategories(expanded) } - onVisibilityChanged: Cura.SettingInheritanceManager.scheduleUpdate() } + onVisibilityChanged: Cura.SettingInheritanceManager.scheduleUpdate() + } - property int indexWithFocus: -1 - property double delegateHeight: UM.Theme.getSize("section").height + 2 * UM.Theme.getSize("default_lining").height - property string activeMachineId: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id : "" - delegate: Loader + property int indexWithFocus: -1 + property string activeMachineId: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id : "" + delegate: Loader + { + id: delegate + + width: contents.width - (scrollBar.width + UM.Theme.getSize("narrow_margin").width) + Behavior on height { NumberAnimation { duration: 100 } } + opacity: enabled ? 1 : 0 + Behavior on opacity { NumberAnimation { duration: 100 } } + enabled: provider.properties.enabled === "True" + + property var definition: model + property var settingDefinitionsModel: definitionsModel + property var propertyProvider: provider + property var globalPropertyProvider: inheritStackProvider + property bool externalResetHandler: false + + //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 + //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, + //causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely. + asynchronous: model.type !== "enum" && model.type !== "extruder" && model.type !== "optional_extruder" + active: model.type !== undefined + + source: { - id: delegate - - width: scrollView.width - height: enabled ? contents.delegateHeight: 0 - Behavior on height { NumberAnimation { duration: 100 } } - opacity: enabled ? 1 : 0 - Behavior on opacity { NumberAnimation { duration: 100 } } - enabled: provider.properties.enabled === "True" - - property var definition: model - property var settingDefinitionsModel: definitionsModel - property var propertyProvider: provider - property var globalPropertyProvider: inheritStackProvider - property bool externalResetHandler: false - - //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 - //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, - //causing nasty issues when selecting different options. So disable asynchronous loading of enum type completely. - asynchronous: model.type !== "enum" && model.type !== "extruder" && model.type !== "optional_extruder" - active: model.type !== undefined - - source: + switch(model.type) { - switch(model.type) - { - case "int": - return "SettingTextField.qml" - case "[int]": - return "SettingTextField.qml" - case "float": - return "SettingTextField.qml" - case "enum": - return "SettingComboBox.qml" - case "extruder": - return "SettingExtruder.qml" - case "bool": - return "SettingCheckBox.qml" - case "str": - return "SettingTextField.qml" - case "category": - return "SettingCategory.qml" - case "optional_extruder": - return "SettingOptionalExtruder.qml" - default: - return "SettingUnknown.qml" - } + case "int": + return "SettingTextField.qml" + case "[int]": + return "SettingTextField.qml" + case "float": + return "SettingTextField.qml" + case "enum": + return "SettingComboBox.qml" + case "extruder": + return "SettingExtruder.qml" + case "bool": + return "SettingCheckBox.qml" + case "str": + return "SettingTextField.qml" + case "category": + return "SettingCategory.qml" + case "optional_extruder": + return "SettingOptionalExtruder.qml" + default: + return "SettingUnknown.qml" } + } - // Binding to ensure that the right containerstack ID is set for the provider. - // This ensures that if a setting has a limit_to_extruder id (for instance; Support speed points to the - // extruder that actually prints the support, as that is the setting we need to use to calculate the value) - Binding + // Binding to ensure that the right containerstack ID is set for the provider. + // This ensures that if a setting has a limit_to_extruder id (for instance; Support speed points to the + // extruder that actually prints the support, as that is the setting we need to use to calculate the value) + Binding + { + target: provider + property: "containerStackId" + when: model.settable_per_extruder || (inheritStackProvider.properties.limit_to_extruder !== undefined && inheritStackProvider.properties.limit_to_extruder >= 0); + value: { - target: provider - property: "containerStackId" - when: model.settable_per_extruder || (inheritStackProvider.properties.limit_to_extruder !== undefined && inheritStackProvider.properties.limit_to_extruder >= 0); - value: - { - // Associate this binding with Cura.MachineManager.activeMachine.id in the beginning so this - // binding will be triggered when activeMachineId is changed too. - // Otherwise, if this value only depends on the extruderIds, it won't get updated when the - // machine gets changed. + // Associate this binding with Cura.MachineManager.activeMachine.id in the beginning so this + // binding will be triggered when activeMachineId is changed too. + // Otherwise, if this value only depends on the extruderIds, it won't get updated when the + // machine gets changed. - if (!model.settable_per_extruder) - { - //Not settable per extruder or there only is global, so we must pick global. - return contents.activeMachineId - } - if (inheritStackProvider.properties.limit_to_extruder !== undefined && inheritStackProvider.properties.limit_to_extruder >= 0) - { - //We have limit_to_extruder, so pick that stack. - return Cura.ExtruderManager.extruderIds[inheritStackProvider.properties.limit_to_extruder]; - } - if (Cura.ExtruderManager.activeExtruderStackId) - { - //We're on an extruder tab. Pick the current extruder. - return Cura.ExtruderManager.activeExtruderStackId; - } - //No extruder tab is selected. Pick the global stack. Shouldn't happen any more since we removed the global tab. + if (!model.settable_per_extruder) + { + //Not settable per extruder or there only is global, so we must pick global. return contents.activeMachineId } + if (inheritStackProvider.properties.limit_to_extruder !== undefined && inheritStackProvider.properties.limit_to_extruder >= 0) + { + //We have limit_to_extruder, so pick that stack. + return Cura.ExtruderManager.extruderIds[inheritStackProvider.properties.limit_to_extruder] + } + if (Cura.ExtruderManager.activeExtruderStackId) + { + //We're on an extruder tab. Pick the current extruder. + return Cura.ExtruderManager.activeExtruderStackId + } + //No extruder tab is selected. Pick the global stack. Shouldn't happen any more since we removed the global tab. + return contents.activeMachineId } + } - // Specialty provider that only watches global_inherits (we can't filter on what property changed we get events - // so we bypass that to make a dedicated provider). - UM.SettingPropertyProvider - { - id: inheritStackProvider - containerStackId: contents.activeMachineId - key: model.key - watchedProperties: [ "limit_to_extruder" ] - } + // Specialty provider that only watches global_inherits (we can't filter on what property changed we get events + // so we bypass that to make a dedicated provider). + UM.SettingPropertyProvider + { + id: inheritStackProvider + containerStackId: contents.activeMachineId + key: model.key + watchedProperties: [ "limit_to_extruder" ] + } - UM.SettingPropertyProvider - { - id: provider + UM.SettingPropertyProvider + { + id: provider - containerStackId: contents.activeMachineId - key: model.key - watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder", "resolve" ] - storeIndex: 0 - removeUnusedValue: model.resolve === undefined - } + containerStackId: contents.activeMachineId + key: model.key + watchedProperties: [ "value", "enabled", "state", "validationState", "settable_per_extruder", "resolve" ] + storeIndex: 0 + removeUnusedValue: model.resolve === undefined + } - Connections + Connections + { + target: item + function onContextMenuRequested() { - target: item - function onContextMenuRequested() + contextMenu.key = model.key + contextMenu.settingVisible = model.visible + contextMenu.provider = provider + contextMenu.popup() //iconName: model.icon_name + } + function onShowTooltip(text) { base.showTooltip(delegate, Qt.point(-settingsView.x - UM.Theme.getSize("default_margin").width, 0), text) } + function onHideTooltip() { base.hideTooltip() } + function onShowAllHiddenInheritedSettings() + { + var children_with_override = Cura.SettingInheritanceManager.getChildrenKeysWithOverride(category_id) + for(var i = 0; i < children_with_override.length; i++) { - contextMenu.key = model.key; - contextMenu.settingVisible = model.visible; - contextMenu.provider = provider - contextMenu.popup(); + definitionsModel.setVisible(children_with_override[i], true) } - function onShowTooltip(text) { base.showTooltip(delegate, Qt.point(-settingsView.x - UM.Theme.getSize("default_margin").width, 0), text) } - function onHideTooltip() { base.hideTooltip() } - function onShowAllHiddenInheritedSettings(category_id) + Cura.SettingInheritanceManager.manualRemoveOverride(category_id) + } + function onFocusReceived() + { + contents.indexWithFocus = index + animateContentY.from = contents.contentY + contents.positionViewAtIndex(index, ListView.Contain) + animateContentY.to = contents.contentY + animateContentY.running = true + } + function onSetActiveFocusToNextSetting(forward) + { + if (forward == undefined || forward) { - var children_with_override = Cura.SettingInheritanceManager.getChildrenKeysWithOverride(category_id) - for(var i = 0; i < children_with_override.length; i++) + contents.currentIndex = contents.indexWithFocus + 1 + while(contents.currentItem && contents.currentItem.height <= 0) { - definitionsModel.setVisible(children_with_override[i], true) + contents.currentIndex++ + } + if (contents.currentItem) + { + contents.currentItem.item.focusItem.forceActiveFocus() } - Cura.SettingInheritanceManager.manualRemoveOverride(category_id) - } - function onFocusReceived() - { - contents.indexWithFocus = index; - animateContentY.from = contents.contentY; - contents.positionViewAtIndex(index, ListView.Contain); - animateContentY.to = contents.contentY; - animateContentY.running = true; } - function onSetActiveFocusToNextSetting(forward) + else { - if (forward == undefined || forward) + contents.currentIndex = contents.indexWithFocus - 1 + while(contents.currentItem && contents.currentItem.height <= 0) { - contents.currentIndex = contents.indexWithFocus + 1; - while(contents.currentItem && contents.currentItem.height <= 0) - { - contents.currentIndex++; - } - if (contents.currentItem) - { - contents.currentItem.item.focusItem.forceActiveFocus(); - } + contents.currentIndex-- } - else + if (contents.currentItem) { - contents.currentIndex = contents.indexWithFocus - 1; - while(contents.currentItem && contents.currentItem.height <= 0) - { - contents.currentIndex--; - } - if (contents.currentItem) - { - contents.currentItem.item.focusItem.forceActiveFocus(); - } + contents.currentItem.item.focusItem.forceActiveFocus() } } } } + } - NumberAnimation { - id: animateContentY - target: contents - property: "contentY" - duration: 50 - } + NumberAnimation { + id: animateContentY + target: contents + property: "contentY" + duration: 50 + } - add: Transition { - SequentialAnimation { - NumberAnimation { properties: "height"; from: 0; duration: 100 } - NumberAnimation { properties: "opacity"; from: 0; duration: 100 } - } + add: Transition { + SequentialAnimation { + NumberAnimation { properties: "height"; from: 0; duration: 100 } + NumberAnimation { properties: "opacity"; from: 0; duration: 100 } } - remove: Transition { - SequentialAnimation { - NumberAnimation { properties: "opacity"; to: 0; duration: 100 } - NumberAnimation { properties: "height"; to: 0; duration: 100 } - } + } + remove: Transition { + SequentialAnimation { + NumberAnimation { properties: "opacity"; to: 0; duration: 100 } + NumberAnimation { properties: "height"; to: 0; duration: 100 } } - addDisplaced: Transition { + } + addDisplaced: Transition { + NumberAnimation { properties: "x,y"; duration: 100 } + } + removeDisplaced: Transition { + SequentialAnimation { + PauseAnimation { duration: 100; } NumberAnimation { properties: "x,y"; duration: 100 } } - removeDisplaced: Transition { - SequentialAnimation { - PauseAnimation { duration: 100; } - NumberAnimation { properties: "x,y"; duration: 100 } - } - } + } - Menu - { - id: contextMenu + Cura.Menu + { + id: contextMenu - property string key - property var provider - property bool settingVisible + property string key + property var provider + property bool settingVisible - MenuItem - { - //: Settings context menu action - text: catalog.i18nc("@action:menu", "Copy value to all extruders") - visible: machineExtruderCount.properties.value > 1 - enabled: contextMenu.provider !== undefined && contextMenu.provider.properties.settable_per_extruder !== "False" - onTriggered: Cura.MachineManager.copyValueToExtruders(contextMenu.key) - } + Cura.MenuItem + { + //: Settings context menu action + text: catalog.i18nc("@action:menu", "Copy value to all extruders") + visible: machineExtruderCount.properties.value > 1 + enabled: contextMenu.provider !== undefined && contextMenu.provider.properties.settable_per_extruder !== "False" + onTriggered: Cura.MachineManager.copyValueToExtruders(contextMenu.key) + } - MenuItem - { - //: Settings context menu action - text: catalog.i18nc("@action:menu", "Copy all changed values to all extruders") - visible: machineExtruderCount.properties.value > 1 - enabled: contextMenu.provider !== undefined - onTriggered: Cura.MachineManager.copyAllValuesToExtruders() - } + Cura.MenuItem + { + //: Settings context menu action + text: catalog.i18nc("@action:menu", "Copy all changed values to all extruders") + visible: machineExtruderCount.properties.value > 1 + enabled: contextMenu.provider !== undefined + onTriggered: Cura.MachineManager.copyAllValuesToExtruders() + } - MenuSeparator - { - visible: machineExtruderCount.properties.value > 1 - } + Cura.MenuSeparator + { + visible: machineExtruderCount.properties.value > 1 + } - Instantiator + Instantiator + { + id: customMenuItems + model: Cura.SidebarCustomMenuItemsModel { } + Cura.MenuItem { - id: customMenuItems - model: Cura.SidebarCustomMenuItemsModel { } - MenuItem + text: model.name + onTriggered: { - text: model.name - iconName: model.icon_name - onTriggered: - { - customMenuItems.model.callMenuItemMethod(name, model.actions, {"key": contextMenu.key}) - } + customMenuItems.model.callMenuItemMethod(name, model.actions, {"key": contextMenu.key}) } - onObjectAdded: contextMenu.insertItem(index, object) - onObjectRemoved: contextMenu.removeItem(object) } + onObjectAdded: contextMenu.insertItem(index, object) + onObjectRemoved: contextMenu.removeItem(object) + } - MenuSeparator + Cura.MenuSeparator + { + visible: customMenuItems.count > 0 + } + + Cura.MenuItem + { + //: Settings context menu action + visible: !findingSettings + text: catalog.i18nc("@action:menu", "Hide this setting") + onTriggered: { - visible: customMenuItems.count > 0 + definitionsModel.hide(contextMenu.key) } - - MenuItem + } + Cura.MenuItem + { + //: Settings context menu action + text: { - //: Settings context menu action - visible: !findingSettings - text: catalog.i18nc("@action:menu", "Hide this setting"); - onTriggered: + if (contextMenu.settingVisible) { - definitionsModel.hide(contextMenu.key) + return catalog.i18nc("@action:menu", "Don't show this setting") + } + else + { + return catalog.i18nc("@action:menu", "Keep this setting visible") } } - MenuItem + visible: findingSettings + onTriggered: { - //: Settings context menu action - text: + if (contextMenu.settingVisible) { - if (contextMenu.settingVisible) - { - return catalog.i18nc("@action:menu", "Don't show this setting"); - } - else - { - return catalog.i18nc("@action:menu", "Keep this setting visible"); - } + definitionsModel.hide(contextMenu.key) } - visible: findingSettings - onTriggered: + else { - if (contextMenu.settingVisible) - { - definitionsModel.hide(contextMenu.key); - } - else - { - definitionsModel.show(contextMenu.key); - } + definitionsModel.show(contextMenu.key) } } - MenuItem - { - //: Settings context menu action - text: catalog.i18nc("@action:menu", "Configure setting visibility..."); - - onTriggered: Cura.Actions.configureSettingVisibility.trigger(contextMenu); - } } - - UM.SettingPropertyProvider + Cura.MenuItem { - id: machineExtruderCount + //: Settings context menu action + text: catalog.i18nc("@action:menu", "Configure setting visibility...") - containerStackId: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id : "" - key: "machine_extruder_count" - watchedProperties: [ "value" ] - storeIndex: 0 + onTriggered: Cura.Actions.configureSettingVisibility.trigger(contextMenu) } } + + UM.SettingPropertyProvider + { + id: machineExtruderCount + + containerStackId: Cura.MachineManager.activeMachine !== null ? Cura.MachineManager.activeMachine.id : "" + key: "machine_extruder_count" + watchedProperties: [ "value" ] + storeIndex: 0 + } } } diff --git a/resources/qml/SpinBox.qml b/resources/qml/SpinBox.qml new file mode 100644 index 0000000000..5f809a434a --- /dev/null +++ b/resources/qml/SpinBox.qml @@ -0,0 +1,143 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.2 +import QtQuick.Controls 2.15 + +import UM 1.5 as UM +import Cura 1.5 as Cura + +// This component extends the funtionality of QtControls 2.x Spinboxes to +// - be able to contain fractional values +// - hava a "prefix" and a "suffix". A validator is added that recognizes this pre-, suf-fix combo. When adding a custom +// validator the pre-, suf-fix should be added (e.g. new RegExp("^" + prefix + \regex\ + suffix + "$") + +Item +{ + id: base + + property string prefix: "" + property string suffix: "" + property int decimals: 0 + property real stepSize: 1 + property real value: 0 + property real from: 0 + property real to: 99 + + property alias wrap: spinBox.wrap + + property bool editable: true + + property var validator: RegExpValidator + { + regExp: new RegExp("^" + prefix + "([0-9]+[.|,]?[0-9]*)?" + suffix + "$") + } + + signal editingFinished() + implicitWidth: spinBox.implicitWidth + implicitHeight: spinBox.implicitHeight + + SpinBox + { + id: spinBox + anchors.fill: base + editable: base.editable + topPadding: 0 + bottomPadding: 0 + padding: UM.Theme.getSize("narrow_margin").width + + // The stepSize of the SpinBox is intentionally set to be always `1` + // As SpinBoxes can only contain integer values the `base.stepSize` is concidered the precision/resolution + // increasing the spinBox.value by one increases the actual/real value of the component by `base.stepSize` + // as such spinBox.value * base.stepSizes produces the real value of the component + stepSize: 1 + value: Math.floor(base.value / base.stepSize) + from: Math.floor(base.from / base.stepSize) + to: Math.floor(base.to / base.stepSize) + + valueFromText: function(text) + { + return parseFloat(text.substring(prefix.length, text.length - suffix.length).replace(",", ".")) / base.stepSize; + } + + textFromValue: function(value) + { + return prefix + (value * base.stepSize).toFixed(decimals) + suffix; + } + + validator: base.validator + + onValueModified: + { + base.value = value * base.stepSize; + } + + // This forces TextField to commit typed values before incrementing with buttons. + // This fixes the typed value not being incremented when the textField has active focus. + up.onPressedChanged: + { + base.forceActiveFocus() + } + + down.onPressedChanged: + { + base.forceActiveFocus() + } + + background: Item {} + + contentItem: Cura.TextField + { + text: spinBox.textFromValue(spinBox.value, spinBox.locale) + validator: base.validator + + onActiveFocusChanged: + { + if (!activeFocus) + { + base.editingFinished(); + } + } + } + + down.indicator: Rectangle + { + x: spinBox.mirrored ? parent.width - width : 0 + height: parent.height + width: height + + UM.UnderlineBackground { + color: spinBox.down.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") + } + + UM.RecolorImage + { + anchors.centerIn: parent + height: parent.height / 2.5 + width: height + color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + source: UM.Theme.getIcon("Minus") + } + } + + up.indicator: Rectangle + { + x: spinBox.mirrored ? 0 : parent.width - width + height: parent.height + width: height + + UM.UnderlineBackground { + color: spinBox.up.pressed ? spinBox.palette.mid : UM.Theme.getColor("detail_background") + } + + UM.RecolorImage + { + anchors.centerIn: parent + height: parent.height / 2.5 + width: height + color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_disabled") + source: UM.Theme.getIcon("Plus") + } + } + } +} diff --git a/resources/qml/TableView.qml b/resources/qml/TableView.qml index 1b084be5a0..5e0b863f5a 100644 --- a/resources/qml/TableView.qml +++ b/resources/qml/TableView.qml @@ -1,68 +1,235 @@ -// Copyright (C) 2021 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. +//Copyright (C) 2022 Ultimaker B.V. +//Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.10 -import QtQuick.Controls 1.4 as OldControls // TableView doesn't exist in the QtQuick Controls 2.x in 5.10, so use the old one -import QtQuick.Controls 2.3 -import QtQuick.Controls.Styles 1.4 +import Qt.labs.qmlmodels 1.0 +import QtQuick 2.15 +import QtQuick.Controls 2.15 -import UM 1.2 as UM +import UM 1.5 as UM - -OldControls.TableView +/* + * A re-sizeable table of data. + * + * This table combines a list of headers with a TableView to show certain roles in a table. + * The columns of the table can be resized. + * When the table becomes too big, you can scroll through the table. When a column becomes too small, the contents of + * the table are elided. + * The table gets Cura's themeing. + */ +Item { - itemDelegate: Item - { - height: tableCellLabel.implicitHeight + id: tableBase + + required property var columnHeaders //The text to show in the headers of each column. + property alias model: tableView.model //A TableModel to display in this table. To use a ListModel for the rows, use "rows: listModel.items" + property int currentRow: -1 //The selected row index. + property var onDoubleClicked: function(row) {} //Something to execute when double clicked. Accepts one argument: The index of the row that was clicked on. + property bool allowSelection: true //Whether to allow the user to select items. + property string sectionRole: "" - Label + property alias flickableDirection: tableView.flickableDirection + Row + { + id: headerBar + Repeater { - id: tableCellLabel - color: styleData.selected ? UM.Theme.getColor("primary_button_text") : UM.Theme.getColor("text") - elide: Text.ElideRight - text: styleData.value - anchors.fill: parent - anchors.leftMargin: 10 * screenScaleFactor - verticalAlignment: Text.AlignVCenter + id: headerRepeater + model: columnHeaders + Rectangle + { + width: Math.max(1, Math.round(tableBase.width / headerRepeater.count)) + height: UM.Theme.getSize("section").height + + color: UM.Theme.getColor("main_background") + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("thick_lining") + + UM.Label + { + id: contentText + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("narrow_margin").width + wrapMode: Text.NoWrap + text: modelData + font: UM.Theme.getFont("medium_bold") + elide: Text.ElideRight + } + Item //Resize handle. + { + anchors + { + right: parent.right + top: parent.top + bottom: parent.bottom + } + width: UM.Theme.getSize("default_lining").width + + MouseArea + { + anchors.fill: parent + + cursorShape: Qt.SizeHorCursor + drag + { + target: parent + axis: Drag.XAxis + } + onMouseXChanged: + { + if(drag.active) + { + let new_width = parent.parent.width + mouseX; + let sum_widths = mouseX; + for(let i = 0; i < headerBar.children.length; ++i) + { + sum_widths += headerBar.children[i].width; + } + if(sum_widths > tableBase.width) + { + new_width -= sum_widths - tableBase.width; //Limit the total width to not exceed the view. + } + let width_fraction = new_width / tableBase.width; //Scale with the same fraction along with the total width, if the table is resized. + parent.parent.width = Qt.binding(function() { return Math.max(10, Math.round(tableBase.width * width_fraction)) }); + } + } + } + } + + onWidthChanged: tableView.forceLayout(); //Rescale table cells underneath as well. + } } } - - rowDelegate: Rectangle + Rectangle { - color: styleData.selected ? UM.Theme.getColor("primary_button") : UM.Theme.getColor("main_background") - height: UM.Theme.getSize("table_row").height + color: UM.Theme.getColor("main_background") + anchors + { + top: headerBar.bottom + topMargin: -UM.Theme.getSize("default_lining").width + left: parent.left + right: parent.right + bottom: parent.bottom + } + border.width: UM.Theme.getSize("default_lining").width + border.color: UM.Theme.getColor("thick_lining") } - // Use the old styling technique since it's the only way to make the scrollbars themed in the TableView - style: TableViewStyle + TableView { - backgroundColor: UM.Theme.getColor("main_background") + id: tableView + anchors + { + top: headerBar.bottom + left: parent.left + right: parent.right + bottom: parent.bottom + margins: UM.Theme.getSize("default_lining").width + } - handle: Rectangle + flickableDirection: Flickable.AutoFlickIfNeeded + contentWidth: -1 // AUto calculate the contendWidth + clip: true + ScrollBar.vertical: UM.ScrollBar {} + columnWidthProvider: function(column) { - // Both implicit width and height have to be set, since the handle is used by both the horizontal and the vertical scrollbars - implicitWidth: UM.Theme.getSize("scrollbar").width - implicitHeight: UM.Theme.getSize("scrollbar").width - radius: width / 2 - color: UM.Theme.getColor(styleData.pressed ? "scrollbar_handle_down" : (styleData.hovered ? "scrollbar_handle_hover" : "scrollbar_handle")) + return headerBar.children[column].width; //Cells get the same width as their column header. } - scrollBarBackground: Rectangle + delegate: Rectangle { - // Both implicit width and height have to be set, since the handle is used by both the horizontal and the vertical scrollbars - implicitWidth: UM.Theme.getSize("scrollbar").width - implicitHeight: UM.Theme.getSize("scrollbar").width - color: UM.Theme.getColor("main_background") + implicitHeight: Math.max(1, cellContent.height) + + color: UM.Theme.getColor((tableBase.currentRow == row) ? "text_selection" : "main_background") + + UM.Label + { + id: cellContent + anchors + { + left: parent.left + leftMargin: UM.Theme.getSize("default_margin").width + right: parent.right + } + wrapMode: Text.NoWrap + text: display + verticalAlignment: Text.AlignVCenter + elide: Text.ElideRight + } + TextMetrics + { + id: cellTextMetrics + text: cellContent.text + font: cellContent.font + elide: cellContent.elide + elideWidth: cellContent.width + } + UM.TooltipArea + { + anchors.fill: parent + + acceptedButtons: Qt.LeftButton + text: (cellTextMetrics.elidedText == cellContent.text) ? "" : cellContent.text //Show full text in tooltip if it was elided. + onClicked: + { + if(tableBase.allowSelection) + { + tableBase.currentRow = row; //Select this row. + } + } + onDoubleClicked: + { + tableBase.onDoubleClicked(row); + } + } } - // The little rectangle between the vertical and horizontal scrollbars - corner: Rectangle + Connections { - color: UM.Theme.getColor("main_background") + target: model + function onRowCountChanged() + { + tableView.contentY = 0; //When the number of rows is reduced, make sure to scroll back to the start. + } } + } - // Override the control arrows - incrementControl: Item { } - decrementControl: Item { } + Connections + { + target: model + function onRowsChanged() + { + let first_column = model.columns[0].display; + if(model.rows.length > 0 && model.rows[0][first_column].startsWith("<b>")) //First item is already a section header. + { + return; //Assume we already added section headers. Prevent infinite recursion. + } + if(sectionRole === "" || model.rows.length == 0) //No section headers, or no items at all. + { + tableView.model.rows = model.rows; + return; + } + + //Insert section headers in the rows. + let last_section = ""; + let new_rows = []; + for(let i = 0; i < model.rows.length; ++i) + { + let item_section = model.rows[i][sectionRole]; + if(item_section !== last_section) //Starting a new section. + { + let section_header = {}; + for(let key in model.rows[i]) + { + section_header[key] = (key === first_column) ? "<b>" + item_section + "</b>" : ""; //Put the section header in the first column. + } + new_rows.push(section_header); //Add a row representing a section header. + last_section = item_section; + } + new_rows.push(model.rows[i]); + } + tableView.model.rows = new_rows; + } } }
\ No newline at end of file diff --git a/resources/qml/ToolTip.qml b/resources/qml/ToolTip.qml index c4edc5a361..e69de29bb2 100644 --- a/resources/qml/ToolTip.qml +++ b/resources/qml/ToolTip.qml @@ -1,83 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.7 -import QtQuick.Controls 2.3 - -import UM 1.0 as UM -import Cura 1.0 as Cura - -ToolTip -{ - enum ContentAlignment - { - AlignLeft, - AlignRight - } - - // Defines the alignment of the content, by default to the left - property int contentAlignment: Cura.ToolTip.ContentAlignment.AlignRight - - property alias tooltipText: tooltip.text - property alias arrowSize: backgroundRect.arrowSize - property var targetPoint: Qt.point(parent.x, y + Math.round(height/2)) - - id: tooltip - text: "" - delay: 500 - font: UM.Theme.getFont("default") - visible: opacity != 0.0 - opacity: 0.0 // initially hidden - - Behavior on opacity - { - NumberAnimation { duration: 100; } - } - - onAboutToShow: show() - onAboutToHide: hide() - - // If the text is not set, just set the height to 0 to prevent it from showing - height: label.contentHeight + 2 * UM.Theme.getSize("thin_margin").width - - x: - { - if (contentAlignment == Cura.ToolTip.ContentAlignment.AlignLeft) - { - return (label.width + Math.round(UM.Theme.getSize("default_arrow").width * 1.2) + padding * 2) * -1 - } - return parent.width + Math.round(UM.Theme.getSize("default_arrow").width * 1.2 + padding) - } - - y: Math.round(parent.height / 2 - label.height / 2 ) - padding - - padding: UM.Theme.getSize("thin_margin").width - - background: UM.PointingRectangle - { - id: backgroundRect - color: UM.Theme.getColor("tooltip") - target: Qt.point(targetPoint.x - tooltip.x, targetPoint.y - tooltip.y) - arrowSize: UM.Theme.getSize("default_arrow").width - visible: tooltip.height != 0 - } - - contentItem: Label - { - id: label - text: tooltip.text - font: tooltip.font - wrapMode: Text.Wrap - textFormat: Text.RichText - color: UM.Theme.getColor("tooltip_text") - renderType: Text.NativeRendering - } - - function show() { - opacity = text != "" ? 1 : 0 - } - - function hide() { - opacity = 0 - } -}
\ No newline at end of file diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index 66163fed37..32de5b76ca 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -4,7 +4,7 @@ import QtQuick 2.2 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Item @@ -53,9 +53,9 @@ Item width: childrenRect.width height: childrenRect.height - delegate: ToolbarButton + delegate: UM.ToolbarButton { - text: model.name + (model.shortcut ? (" (" + model.shortcut + ")") : "") + text: model.name + (model.shortcut ? ` ("${model.shortcut}")` : "") checkable: true checked: model.active enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled diff --git a/resources/qml/ToolbarButton.qml b/resources/qml/ToolbarButton.qml deleted file mode 100644 index 206ab23dc4..0000000000 --- a/resources/qml/ToolbarButton.qml +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2018 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.7 -import QtQuick.Controls 2.3 - -import UM 1.2 as UM -import Cura 1.0 as Cura - -Button -{ - id: base - - property alias toolItem: contentItemLoader.sourceComponent - - // These two properties indicate whether the toolbar button is at the top of the toolbar column or at the bottom. - // If it is somewhere in the middle, then both has to be false. If there is only one element in the column, then - // both properties have to be set to true. This is used to create a rounded corner. - property bool isTopElement: false - property bool isBottomElement: false - - hoverEnabled: true - - background: Rectangle - { - implicitWidth: UM.Theme.getSize("button").width - implicitHeight: UM.Theme.getSize("button").height - color: UM.Theme.getColor("toolbar_background") - radius: UM.Theme.getSize("default_radius").width - - Rectangle - { - id: topSquare - anchors - { - left: parent.left - right: parent.right - top: parent.top - } - height: parent.radius - color: parent.color - visible: !base.isTopElement - } - - Rectangle - { - id: bottomSquare - anchors - { - left: parent.left - right: parent.right - bottom: parent.bottom - } - height: parent.radius - color: parent.color - visible: !base.isBottomElement - } - - Rectangle - { - id: leftSquare - anchors - { - left: parent.left - top: parent.top - bottom: parent.bottom - } - width: parent.radius - color: parent.color - } - } - contentItem: Rectangle - { - opacity: parent.enabled ? 1.0 : 0.2 - implicitWidth: Math.round(UM.Theme.getSize("button").width * 0.75) - implicitHeight: Math.round(UM.Theme.getSize("button").height * 0.75) - radius: Math.round(width * 0.5) - - color: - { - if (base.checked && base.hovered) - { - return UM.Theme.getColor("toolbar_button_active_hover") - } - else if (base.checked) - { - return UM.Theme.getColor("toolbar_button_active") - } - else if(base.hovered) - { - return UM.Theme.getColor("toolbar_button_hover") - } - return UM.Theme.getColor("toolbar_background") - } - Loader - { - id: contentItemLoader - anchors.centerIn: parent - width: Math.round(UM.Theme.getSize("button").width / 2) - height: Math.round(UM.Theme.getSize("button").height / 2) - } - } - - Cura.ToolTip - { - id: tooltip - tooltipText: base.text - visible: base.hovered - } -} diff --git a/resources/qml/ViewOrientationControls.qml b/resources/qml/ViewOrientationControls.qml index fc0f20fa77..ad3d184028 100644 --- a/resources/qml/ViewOrientationControls.qml +++ b/resources/qml/ViewOrientationControls.qml @@ -2,8 +2,6 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 import UM 1.4 as UM import Cura 1.1 as Cura diff --git a/resources/qml/ViewsSelector.qml b/resources/qml/ViewsSelector.qml index af98469921..452cc5a09a 100644 --- a/resources/qml/ViewsSelector.qml +++ b/resources/qml/ViewsSelector.qml @@ -4,7 +4,7 @@ import QtQuick 2.7 import QtQuick.Controls 2.3 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura Cura.ExpandablePopup @@ -44,22 +44,19 @@ Cura.ExpandablePopup headerItem: Item { - Label + UM.Label { id: title text: catalog.i18nc("@label", "View type") - verticalAlignment: Text.AlignVCenter height: parent.height elide: Text.ElideRight font: UM.Theme.getFont("medium") color: UM.Theme.getColor("text_medium") - renderType: Text.NativeRendering } - Label + UM.Label { text: viewSelector.activeView ? viewSelector.activeView.name : "" - verticalAlignment: Text.AlignVCenter anchors { left: title.right @@ -69,8 +66,6 @@ Cura.ExpandablePopup height: parent.height elide: Text.ElideRight font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering } } @@ -102,14 +97,11 @@ Cura.ExpandablePopup checkable: true checked: viewSelector.activeView != null ? viewSelector.activeView.id == id : false - contentItem: Label + contentItem: UM.Label { id: buttonText text: viewsSelectorButton.text - color: UM.Theme.getColor("text") font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter elide: Text.ElideRight } diff --git a/resources/qml/WelcomePages/AddCloudPrintersView.qml b/resources/qml/WelcomePages/AddCloudPrintersView.qml index e33d519f22..0b94d21fae 100644 --- a/resources/qml/WelcomePages/AddCloudPrintersView.qml +++ b/resources/qml/WelcomePages/AddCloudPrintersView.qml @@ -1,11 +1,11 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 import QtQuick.Layouts 1.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.7 as Cura @@ -22,7 +22,7 @@ Item property bool searchingForCloudPrinters: true property var discoveredCloudPrintersModel: CuraApplication.getDiscoveredCloudPrintersModel() - // The area where either the discoveredCloudPrintersScrollView or the busyIndicator will be displayed + // The area where either the discoveredCloudPrintersList or the busyIndicator will be displayed Item { id: cloudPrintersContent @@ -126,14 +126,9 @@ Item // The scrollView that contains the list of newly discovered Ultimaker Cloud printers. Visible only when // there is at least a new cloud printer. - ScrollView + ListView { - id: discoveredCloudPrintersScrollView - width: parent.width - clip : true - ScrollBar.horizontal.policy: ScrollBar.AsNeeded - ScrollBar.vertical.policy: ScrollBar.AsNeeded - visible: discoveredCloudPrintersModel.count > 0 + id: discoveredCloudPrintersList anchors { top: cloudPrintersAddedTitle.bottom @@ -144,52 +139,47 @@ Item bottom: parent.bottom } - Column + ScrollBar.vertical: UM.ScrollBar {} + clip : true + visible: discoveredCloudPrintersModel.count > 0 + spacing: UM.Theme.getSize("wide_margin").height + + model: discoveredCloudPrintersModel + delegate: Item { - id: discoveredPrintersColumn - spacing: 2 * UM.Theme.getSize("default_margin").height + width: discoveredCloudPrintersList.width + height: contentColumn.height - Repeater + Column { - id: discoveredCloudPrintersRepeater - model: discoveredCloudPrintersModel - delegate: Item + id: contentColumn + Label + { + id: cloudPrinterNameLabel + leftPadding: UM.Theme.getSize("default_margin").width + text: model.name ? model.name : "" + font: UM.Theme.getFont("large_bold") + color: UM.Theme.getColor("text") + elide: Text.ElideRight + } + Label + { + id: cloudPrinterTypeLabel + leftPadding: 2 * UM.Theme.getSize("default_margin").width + topPadding: UM.Theme.getSize("thin_margin").height + text: {"Type: " + model.machine_type} + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + elide: Text.ElideRight + } + Label { - width: discoveredCloudPrintersScrollView.width - height: contentColumn.height - - Column - { - id: contentColumn - Label - { - id: cloudPrinterNameLabel - leftPadding: UM.Theme.getSize("default_margin").width - text: model.name - font: UM.Theme.getFont("large_bold") - color: UM.Theme.getColor("text") - elide: Text.ElideRight - } - Label - { - id: cloudPrinterTypeLabel - leftPadding: 2 * UM.Theme.getSize("default_margin").width - topPadding: UM.Theme.getSize("thin_margin").height - text: {"Type: " + model.machine_type} - font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - elide: Text.ElideRight - } - Label - { - id: cloudPrinterFirmwareVersionLabel - leftPadding: 2 * UM.Theme.getSize("default_margin").width - text: {"Firmware version: " + model.firmware_version} - font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - elide: Text.ElideRight - } - } + id: cloudPrinterFirmwareVersionLabel + leftPadding: 2 * UM.Theme.getSize("default_margin").width + text: {"Firmware version: " + model.firmware_version} + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + elide: Text.ElideRight } } } diff --git a/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml b/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml index 912688e2dc..d2d48267de 100644 --- a/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml +++ b/resources/qml/WelcomePages/AddLocalPrinterScrollView.qml @@ -1,10 +1,10 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -74,121 +74,93 @@ Item Row { id: localPrinterSelectionItem - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top + anchors.fill: parent - // ScrollView + ListView for selecting a local printer to add - Cura.ScrollView + //Selecting a local printer to add from this list. + ListView { - id: scrollView - - height: childrenHeight + id: machineList width: Math.floor(parent.width * 0.48) + height: parent.height - ListView - { - id: machineList - - // CURA-6793 - // Enabling the buffer seems to cause the blank items issue. When buffer is enabled, if the ListView's - // individual item has a dynamic change on its visibility, the ListView doesn't redraw itself. - // The default value of cacheBuffer is platform-dependent, so we explicitly disable it here. - cacheBuffer: 0 - boundsBehavior: Flickable.StopAtBounds - flickDeceleration: 20000 // To prevent the flicking behavior. - model: UM.DefinitionContainersModel - { - id: machineDefinitionsModel - filter: { "visible": true } - sectionProperty: "manufacturer" - preferredSections: preferredCategories - } + clip: true + ScrollBar.vertical: UM.ScrollBar {} - section.property: "section" - section.delegate: sectionHeader - delegate: machineButton + model: UM.DefinitionContainersModel + { + id: machineDefinitionsModel + filter: { "visible": true } + sectionProperty: "manufacturer" + preferredSections: preferredCategories } - Component + section.property: "section" + section.delegate: Button { - id: sectionHeader + id: button + width: machineList.width + height: UM.Theme.getSize("action_button").height + text: section + + property bool isActive: base.currentSection == section - Button + background: Rectangle { - id: button - width: ListView.view.width - height: UM.Theme.getSize("action_button").height - text: section + anchors.fill: parent + color: isActive ? UM.Theme.getColor("setting_control_highlight") : "transparent" + } - property bool isActive: base.currentSection == section + contentItem: Item + { + width: childrenRect.width + height: UM.Theme.getSize("action_button").height - background: Rectangle + UM.RecolorImage { - anchors.fill: parent - color: isActive ? UM.Theme.getColor("setting_control_highlight") : "transparent" + id: arrow + anchors.left: parent.left + width: UM.Theme.getSize("standard_arrow").width + height: UM.Theme.getSize("standard_arrow").height + sourceSize.width: width + sourceSize.height: height + color: UM.Theme.getColor("text") + source: base.currentSection == section ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight") } - contentItem: Item + UM.Label { - width: childrenRect.width - height: UM.Theme.getSize("action_button").height - - UM.RecolorImage - { - id: arrow - anchors.left: parent.left - width: UM.Theme.getSize("standard_arrow").width - height: UM.Theme.getSize("standard_arrow").height - sourceSize.width: width - sourceSize.height: height - color: UM.Theme.getColor("text") - source: base.currentSection == section ? UM.Theme.getIcon("ChevronSingleDown") : UM.Theme.getIcon("ChevronSingleRight") - } - - Label - { - id: label - anchors.left: arrow.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width - verticalAlignment: Text.AlignVCenter - text: button.text - font: UM.Theme.getFont("default_bold") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering - } + id: label + anchors.left: arrow.right + anchors.leftMargin: UM.Theme.getSize("default_margin").width + text: button.text + font: UM.Theme.getFont("default_bold") } + } - onClicked: - { - base.currentSection = section - base.updateCurrentItemUponSectionChange() - } + onClicked: + { + base.currentSection = section + base.updateCurrentItemUponSectionChange() } } - Component + delegate: Cura.RadioButton { - id: machineButton - - Cura.RadioButton + id: radioButton + anchors { - id: radioButton - anchors - { - left: parent !== null ? parent.left: undefined - leftMargin: UM.Theme.getSize("standard_list_lineheight").width + left: parent !== null ? parent.left : undefined + leftMargin: UM.Theme.getSize("standard_list_lineheight").width - right: parent !== null ? parent.right: undefined - rightMargin: UM.Theme.getSize("default_margin").width - } - height: visible ? UM.Theme.getSize("standard_list_lineheight").height : 0 - - checked: ListView.view.currentIndex == index - text: name - visible: base.currentSection.toLowerCase() === section.toLowerCase() - onClicked: ListView.view.currentIndex = index + right: parent !== null ? parent.right : undefined + rightMargin: UM.Theme.getSize("default_margin").width } + height: visible ? UM.Theme.getSize("standard_list_lineheight").height : 0 //This causes the scrollbar to vary in length due to QTBUG-76830. + + checked: machineList.currentIndex == index + text: name + visible: base.currentSection.toLowerCase() === section.toLowerCase() + onClicked: machineList.currentIndex = index } } @@ -197,7 +169,7 @@ Item { id: verticalLine anchors.top: parent.top - height: childrenHeight - UM.Theme.getSize("default_lining").height + height: parent.height - UM.Theme.getSize("default_lining").height width: UM.Theme.getSize("default_lining").height color: UM.Theme.getColor("lining") } @@ -210,7 +182,7 @@ Item spacing: UM.Theme.getSize("default_margin").width padding: UM.Theme.getSize("default_margin").width - Label + UM.Label { width: parent.width - (2 * UM.Theme.getSize("default_margin").width) wrapMode: Text.Wrap @@ -228,48 +200,33 @@ Item verticalItemAlignment: Grid.AlignVCenter - Label + UM.Label { id: manufacturerLabel text: catalog.i18nc("@label", "Manufacturer") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering } - Label + UM.Label { text: base.getMachineMetaDataEntry("manufacturer") width: parent.width - manufacturerLabel.width - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering wrapMode: Text.WordWrap } - Label + UM.Label { id: profileAuthorLabel text: catalog.i18nc("@label", "Profile author") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering } - Label + UM.Label { text: base.getMachineMetaDataEntry("author") width: parent.width - profileAuthorLabel.width - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering wrapMode: Text.WordWrap } - Label + UM.Label { id: printerNameLabel text: catalog.i18nc("@label", "Printer name") - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering } Cura.TextField @@ -286,7 +243,5 @@ Item } } } - - } } diff --git a/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml b/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml index edf6fe5974..dbf68ce701 100644 --- a/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml +++ b/resources/qml/WelcomePages/AddNetworkOrLocalPrinterContent.qml @@ -1,4 +1,4 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 @@ -45,11 +45,9 @@ Item } contentComponent: networkPrinterListComponent - Component { id: networkPrinterListComponent - AddNetworkPrinterScrollView { id: networkPrinterScrollView @@ -95,20 +93,13 @@ Item } contentComponent: localPrinterListComponent - Component { id: localPrinterListComponent - AddLocalPrinterScrollView { id: localPrinterView - property int childrenHeight: backButton.y - addLocalPrinterDropDown.y - UM.Theme.getSize("expandable_component_content_header").height - UM.Theme.getSize("default_margin").height - - onChildrenHeightChanged: - { - addLocalPrinterDropDown.children[1].height = childrenHeight - } + height: backButton.y - addLocalPrinterDropDown.y - UM.Theme.getSize("expandable_component_content_header").height - UM.Theme.getSize("default_margin").height } } } diff --git a/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml b/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml index 1209071320..64f194dd56 100644 --- a/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml +++ b/resources/qml/WelcomePages/AddNetworkPrinterScrollView.qml @@ -1,10 +1,10 @@ -// 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.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura // @@ -17,7 +17,7 @@ Item id: base height: networkPrinterInfo.height + controlsRectangle.height - property alias maxItemCountAtOnce: networkPrinterScrollView.maxItemCountAtOnce + property alias maxItemCountAtOnce: networkPrinterListView.maxItemCountAtOnce property var currentItem: (networkPrinterListView.currentIndex >= 0) ? networkPrinterListView.model[networkPrinterListView.currentIndex] : null @@ -29,125 +29,105 @@ Item Item { id: networkPrinterInfo - height: networkPrinterScrollView.visible ? networkPrinterScrollView.height : noPrinterLabel.height + height: networkPrinterListView.visible ? networkPrinterListView.height : noPrinterLabel.height anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top - Label + UM.Label { id: noPrinterLabel height: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("default_margin").height anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width text: catalog.i18nc("@label", "There is no printer found over your network.") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering - verticalAlignment: Text.AlignVCenter visible: networkPrinterListView.count == 0 // Do not show if there are discovered devices. } - ScrollView + ListView { - id: networkPrinterScrollView + id: networkPrinterListView anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right - - ScrollBar.horizontal.policy: ScrollBar.AsNeeded - ScrollBar.vertical.policy: ScrollBar.AsNeeded - - property int maxItemCountAtOnce: 8 // show at max 8 items at once, otherwise you need to scroll. height: Math.min(contentHeight, (maxItemCountAtOnce * UM.Theme.getSize("action_button").height) - UM.Theme.getSize("default_margin").height) + ScrollBar.vertical: UM.ScrollBar + { + id: networkPrinterScrollBar + } + clip: true + property int maxItemCountAtOnce: 8 // show at max 8 items at once, otherwise you need to scroll. visible: networkPrinterListView.count > 0 - clip: true + model: contentLoader.enabled ? CuraApplication.getDiscoveredPrintersModel().discoveredPrinters: undefined + cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item. - ListView + section.property: "modelData.sectionName" + section.criteria: ViewSection.FullString + section.delegate: UM.Label { - id: networkPrinterListView - anchors.fill: parent - model: contentLoader.enabled ? CuraApplication.getDiscoveredPrintersModel().discoveredPrinters: undefined - - section.property: "modelData.sectionName" - section.criteria: ViewSection.FullString - section.delegate: sectionHeading - boundsBehavior: Flickable.StopAtBounds - flickDeceleration: 20000 // To prevent the flicking behavior. - cacheBuffer: 1000000 // Set a large cache to effectively just cache every list item. - - Component.onCompleted: - { - var toSelectIndex = -1 - // Select the first one that's not "unknown" and is the host a group by default. - for (var i = 0; i < count; i++) - { - if (!model[i].isUnknownMachineType && model[i].isHostOfGroup) - { - toSelectIndex = i - break - } - } - currentIndex = toSelectIndex - } + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + width: parent.width - networkPrinterScrollBar.width - UM.Theme.getSize("default_margin").width + height: UM.Theme.getSize("setting_control").height + text: section + color: UM.Theme.getColor("small_button_text") + } - // CURA-6483 For some reason currentIndex can be reset to 0. This check is here to prevent automatically - // selecting an unknown or non-host printer. - onCurrentIndexChanged: + Component.onCompleted: + { + var toSelectIndex = -1 + // Select the first one that's not "unknown" and is the host a group by default. + for (var i = 0; i < count; i++) { - var item = model[currentIndex] - if (!item || item.isUnknownMachineType || !item.isHostOfGroup) + if (!model[i].isUnknownMachineType && model[i].isHostOfGroup) { - currentIndex = -1 + toSelectIndex = i + break } } + currentIndex = toSelectIndex + } - Component + // CURA-6483 For some reason currentIndex can be reset to 0. This check is here to prevent automatically + // selecting an unknown or non-host printer. + onCurrentIndexChanged: + { + var item = model[currentIndex] + if (!item || item.isUnknownMachineType || !item.isHostOfGroup) { - id: sectionHeading - - Label - { - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_margin").width - height: UM.Theme.getSize("setting_control").height - text: section - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("small_button_text") - verticalAlignment: Text.AlignVCenter - renderType: Text.NativeRendering - } + currentIndex = -1 } + } - delegate: Cura.MachineSelectorButton - { - text: modelData.device.name + delegate: Cura.MachineSelectorButton + { + text: modelData.device.name - width: networkPrinterListView.width - outputDevice: modelData.device + width: networkPrinterListView.width - networkPrinterScrollBar.width + outputDevice: modelData.device - enabled: !modelData.isUnknownMachineType && modelData.isHostOfGroup + enabled: !modelData.isUnknownMachineType && modelData.isHostOfGroup - printerTypeLabelAutoFit: true + printerTypeLabelAutoFit: true - // update printer types for all items in the list - updatePrinterTypesOnlyWhenChecked: false - updatePrinterTypesFunction: updateMachineTypes - // show printer type as it is - printerTypeLabelConversionFunction: function(value) { return value } + // update printer types for all items in the list + updatePrinterTypesOnlyWhenChecked: false + updatePrinterTypesFunction: updateMachineTypes + // show printer type as it is + printerTypeLabelConversionFunction: function(value) { return value } - function updateMachineTypes() - { - printerTypesList = [ modelData.readableMachineType ] - } + function updateMachineTypes() + { + printerTypesList = [ modelData.readableMachineType ] + } - checkable: false - selected: ListView.view.currentIndex == model.index - onClicked: - { - ListView.view.currentIndex = index - } + checkable: false + selected: networkPrinterListView.currentIndex == model.index + onClicked: + { + networkPrinterListView.currentIndex = index } } } @@ -233,7 +213,7 @@ Item source: UM.Theme.getIcon("LinkExternal") } - Label + UM.Label { id: troubleshootingLabel anchors.right: parent.right @@ -241,8 +221,6 @@ Item text: catalog.i18nc("@label", "Troubleshooting") font: UM.Theme.getFont("default") color: UM.Theme.getColor("text_link") - linkColor: UM.Theme.getColor("text_link") - renderType: Text.NativeRendering } MouseArea diff --git a/resources/qml/WelcomePages/ChangelogContent.qml b/resources/qml/WelcomePages/ChangelogContent.qml index d106f94c04..7c3b1adfc3 100644 --- a/resources/qml/WelcomePages/ChangelogContent.qml +++ b/resources/qml/WelcomePages/ChangelogContent.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -15,7 +15,7 @@ Item { UM.I18nCatalog { id: catalog; name: "cura" } - Label + UM.Label { id: titleLabel anchors.top: parent.top @@ -24,7 +24,6 @@ Item text: catalog.i18nc("@label", "Release Notes") color: UM.Theme.getColor("primary_button") font: UM.Theme.getFont("huge") - renderType: Text.NativeRendering } Cura.ScrollableTextArea @@ -38,8 +37,6 @@ Item anchors.left: parent.left anchors.right: parent.right - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - textArea.text: CuraApplication.getTextManager().getChangeLogText() textArea.textFormat: Text.RichText textArea.wrapMode: Text.WordWrap diff --git a/resources/qml/WelcomePages/DropDownHeader.qml b/resources/qml/WelcomePages/DropDownHeader.qml index cb41ca808b..a4b416b093 100644 --- a/resources/qml/WelcomePages/DropDownHeader.qml +++ b/resources/qml/WelcomePages/DropDownHeader.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura import ".." @@ -46,16 +46,14 @@ Cura.RoundedRectangle onClicked: base.clicked() } - Label + UM.Label { id: title anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.verticalCenter: parent.verticalCenter - verticalAlignment: Text.AlignVCenter text: base.title font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering color: base.hovered ? UM.Theme.getColor("small_button_text_hover") : UM.Theme.getColor("small_button_text") } diff --git a/resources/qml/WelcomePages/DropDownWidget.qml b/resources/qml/WelcomePages/DropDownWidget.qml index dde1be752b..90e1900d35 100644 --- a/resources/qml/WelcomePages/DropDownWidget.qml +++ b/resources/qml/WelcomePages/DropDownWidget.qml @@ -1,10 +1,10 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -61,7 +61,7 @@ Item anchors.left: header.left anchors.right: header.right // Add 2x lining, because it needs a bit of space on the top and the bottom. - height: contentLoader.item.height + 2 * UM.Theme.getSize("thick_lining").height + height: contentLoader.item ? contentLoader.item.height + 2 * UM.Theme.getSize("thick_lining").height : 0 border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("lining") @@ -88,14 +88,12 @@ Item { id: emptyComponent - Label + UM.Label { text: catalog.i18nc("@label", "Empty") height: UM.Theme.getSize("action_button").height horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter font: UM.Theme.getFont("medium") - renderType: Text.NativeRendering } } } diff --git a/resources/qml/WelcomePages/UserAgreementContent.qml b/resources/qml/WelcomePages/UserAgreementContent.qml index 764ef03e18..dcff613efb 100644 --- a/resources/qml/WelcomePages/UserAgreementContent.qml +++ b/resources/qml/WelcomePages/UserAgreementContent.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura // @@ -14,7 +14,7 @@ Item { UM.I18nCatalog { id: catalog; name: "cura" } - Label + UM.Label { id: titleLabel anchors.top: parent.top @@ -23,10 +23,9 @@ Item text: catalog.i18nc("@label", "User Agreement") color: UM.Theme.getColor("primary_button") font: UM.Theme.getFont("huge") - renderType: Text.NativeRendering } - Label + UM.Label { id: disclaimerLineLabel anchors @@ -44,8 +43,6 @@ Item textFormat: Text.RichText wrapMode: Text.WordWrap font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering } Cura.PrimaryButton diff --git a/resources/qml/WelcomePages/WhatsNewContent.qml b/resources/qml/WelcomePages/WhatsNewContent.qml index 179fc372c9..c56f8880ed 100644 --- a/resources/qml/WelcomePages/WhatsNewContent.qml +++ b/resources/qml/WelcomePages/WhatsNewContent.qml @@ -113,8 +113,6 @@ Item right: subpageImage.right } - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - back_color: UM.Theme.getColor("viewport_overlay") do_borders: false diff --git a/resources/qml/Widgets/ComboBox.qml b/resources/qml/Widgets/ComboBox.qml index 36288f0f4f..698eb4ec10 100644 --- a/resources/qml/Widgets/ComboBox.qml +++ b/resources/qml/Widgets/ComboBox.qml @@ -1,10 +1,10 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -26,29 +26,18 @@ ComboBox { name: "disabled" when: !control.enabled - PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_disabled_border")} - PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_disabled")} + PropertyChanges { target: background; color: UM.Theme.getColor("setting_control_disabled")} PropertyChanges { target: contentLabel; color: UM.Theme.getColor("setting_control_disabled_text")} }, State { name: "highlighted" when: control.hovered || control.activeFocus - PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_border_highlight") } - PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_highlight")} + PropertyChanges { target: background; liningColor: UM.Theme.getColor("border_main")} } ] - background: Rectangle - { - id: backgroundRectangle - color: UM.Theme.getColor("setting_control") - - radius: UM.Theme.getSize("setting_control_radius").width - border.width: UM.Theme.getSize("default_lining").width - border.color: UM.Theme.getColor("setting_control_border") - - } + background: UM.UnderlineBackground{} indicator: UM.RecolorImage { @@ -65,14 +54,12 @@ ComboBox color: UM.Theme.getColor("setting_control_button") } - contentItem: Label + contentItem: UM.Label { id: contentLabel - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width - anchors.verticalCenter: parent.verticalCenter + leftPadding: UM.Theme.getSize("setting_unit_margin").width + UM.Theme.getSize("default_margin").width anchors.right: downArrow.left - + wrapMode: Text.NoWrap text: { if (control.delegateModel.count == 0) @@ -86,11 +73,8 @@ ComboBox } textFormat: Text.PlainText - renderType: Text.NativeRendering - font: UM.Theme.getFont("default") color: control.currentIndex == -1 ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text") elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter } popup: Popup @@ -103,12 +87,12 @@ ComboBox contentItem: ListView { - clip: true implicitHeight: contentHeight + + ScrollBar.vertical: UM.ScrollBar {} + clip: true model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex - - ScrollIndicator.vertical: ScrollIndicator { } } background: Rectangle @@ -140,7 +124,7 @@ ComboBox return (typeof _val !== 'undefined') ? _val : "" } - contentItem: Label + contentItem: UM.Label { id: delegateLabel // FIXME: Somehow the top/bottom anchoring is not correct on Linux and it results in invisible texts. @@ -150,11 +134,9 @@ ComboBox text: delegateItem.text textFormat: Text.PlainText - renderType: Text.NativeRendering color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter + wrapMode: Text.NoWrap } background: UM.TooltipArea @@ -162,7 +144,6 @@ ComboBox Rectangle { color: delegateItem.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent" - border.color: delegateItem.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent" anchors.fill: parent } text: delegateLabel.truncated ? delegateItem.text : "" diff --git a/resources/qml/Widgets/Menu.qml b/resources/qml/Widgets/Menu.qml index 1c6a55c28a..b3cdfc6967 100644 --- a/resources/qml/Widgets/Menu.qml +++ b/resources/qml/Widgets/Menu.qml @@ -2,23 +2,26 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.7 -import QtQuick.Controls 2.3 -import UM 1.1 as UM +import UM 1.5 as UM +import Cura 1.0 as Cura // // Menu with Cura styling. // -Menu +UM.Menu { id: menu + topPadding: UM.Theme.getSize("narrow_margin").height + bottomPadding: UM.Theme.getSize("narrow_margin").height padding: 0 - implicitWidth: UM.Theme.getSize("setting_control").width - width: Math.max.apply(Math, Object.values(contentChildren).map(function(c) { return c.width })) + implicitWidth: UM.Theme.getSize("menu").width - background: Rectangle { - color: UM.Theme.getColor("setting_control") - border.color: UM.Theme.getColor("setting_control_border") + delegate: Cura.MenuItem {} + background: Rectangle + { + color: UM.Theme.getColor("main_background") + border.color: UM.Theme.getColor("lining") } }
\ No newline at end of file diff --git a/resources/qml/Widgets/MenuItem.qml b/resources/qml/Widgets/MenuItem.qml index 96869f028f..36098e1197 100644 --- a/resources/qml/Widgets/MenuItem.qml +++ b/resources/qml/Widgets/MenuItem.qml @@ -4,16 +4,17 @@ import QtQuick 2.7 import QtQuick.Controls 2.3 -import UM 1.1 as UM +import UM 1.5 as UM // // MenuItem with Cura styling. // -MenuItem +UM.MenuItem { id: menuItem - implicitHeight: UM.Theme.getSize("setting_control").height + UM.Theme.getSize("narrow_margin").height + implicitHeight: UM.Theme.getSize("menu").height + UM.Theme.getSize("narrow_margin").height + implicitWidth: UM.Theme.getSize("menu").width opacity: enabled ? 1.0 : 0.5 arrow: UM.RecolorImage @@ -41,26 +42,12 @@ MenuItem color: UM.Theme.getColor("setting_control_text") } - contentItem: Text { - leftPadding: menuItem.checkable ? menuItem.indicator.width + UM.Theme.getSize("default_margin").width : UM.Theme.getSize("thin_margin").width - rightPadding: menuItem.subMenu ? menuItem.arrow.width + UM.Theme.getSize("default_margin").width : UM.Theme.getSize("thin_margin").width - text: menuItem.text - - textFormat: Text.PlainText - renderType: Text.NativeRendering - color: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") - elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter - } - - background: Rectangle { + background: Rectangle + { x: UM.Theme.getSize("default_lining").width y: UM.Theme.getSize("default_lining").width width: menuItem.width - 2 * UM.Theme.getSize("default_lining").width height: menuItem.height - 2 * UM.Theme.getSize("default_lining").height - - color: menuItem.highlighted ? UM.Theme.getColor("setting_control_highlight") : "transparent" - border.color: menuItem.highlighted ? UM.Theme.getColor("setting_control_border_highlight") : "transparent" + color: menuItem.highlighted ? UM.Theme.getColor("background_2"): UM.Theme.getColor("background_1") } }
\ No newline at end of file diff --git a/resources/qml/Widgets/MenuSeparator.qml b/resources/qml/Widgets/MenuSeparator.qml index cfc696fbb3..b39f958c69 100644 --- a/resources/qml/Widgets/MenuSeparator.qml +++ b/resources/qml/Widgets/MenuSeparator.qml @@ -11,10 +11,12 @@ import UM 1.1 as UM // MenuSeparator { - padding: 0 - - contentItem: Rectangle { + leftPadding: UM.Theme.getSize("default_margin").width + rightPadding: UM.Theme.getSize("default_margin").width + contentItem: Rectangle + { implicitHeight: UM.Theme.getSize("default_lining").height color: UM.Theme.getColor("setting_control_border") } + height: visible ? implicitHeight: 0 }
\ No newline at end of file diff --git a/resources/qml/Widgets/NotificationIcon.qml b/resources/qml/Widgets/NotificationIcon.qml index 5cf4d17777..7ef44559b6 100644 --- a/resources/qml/Widgets/NotificationIcon.qml +++ b/resources/qml/Widgets/NotificationIcon.qml @@ -4,7 +4,7 @@ import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.4 as UM +import UM 1.5 as UM // @@ -22,15 +22,12 @@ Rectangle property alias labelText: notificationLabel.text property alias labelFont: notificationLabel.font - Label + UM.Label { id: notificationLabel anchors.fill: parent color: UM.Theme.getColor("primary_text") horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering // This is a bit of a hack, but we don't really have enough room for 2 characters (eg 9+). The default font // does have a tad bit to much spacing. So instead of adding a whole new font, we just modify it a bit for this diff --git a/resources/qml/Widgets/RadioButton.qml b/resources/qml/Widgets/RadioButton.qml index 13aee7ba90..add708507c 100644 --- a/resources/qml/Widgets/RadioButton.qml +++ b/resources/qml/Widgets/RadioButton.qml @@ -1,10 +1,10 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.0 as Cura @@ -13,10 +13,61 @@ import Cura 1.0 as Cura // RadioButton { - id: radioButton + id: control font: UM.Theme.getFont("default") + states: [ + State { + name: "selected-hover" + when: control.enabled && control.checked && control.hovered + PropertyChanges + { + target: indicator_background + color: UM.Theme.getColor("radio_selected") + border.color: UM.Theme.getColor("radio_border_hover") + } + }, + State { + name: "selected" + when: control.enabled && control.checked + PropertyChanges + { + target: indicator_background + color: UM.Theme.getColor("radio_selected") + } + }, + State { + name: "hovered" + when: control.enabled && control.hovered + PropertyChanges + { + target: indicator_background + border.color: UM.Theme.getColor("radio_border_hover") + } + }, + State { + name: "selected_disabled" + when: !control.enabled && control.checked + PropertyChanges + { + target: indicator_background + color: UM.Theme.getColor("radio_selected_disabled") + border.color: UM.Theme.getColor("radio_border_disabled") + } + }, + State { + name: "disabled" + when: !control.enabled + PropertyChanges + { + target: indicator_background + color: UM.Theme.getColor("radio_disabled") + border.color: UM.Theme.getColor("radio_border_disabled") + } + } + ] + background: Item { anchors.fill: parent @@ -24,32 +75,35 @@ RadioButton indicator: Rectangle { + id: indicator_background implicitWidth: UM.Theme.getSize("radio_button").width implicitHeight: UM.Theme.getSize("radio_button").height anchors.verticalCenter: parent.verticalCenter anchors.alignWhenCentered: false radius: width / 2 + color: UM.Theme.getColor("radio") border.width: UM.Theme.getSize("default_lining").width - border.color: radioButton.hovered ? UM.Theme.getColor("small_button_text") : UM.Theme.getColor("small_button_text_hover") + border.color: UM.Theme.getColor("radio_border") Rectangle { + id: indicator_dot width: (parent.width / 2) | 0 height: width anchors.centerIn: parent radius: width / 2 - color: radioButton.hovered ? UM.Theme.getColor("primary_button_hover") : UM.Theme.getColor("primary_button") - visible: radioButton.checked + color: control.enabled ? UM.Theme.getColor("radio_dot") : UM.Theme.getColor("radio_dot_disabled") + visible: control.checked + + } } - contentItem: Label + contentItem: UM.Label { - verticalAlignment: Text.AlignVCenter - leftPadding: radioButton.indicator.width + radioButton.spacing - text: radioButton.text - font: radioButton.font - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering + leftPadding: control.indicator.width + control.spacing + text: control.text + font: control.font + color: control.enabled ? UM.Theme.getColor("radio_text"): UM.Theme.getColor("radio_text_disabled") } } diff --git a/resources/qml/Widgets/ScrollableTextArea.qml b/resources/qml/Widgets/ScrollableTextArea.qml index 6becf75cb1..7d8f6b886d 100644 --- a/resources/qml/Widgets/ScrollableTextArea.qml +++ b/resources/qml/Widgets/ScrollableTextArea.qml @@ -1,35 +1,39 @@ -// Copyright (c) 2019 Ultimaker B.V. +// Copyright (c) 2022 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura // // Cura-style TextArea with scrolls // -ScrollView +Flickable { - property alias textArea: _textArea - + id: scrollableTextAreaBase + property bool do_borders: true property var back_color: UM.Theme.getColor("main_background") - property var do_borders: true + property alias textArea: flickableTextArea - clip: true + ScrollBar.vertical: UM.ScrollBar {} - background: Rectangle // Border + TextArea.flickable: TextArea { - color: back_color - border.color: UM.Theme.getColor("thick_lining") - border.width: do_borders ? UM.Theme.getSize("default_lining").width : 0 - } + id: flickableTextArea + + background: Rectangle //Providing the background color and border. + { + anchors.fill: parent + anchors.margins: -border.width + + color: scrollableTextAreaBase.back_color + border.color: UM.Theme.getColor("thick_lining") + border.width: scrollableTextAreaBase.do_borders ? UM.Theme.getSize("default_lining").width : 0 + } - TextArea - { - id: _textArea font: UM.Theme.getFont("default") color: UM.Theme.getColor("text") textFormat: TextEdit.PlainText @@ -37,4 +41,4 @@ ScrollView wrapMode: Text.Wrap selectByMouse: true } -} +}
\ No newline at end of file diff --git a/resources/qml/Widgets/TextField.qml b/resources/qml/Widgets/TextField.qml index c126c8a6e0..b708446d65 100644 --- a/resources/qml/Widgets/TextField.qml +++ b/resources/qml/Widgets/TextField.qml @@ -1,10 +1,10 @@ -// 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.10 import QtQuick.Controls 2.3 -import UM 1.3 as UM +import UM 1.5 as UM import Cura 1.1 as Cura @@ -13,63 +13,45 @@ import Cura 1.1 as Cura // TextField { - id: textField + id: control property alias leftIcon: iconLeft.source - UM.I18nCatalog { id: catalog; name: "cura" } + height: UM.Theme.getSize("setting_control").height hoverEnabled: true selectByMouse: true font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text") + color: UM.Theme.getColor("text_field_text") renderType: Text.NativeRendering + selectionColor: UM.Theme.getColor("text_selection") leftPadding: iconLeft.visible ? iconLeft.width + UM.Theme.getSize("default_margin").width * 2 : UM.Theme.getSize("thin_margin").width states: [ State { name: "disabled" - when: !textField.enabled - PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_disabled_border")} - PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_control_disabled")} + when: !control.enabled + PropertyChanges { target: control; color: UM.Theme.getColor("text_field_text_disabled")} + PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("text_field_border_disabled")} }, State { name: "invalid" - when: !textField.acceptableInput - PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_validation_error")} + when: !control.acceptableInput PropertyChanges { target: backgroundRectangle; color: UM.Theme.getColor("setting_validation_error_background")} }, State { name: "hovered" - when: textField.hovered || textField.activeFocus - PropertyChanges { target: backgroundRectangle.border; color: UM.Theme.getColor("setting_control_border_highlight") } + when: control.hovered || control.activeFocus + PropertyChanges { target: backgroundRectangle; liningColor: UM.Theme.getColor("text_field_border_hovered")} } ] - background: Rectangle + background: UM.UnderlineBackground { id: backgroundRectangle - - color: UM.Theme.getColor("main_background") - - radius: UM.Theme.getSize("setting_control_radius").width - - border.color: - { - if (!textField.enabled) - { - return UM.Theme.getColor("setting_control_disabled_border") - } - if (textField.hovered || textField.activeFocus) - { - return UM.Theme.getColor("setting_control_border_highlight") - } - return UM.Theme.getColor("setting_control_border") - } - //Optional icon added on the left hand side. UM.RecolorImage { @@ -85,7 +67,7 @@ TextField visible: source != "" height: UM.Theme.getSize("small_button_icon").height width: visible ? height : 0 - color: textField.color + color: control.color } } } diff --git a/resources/qml/qmldir b/resources/qml/qmldir index 52d2df75ab..a47d85545b 100644 --- a/resources/qml/qmldir +++ b/resources/qml/qmldir @@ -4,6 +4,7 @@ MachineSelector 1.0 MachineSelector.qml MachineSelectorButton 1.0 MachineSelectorButton.qml CustomConfigurationSelector 1.0 CustomConfigurationSelector.qml PrintSetupSelector 1.0 PrintSetupSelector.qml +ProfileOverview 1.6 ProfileOverview.qml ActionButton 1.0 ActionButton.qml MaterialMenu 1.0 MaterialMenu.qml NozzleMenu 1.0 NozzleMenu.qml @@ -13,10 +14,8 @@ OutputDevicesActionButton 1.0 OutputDevicesActionButton.qml ExpandableComponent 1.0 ExpandableComponent.qml PrinterTypeLabel 1.0 PrinterTypeLabel.qml ViewsSelector 1.0 ViewsSelector.qml -ToolbarButton 1.0 ToolbarButton.qml SettingView 1.0 SettingView.qml ProfileMenu 1.0 ProfileMenu.qml -ToolTip 1.0 ToolTip.qml # Cura/WelcomePages @@ -46,3 +45,4 @@ GcodeTextArea 1.0 GcodeTextArea.qml NumericTextFieldWithUnit 1.0 NumericTextFieldWithUnit.qml PrintHeadMinMaxTextField 1.0 PrintHeadMinMaxTextField.qml SimpleCheckBox 1.0 SimpleCheckBox.qml +RenameDialog 1.0 RenameDialog.qml diff --git a/resources/quality/fast.inst.cfg b/resources/quality/fast.inst.cfg index 47e064cc6b..743ec93081 100644 --- a/resources/quality/fast.inst.cfg +++ b/resources/quality/fast.inst.cfg @@ -17,5 +17,4 @@ cool_min_layer_time = 3 speed_wall_0 = =math.ceil(speed_print * 40 / 60) speed_wall_x = =math.ceil(speed_print * 80 / 60) speed_infill = =math.ceil(speed_print * 100 / 60) -wall_thickness = 1 speed_topbottom = =math.ceil(speed_print * 30 / 60) diff --git a/resources/quality/flsun_sr/flsun_sr_fine.inst.cfg b/resources/quality/flsun_sr/flsun_sr_fine.inst.cfg index 1e460ba4ae..c6943185b8 100644 --- a/resources/quality/flsun_sr/flsun_sr_fine.inst.cfg +++ b/resources/quality/flsun_sr/flsun_sr_fine.inst.cfg @@ -27,7 +27,6 @@ infill_before_walls = False infill_enable_travel_optimization = False infill_support_angle = 50 ironing_enabled = False -max_skin_angle_for_expansion = 20 retract_at_layer_change = False retraction_amount = 6.5 retraction_hop_only_when_collides = True diff --git a/resources/quality/flsun_sr/flsun_sr_normal.inst.cfg b/resources/quality/flsun_sr/flsun_sr_normal.inst.cfg index 826a2524bb..a5c43dc3d3 100644 --- a/resources/quality/flsun_sr/flsun_sr_normal.inst.cfg +++ b/resources/quality/flsun_sr/flsun_sr_normal.inst.cfg @@ -27,7 +27,6 @@ infill_before_walls = False infill_enable_travel_optimization = False infill_support_angle = 50 ironing_enabled = False -max_skin_angle_for_expansion = 20 retract_at_layer_change = False retraction_amount = 6.5 retraction_hop_only_when_collides = True diff --git a/resources/quality/ultimaker2_plus/pla_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus/pla_0.25_normal.inst.cfg index 15483409a7..1c0629f317 100644 --- a/resources/quality/ultimaker2_plus/pla_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/pla_0.25_normal.inst.cfg @@ -18,4 +18,3 @@ infill_sparse_density = 22 speed_layer_0 = =round(speed_print * 30 / 30) speed_print = 30 top_bottom_thickness = 0.72 -wall_thickness = 0.88 diff --git a/resources/quality/ultimaker2_plus/pla_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus/pla_0.4_fast.inst.cfg index 63563ac9ef..d25348a524 100644 --- a/resources/quality/ultimaker2_plus/pla_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus/pla_0.4_fast.inst.cfg @@ -21,4 +21,3 @@ speed_topbottom = =math.ceil(speed_print * 30 / 60) speed_travel = 150 speed_wall = =math.ceil(speed_print * 50 / 60) top_bottom_thickness = 0.75 -wall_thickness = 0.7 diff --git a/resources/quality/ultimaker2_plus/pla_0.4_high.inst.cfg b/resources/quality/ultimaker2_plus/pla_0.4_high.inst.cfg index b13c39c673..ccdbfcf67c 100644 --- a/resources/quality/ultimaker2_plus/pla_0.4_high.inst.cfg +++ b/resources/quality/ultimaker2_plus/pla_0.4_high.inst.cfg @@ -19,4 +19,3 @@ speed_layer_0 = =round(speed_print * 30 / 50) speed_print = 50 speed_topbottom = =math.ceil(speed_print * 20 / 50) top_bottom_thickness = 0.72 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus/pla_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus/pla_0.4_normal.inst.cfg index 2bbb4952bf..4f8ed51f0a 100644 --- a/resources/quality/ultimaker2_plus/pla_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/pla_0.4_normal.inst.cfg @@ -19,4 +19,3 @@ speed_layer_0 = =round(speed_print * 30 / 50) speed_print = 50 speed_topbottom = =math.ceil(speed_print * 20 / 50) top_bottom_thickness = 0.8 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus/pla_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus/pla_0.6_normal.inst.cfg index 9bb3b38200..60b3e54ef5 100644 --- a/resources/quality/ultimaker2_plus/pla_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/pla_0.6_normal.inst.cfg @@ -21,4 +21,3 @@ speed_topbottom = =math.ceil(speed_print * 20 / 55) speed_wall = =math.ceil(speed_print * 40 / 55) speed_wall_0 = =math.ceil(speed_print * 25 / 55) top_bottom_thickness = 1.2 -wall_thickness = 1.59 diff --git a/resources/quality/ultimaker2_plus/pla_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus/pla_0.8_normal.inst.cfg index 0deab058ad..ac9a38f61a 100644 --- a/resources/quality/ultimaker2_plus/pla_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/pla_0.8_normal.inst.cfg @@ -19,4 +19,3 @@ speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 speed_wall_0 = =math.ceil(speed_print * 25 / 40) top_bottom_thickness = 1.2 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus/um2p_abs_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_abs_0.25_normal.inst.cfg index ae0b9cefa8..dc365cd367 100644 --- a/resources/quality/ultimaker2_plus/um2p_abs_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_abs_0.25_normal.inst.cfg @@ -20,4 +20,3 @@ infill_sparse_density = 22 speed_layer_0 = =round(speed_print * 30 / 30) speed_print = 30 top_bottom_thickness = 0.72 -wall_thickness = 0.88 diff --git a/resources/quality/ultimaker2_plus/um2p_abs_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus/um2p_abs_0.4_fast.inst.cfg index 68aff39936..1e3072b513 100644 --- a/resources/quality/ultimaker2_plus/um2p_abs_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_abs_0.4_fast.inst.cfg @@ -23,7 +23,6 @@ speed_topbottom = =math.ceil(speed_print * 30 / 55) speed_travel = 150 speed_wall = =math.ceil(speed_print * 40 / 55) top_bottom_thickness = 0.75 -wall_thickness = 0.7 speed_wall_0 = =math.ceil(speed_print * 40 / 55) speed_wall_x = =math.ceil(speed_print * 80 / 55) speed_infill = =math.ceil(speed_print * 100 / 55) diff --git a/resources/quality/ultimaker2_plus/um2p_abs_0.4_high.inst.cfg b/resources/quality/ultimaker2_plus/um2p_abs_0.4_high.inst.cfg index a1f9dce7f0..878993fd03 100644 --- a/resources/quality/ultimaker2_plus/um2p_abs_0.4_high.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_abs_0.4_high.inst.cfg @@ -21,6 +21,5 @@ speed_layer_0 = =round(speed_print * 30 / 45) speed_print = 45 speed_wall = =math.ceil(speed_print * 30 / 45) top_bottom_thickness = 0.72 -wall_thickness = 1.05 speed_topbottom = =math.ceil(speed_print * 15 / 45) speed_infill = =math.ceil(speed_print * 45 / 45) diff --git a/resources/quality/ultimaker2_plus/um2p_abs_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_abs_0.4_normal.inst.cfg index a667f45e44..bb4cf23979 100644 --- a/resources/quality/ultimaker2_plus/um2p_abs_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_abs_0.4_normal.inst.cfg @@ -21,4 +21,3 @@ speed_layer_0 = =round(speed_print * 30 / 45) speed_print = 45 speed_wall = =math.ceil(speed_print * 30 / 45) top_bottom_thickness = 0.8 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus/um2p_abs_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_abs_0.6_normal.inst.cfg index a73c13ecec..e5e903544a 100644 --- a/resources/quality/ultimaker2_plus/um2p_abs_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_abs_0.6_normal.inst.cfg @@ -21,4 +21,3 @@ speed_infill = =math.ceil(speed_print * 55 / 40) speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 top_bottom_thickness = 1.2 -wall_thickness = 1.59 diff --git a/resources/quality/ultimaker2_plus/um2p_abs_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_abs_0.8_normal.inst.cfg index 85d8436603..de37f1e8bf 100644 --- a/resources/quality/ultimaker2_plus/um2p_abs_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_abs_0.8_normal.inst.cfg @@ -20,4 +20,3 @@ infill_sparse_density = 20 speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 top_bottom_thickness = 1.2 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus/um2p_cpe_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpe_0.25_normal.inst.cfg index 56727fc86f..0e7e14d661 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpe_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpe_0.25_normal.inst.cfg @@ -20,4 +20,3 @@ infill_sparse_density = 22 speed_layer_0 = =round(speed_print * 30 / 30) speed_print = 30 top_bottom_thickness = 0.72 -wall_thickness = 0.88 diff --git a/resources/quality/ultimaker2_plus/um2p_cpe_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpe_0.4_fast.inst.cfg index 7293177170..ac7ac2d3f7 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpe_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpe_0.4_fast.inst.cfg @@ -22,7 +22,6 @@ speed_print = 45 speed_travel = 150 speed_wall = =math.ceil(speed_print * 40 / 45) top_bottom_thickness = 0.75 -wall_thickness = 0.7 speed_wall_0 = =math.ceil(speed_print * 30 / 45) speed_topbottom = =math.ceil(speed_print * 30 / 45) speed_wall_x = =math.ceil(speed_print * 40 / 45) diff --git a/resources/quality/ultimaker2_plus/um2p_cpe_0.4_high.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpe_0.4_high.inst.cfg index ca3224ace7..5e20f288fe 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpe_0.4_high.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpe_0.4_high.inst.cfg @@ -21,6 +21,5 @@ speed_layer_0 = =round(speed_print * 30 / 45) speed_print = 45 speed_wall = =math.ceil(speed_print * 30 / 45) top_bottom_thickness = 0.72 -wall_thickness = 1.05 speed_topbottom = =math.ceil(speed_print * 15 / 45) speed_infill = =math.ceil(speed_print * 45 / 45) diff --git a/resources/quality/ultimaker2_plus/um2p_cpe_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpe_0.4_normal.inst.cfg index 2be7544374..0356681013 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpe_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpe_0.4_normal.inst.cfg @@ -21,4 +21,3 @@ speed_layer_0 = =round(speed_print * 30 / 45) speed_print = 45 speed_wall = =math.ceil(speed_print * 30 / 45) top_bottom_thickness = 0.8 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus/um2p_cpe_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpe_0.6_normal.inst.cfg index 997f1fbab1..ec96dca598 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpe_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpe_0.6_normal.inst.cfg @@ -20,4 +20,3 @@ infill_sparse_density = 20 speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 top_bottom_thickness = 1.2 -wall_thickness = 1.59 diff --git a/resources/quality/ultimaker2_plus/um2p_cpe_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpe_0.8_normal.inst.cfg index 8935e57bd1..008e9acdbb 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpe_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpe_0.8_normal.inst.cfg @@ -20,4 +20,3 @@ infill_sparse_density = 20 speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 top_bottom_thickness = 1.2 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus/um2p_cpep_0.4_draft.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpep_0.4_draft.inst.cfg index c4d4798cef..b2114f254b 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpep_0.4_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpep_0.4_draft.inst.cfg @@ -38,4 +38,3 @@ support_infill_rate = =20 if support_enable and support_structure == 'normal' el support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 1.5 -wall_thickness = 1.14 diff --git a/resources/quality/ultimaker2_plus/um2p_cpep_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpep_0.4_normal.inst.cfg index e0fa416aaf..08d8680014 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpep_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpep_0.4_normal.inst.cfg @@ -38,4 +38,3 @@ support_infill_rate = =20 if support_enable and support_structure == 'normal' el support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 1.5 -wall_thickness = 1.14 diff --git a/resources/quality/ultimaker2_plus/um2p_cpep_0.6_draft.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpep_0.6_draft.inst.cfg index 29bcd5e3b9..da52322af5 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpep_0.6_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpep_0.6_draft.inst.cfg @@ -43,4 +43,3 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = 0.22 top_bottom_thickness = 0.75 -wall_thickness = 1.14 diff --git a/resources/quality/ultimaker2_plus/um2p_cpep_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpep_0.6_normal.inst.cfg index 1b1102ae41..940468c2c9 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpep_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpep_0.6_normal.inst.cfg @@ -43,4 +43,3 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = 0.22 top_bottom_thickness = 0.75 -wall_thickness = 1.14 diff --git a/resources/quality/ultimaker2_plus/um2p_cpep_0.8_draft.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpep_0.8_draft.inst.cfg index 65c7e56fee..15f1447a29 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpep_0.8_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpep_0.8_draft.inst.cfg @@ -38,4 +38,3 @@ support_infill_rate = =20 if support_enable and support_structure == 'normal' el support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 1.2 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus/um2p_cpep_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_cpep_0.8_normal.inst.cfg index c99e991aef..be2e57c767 100644 --- a/resources/quality/ultimaker2_plus/um2p_cpep_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_cpep_0.8_normal.inst.cfg @@ -38,4 +38,3 @@ support_infill_rate = =20 if support_enable and support_structure == 'normal' el support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 1.2 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus/um2p_nylon_0.25_high.inst.cfg b/resources/quality/ultimaker2_plus/um2p_nylon_0.25_high.inst.cfg index e3104ecb40..df742c79c8 100644 --- a/resources/quality/ultimaker2_plus/um2p_nylon_0.25_high.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_nylon_0.25_high.inst.cfg @@ -40,5 +40,4 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1 speed_infill = =math.ceil(speed_print * 40 / 40) diff --git a/resources/quality/ultimaker2_plus/um2p_nylon_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_nylon_0.25_normal.inst.cfg index 1953c20a11..7a1fc9963f 100644 --- a/resources/quality/ultimaker2_plus/um2p_nylon_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_nylon_0.25_normal.inst.cfg @@ -40,4 +40,3 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1 diff --git a/resources/quality/ultimaker2_plus/um2p_nylon_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus/um2p_nylon_0.4_fast.inst.cfg index 4680476de8..0c3056f47f 100644 --- a/resources/quality/ultimaker2_plus/um2p_nylon_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_nylon_0.4_fast.inst.cfg @@ -39,7 +39,6 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = =layer_height * 2 top_bottom_thickness = 0.75 -wall_thickness = 1.06 speed_wall_0 = =math.ceil(speed_print * 30 / 45) speed_wall_x = =math.ceil(speed_print * 40 / 45) speed_infill = =math.ceil(speed_print * 45 / 45) diff --git a/resources/quality/ultimaker2_plus/um2p_nylon_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_nylon_0.4_normal.inst.cfg index 2f0a543ec5..b28481a6aa 100644 --- a/resources/quality/ultimaker2_plus/um2p_nylon_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_nylon_0.4_normal.inst.cfg @@ -38,4 +38,3 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = =layer_height * 2 top_bottom_thickness = 0.75 -wall_thickness = 1.06 diff --git a/resources/quality/ultimaker2_plus/um2p_nylon_0.6_fast.inst.cfg b/resources/quality/ultimaker2_plus/um2p_nylon_0.6_fast.inst.cfg index 1442289d90..d31d84a314 100644 --- a/resources/quality/ultimaker2_plus/um2p_nylon_0.6_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_nylon_0.6_fast.inst.cfg @@ -44,5 +44,4 @@ support_top_distance = 0.55 support_xy_distance = 0.7 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1.2 speed_infill = =math.ceil(speed_print * 55 / 55) diff --git a/resources/quality/ultimaker2_plus/um2p_nylon_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_nylon_0.6_normal.inst.cfg index 13066f1685..6048b82677 100644 --- a/resources/quality/ultimaker2_plus/um2p_nylon_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_nylon_0.6_normal.inst.cfg @@ -42,4 +42,3 @@ support_pattern = lines support_xy_distance = 0.7 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker2_plus/um2p_nylon_0.8_draft.inst.cfg b/resources/quality/ultimaker2_plus/um2p_nylon_0.8_draft.inst.cfg index 9288409611..7ca19f5a2c 100644 --- a/resources/quality/ultimaker2_plus/um2p_nylon_0.8_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_nylon_0.8_draft.inst.cfg @@ -43,4 +43,3 @@ support_top_distance = 0.5 support_xy_distance = 0.75 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 2.4 diff --git a/resources/quality/ultimaker2_plus/um2p_nylon_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_nylon_0.8_normal.inst.cfg index f2caa2441b..f014f71ef2 100644 --- a/resources/quality/ultimaker2_plus/um2p_nylon_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_nylon_0.8_normal.inst.cfg @@ -43,4 +43,3 @@ support_top_distance = 0.5 support_xy_distance = 0.75 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 2.4 diff --git a/resources/quality/ultimaker2_plus/um2p_pc_0.25_high.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pc_0.25_high.inst.cfg index 77120dec46..e40e91b7a5 100644 --- a/resources/quality/ultimaker2_plus/um2p_pc_0.25_high.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pc_0.25_high.inst.cfg @@ -34,6 +34,5 @@ support_enable = True support_infill_rate = =20 if support_enable and support_structure == 'normal' else 0 if support_enable and support_structure == 'tree' else 20 support_pattern = lines support_z_distance = 0.19 -wall_thickness = 0.88 speed_topbottom = =math.ceil(speed_print * 15 / 30) speed_infill = =math.ceil(speed_print * 80 / 30) diff --git a/resources/quality/ultimaker2_plus/um2p_pc_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pc_0.25_normal.inst.cfg index fce0028973..9f55d229e8 100644 --- a/resources/quality/ultimaker2_plus/um2p_pc_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pc_0.25_normal.inst.cfg @@ -34,4 +34,3 @@ support_enable = True support_infill_rate = =20 if support_enable and support_structure == 'normal' else 0 if support_enable and support_structure == 'tree' else 20 support_pattern = lines support_z_distance = 0.19 -wall_thickness = 0.88 diff --git a/resources/quality/ultimaker2_plus/um2p_pc_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pc_0.4_fast.inst.cfg index 11b213b799..b0e78c2057 100644 --- a/resources/quality/ultimaker2_plus/um2p_pc_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pc_0.4_fast.inst.cfg @@ -35,6 +35,5 @@ support_enable = True support_infill_rate = =20 if support_enable and support_structure == 'normal' else 0 if support_enable and support_structure == 'tree' else 20 support_pattern = lines support_z_distance = 0.19 -wall_thickness = 1.2 speed_topbottom = =math.ceil(speed_print * 30 / 45) speed_infill = =math.ceil(speed_print * 45 / 45) diff --git a/resources/quality/ultimaker2_plus/um2p_pc_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pc_0.4_normal.inst.cfg index db8e5058f6..999509b82d 100644 --- a/resources/quality/ultimaker2_plus/um2p_pc_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pc_0.4_normal.inst.cfg @@ -35,4 +35,3 @@ support_enable = True support_infill_rate = =20 if support_enable and support_structure == 'normal' else 0 if support_enable and support_structure == 'tree' else 20 support_pattern = lines support_z_distance = 0.19 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker2_plus/um2p_pc_0.6_fast.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pc_0.6_fast.inst.cfg index 28c8ee4ead..b417c4c1df 100644 --- a/resources/quality/ultimaker2_plus/um2p_pc_0.6_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pc_0.6_fast.inst.cfg @@ -41,5 +41,4 @@ support_line_distance = 3.5333 support_pattern = lines support_z_distance = 0.21 top_bottom_thickness = 0.75 -wall_thickness = 1.06 speed_infill = =math.ceil(speed_print * 45 / 45) diff --git a/resources/quality/ultimaker2_plus/um2p_pc_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pc_0.6_normal.inst.cfg index 36059ce309..b94f0349f7 100644 --- a/resources/quality/ultimaker2_plus/um2p_pc_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pc_0.6_normal.inst.cfg @@ -41,4 +41,3 @@ support_line_distance = 3.5333 support_pattern = lines support_z_distance = 0.21 top_bottom_thickness = 0.75 -wall_thickness = 1.06 diff --git a/resources/quality/ultimaker2_plus/um2p_pc_0.8_draft.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pc_0.8_draft.inst.cfg index dd0a425aec..70510c98d2 100644 --- a/resources/quality/ultimaker2_plus/um2p_pc_0.8_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pc_0.8_draft.inst.cfg @@ -35,4 +35,3 @@ support_infill_rate = =20 if support_enable and support_structure == 'normal' el support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 2.0 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus/um2p_pc_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pc_0.8_normal.inst.cfg index 3116e3d2fc..cd6b811561 100644 --- a/resources/quality/ultimaker2_plus/um2p_pc_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pc_0.8_normal.inst.cfg @@ -35,4 +35,3 @@ support_infill_rate = =20 if support_enable and support_structure == 'normal' el support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 1.2 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus/um2p_pp_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pp_0.4_fast.inst.cfg index 10f6d07dba..beb0969fd8 100644 --- a/resources/quality/ultimaker2_plus/um2p_pp_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pp_0.4_fast.inst.cfg @@ -64,6 +64,5 @@ support_xy_distance_overhang = =wall_line_width_0 support_z_distance = =layer_height * 2 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 0.76 speed_wall_x = =math.ceil(speed_print * 25 / 25) speed_infill = =math.ceil(speed_print * 25 / 25) diff --git a/resources/quality/ultimaker2_plus/um2p_pp_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pp_0.4_normal.inst.cfg index ca4f9ec1d9..f5b3d298fa 100644 --- a/resources/quality/ultimaker2_plus/um2p_pp_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pp_0.4_normal.inst.cfg @@ -64,4 +64,3 @@ support_xy_distance_overhang = =wall_line_width_0 support_z_distance = =layer_height * 2 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 0.76 diff --git a/resources/quality/ultimaker2_plus/um2p_pp_0.6_draft.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pp_0.6_draft.inst.cfg index c77c6fcb95..390dbf440d 100644 --- a/resources/quality/ultimaker2_plus/um2p_pp_0.6_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pp_0.6_draft.inst.cfg @@ -64,4 +64,3 @@ support_z_distance = =layer_height * 2 top_bottom_thickness = 1.1 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 1.14 diff --git a/resources/quality/ultimaker2_plus/um2p_pp_0.6_fast.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pp_0.6_fast.inst.cfg index 58b93a9af1..ab81d3bfe1 100644 --- a/resources/quality/ultimaker2_plus/um2p_pp_0.6_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pp_0.6_fast.inst.cfg @@ -64,6 +64,5 @@ support_z_distance = =layer_height * 2 top_bottom_thickness = 1.1 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 1.14 speed_wall_x = =math.ceil(speed_print * 25 / 25) speed_infill = =math.ceil(speed_print * 25 / 25) diff --git a/resources/quality/ultimaker2_plus/um2p_pp_0.8_draft.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pp_0.8_draft.inst.cfg index b066ba3929..4bec3c7f24 100644 --- a/resources/quality/ultimaker2_plus/um2p_pp_0.8_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pp_0.8_draft.inst.cfg @@ -64,4 +64,3 @@ support_z_distance = =layer_height * 2 top_bottom_thickness = 1.5 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 1.52 diff --git a/resources/quality/ultimaker2_plus/um2p_pp_0.8_verydraft.inst.cfg b/resources/quality/ultimaker2_plus/um2p_pp_0.8_verydraft.inst.cfg index a89ac4f68b..fd4813a356 100644 --- a/resources/quality/ultimaker2_plus/um2p_pp_0.8_verydraft.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_pp_0.8_verydraft.inst.cfg @@ -64,4 +64,3 @@ support_z_distance = =layer_height * 2 top_bottom_thickness = 1.5 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 1.52 diff --git a/resources/quality/ultimaker2_plus/um2p_tpu_0.25_high.inst.cfg b/resources/quality/ultimaker2_plus/um2p_tpu_0.25_high.inst.cfg index 5303e5f526..47749c135c 100644 --- a/resources/quality/ultimaker2_plus/um2p_tpu_0.25_high.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_tpu_0.25_high.inst.cfg @@ -39,5 +39,4 @@ support_infill_rate = =25 if support_enable and support_structure == 'normal' el support_xy_distance = 0.6 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 0.88 speed_infill = =math.ceil(speed_print * 40 / 40) diff --git a/resources/quality/ultimaker2_plus/um2p_tpu_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus/um2p_tpu_0.4_normal.inst.cfg index b4945a27cd..26299276bb 100644 --- a/resources/quality/ultimaker2_plus/um2p_tpu_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_tpu_0.4_normal.inst.cfg @@ -37,4 +37,3 @@ support_infill_rate = =25 if support_enable and support_structure == 'normal' el support_xy_distance = 0.65 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus/um2p_tpu_0.6_fast.inst.cfg b/resources/quality/ultimaker2_plus/um2p_tpu_0.6_fast.inst.cfg index 739f949dfc..a56d5aa535 100644 --- a/resources/quality/ultimaker2_plus/um2p_tpu_0.6_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus/um2p_tpu_0.6_fast.inst.cfg @@ -40,5 +40,4 @@ support_infill_rate = =25 if support_enable and support_structure == 'normal' el support_xy_distance = 0.7 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1.14 speed_infill = =math.ceil(speed_print * 45 / 45) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.25_normal.inst.cfg index 956d708e69..49dac6e9c8 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.25_normal.inst.cfg @@ -20,4 +20,3 @@ infill_sparse_density = 20 speed_layer_0 = =round(speed_print * 30 / 30) speed_print = 30 top_bottom_thickness = 0.72 -wall_thickness = 0.88 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_fast.inst.cfg index 61ede571db..46476599f6 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_fast.inst.cfg @@ -18,7 +18,6 @@ cool_min_layer_time_fan_speed_max = 15 cool_min_speed = 10 infill_sparse_density = 20 top_bottom_thickness = 0.75 -wall_thickness = 0.7 speed_print = 55 speed_travel = 150 speed_layer_0 = =round(speed_print * 30 / 55) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_high.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_high.inst.cfg index ab44842212..649b50dc9c 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_high.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_high.inst.cfg @@ -18,7 +18,6 @@ cool_min_layer_time_fan_speed_max = 15 cool_min_speed = 10 infill_sparse_density = 20 top_bottom_thickness = 0.72 -wall_thickness = 1.05 speed_print = 45 speed_layer_0 = =round(speed_print * 30 / 45) speed_wall = =math.ceil(speed_print * 30 / 45) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_normal.inst.cfg index 63f92a2770..9fd7dd9cf6 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.4_normal.inst.cfg @@ -18,7 +18,6 @@ cool_min_layer_time_fan_speed_max = 15 cool_min_speed = 10 infill_sparse_density = 20 top_bottom_thickness = 0.8 -wall_thickness = 1.05 speed_print = 45 speed_layer_0 = =round(speed_print * 30 / 45) speed_wall = =math.ceil(speed_print * 30 / 45) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.6_normal.inst.cfg index b7d9d9d437..b8b8ec5352 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.6_normal.inst.cfg @@ -21,4 +21,3 @@ speed_infill = =math.ceil(speed_print * 55 / 40) speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 top_bottom_thickness = 1.2 -wall_thickness = 1.59 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.8_normal.inst.cfg index 36e2b2180b..dde8e3bbb1 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_abs_0.8_normal.inst.cfg @@ -20,4 +20,3 @@ infill_sparse_density = 20 speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 top_bottom_thickness = 1.2 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.25_normal.inst.cfg index f3d9bb79d9..6031209ccc 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.25_normal.inst.cfg @@ -20,5 +20,4 @@ infill_sparse_density = 20 speed_layer_0 = =round(speed_print * 30 / 30) speed_print = 30 top_bottom_thickness = 0.72 -wall_thickness = 0.88 retraction_combing_max_distance = 50
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_fast.inst.cfg index 0ab179959f..4c08270f6d 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_fast.inst.cfg @@ -24,7 +24,6 @@ speed_print = 45 speed_travel = 150 speed_wall = =math.ceil(speed_print * 40 / 45) top_bottom_thickness = 0.75 -wall_thickness = 0.7 speed_wall_0 = =math.ceil(speed_print * 30 / 45) speed_topbottom = =math.ceil(speed_print * 30 / 45) speed_wall_x = =math.ceil(speed_print * 40 / 45) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_high.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_high.inst.cfg index dc4b06940c..ea6993c7f9 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_high.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_high.inst.cfg @@ -23,6 +23,5 @@ speed_layer_0 = =round(speed_print * 30 / 45) speed_print = 45 speed_wall = =math.ceil(speed_print * 30 / 45) top_bottom_thickness = 0.72 -wall_thickness = 1.05 speed_topbottom = =math.ceil(speed_print * 15 / 45) speed_infill = =math.ceil(speed_print * 45 / 45)
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_normal.inst.cfg index 2ea0c4a828..bbfbd452d3 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.4_normal.inst.cfg @@ -23,4 +23,3 @@ speed_layer_0 = =round(speed_print * 30 / 45) speed_print = 45 speed_wall = =math.ceil(speed_print * 30 / 45) top_bottom_thickness = 0.8 -wall_thickness = 1.05
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.6_normal.inst.cfg index 60642a3c69..f6984cbd4f 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.6_normal.inst.cfg @@ -22,4 +22,3 @@ retraction_prime_speed = =retraction_speed speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 top_bottom_thickness = 1.2 -wall_thickness = 1.59 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.8_normal.inst.cfg index 23e8d25778..e2f2f1b5f4 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpe_0.8_normal.inst.cfg @@ -20,5 +20,4 @@ infill_sparse_density = 20 speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 top_bottom_thickness = 1.2 -wall_thickness = 2.1 retraction_combing_max_distance = 50
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.4_draft.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.4_draft.inst.cfg index fdaecf1142..9df0561ba1 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.4_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.4_draft.inst.cfg @@ -39,4 +39,3 @@ support_infill_rate = =0 if support_enable and support_structure == 'tree' else support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 1.5 -wall_thickness = 1.14
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.4_normal.inst.cfg index b9845f7002..83ac3b0500 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.4_normal.inst.cfg @@ -39,4 +39,3 @@ support_infill_rate = =0 if support_enable and support_structure == 'tree' else support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 1.5 -wall_thickness = 1.14
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.6_draft.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.6_draft.inst.cfg index 965182eb4d..51038587a3 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.6_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.6_draft.inst.cfg @@ -43,4 +43,3 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = 0.22 top_bottom_thickness = 0.75 -wall_thickness = 1.14
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.6_normal.inst.cfg index 817635d4fd..51584f5f9b 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.6_normal.inst.cfg @@ -43,4 +43,3 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = 0.22 top_bottom_thickness = 0.75 -wall_thickness = 1.14
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.8_draft.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.8_draft.inst.cfg index 8f3db13ad6..db1798319b 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.8_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.8_draft.inst.cfg @@ -37,5 +37,4 @@ support_infill_rate = =0 if support_enable and support_structure == 'tree' else support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 1.2 -wall_thickness = 2.1 retraction_combing_max_distance = 50
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.8_normal.inst.cfg index c7e44efbbf..738287ba02 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_cpep_0.8_normal.inst.cfg @@ -37,5 +37,4 @@ support_infill_rate = =0 if support_enable and support_structure == 'tree' else support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 1.2 -wall_thickness = 2.1 retraction_combing_max_distance = 50 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.25_high.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.25_high.inst.cfg index 79a6223869..0f0663b905 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.25_high.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.25_high.inst.cfg @@ -39,5 +39,4 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1 speed_infill = =math.ceil(speed_print * 40 / 40) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.25_normal.inst.cfg index b65b044aea..06c242e813 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.25_normal.inst.cfg @@ -39,4 +39,3 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.4_fast.inst.cfg index 2358657ab3..ad247a4b3a 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.4_fast.inst.cfg @@ -39,7 +39,6 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = =layer_height * 2 top_bottom_thickness = 0.75 -wall_thickness = 1.06 speed_wall_0 = =math.ceil(speed_print * 30 / 45) speed_wall_x = =math.ceil(speed_print * 40 / 45) speed_infill = =math.ceil(speed_print * 45 / 45) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.4_normal.inst.cfg index 5a9283faff..19daf28829 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.4_normal.inst.cfg @@ -38,4 +38,3 @@ support_pattern = lines support_xy_distance = 0.6 support_z_distance = =layer_height * 2 top_bottom_thickness = 0.75 -wall_thickness = 1.06 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.6_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.6_fast.inst.cfg index 18fe82d680..f79e3d7e47 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.6_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.6_fast.inst.cfg @@ -44,5 +44,4 @@ support_top_distance = 0.55 support_xy_distance = 0.7 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1.2 speed_infill = =math.ceil(speed_print * 55 / 55) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.6_normal.inst.cfg index 8685edd405..d872acfcf0 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.6_normal.inst.cfg @@ -42,4 +42,3 @@ support_pattern = lines support_xy_distance = 0.7 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.8_draft.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.8_draft.inst.cfg index 02b1e8ae1f..a9580b1655 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.8_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.8_draft.inst.cfg @@ -42,4 +42,3 @@ support_top_distance = 0.5 support_xy_distance = 0.75 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 2.4 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.8_normal.inst.cfg index e9363c7f73..f089dbf76b 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_nylon_0.8_normal.inst.cfg @@ -42,4 +42,3 @@ support_top_distance = 0.5 support_xy_distance = 0.75 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 2.4 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.25_high.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.25_high.inst.cfg index e45b40cada..c939fef2f3 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.25_high.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.25_high.inst.cfg @@ -33,5 +33,4 @@ support_enable = True support_infill_rate = =0 if support_enable and support_structure == 'tree' else 20 support_pattern = lines support_z_distance = 0.19 -wall_thickness = 0.88 speed_topbottom = =math.ceil(speed_print * 15 / 30)
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.25_normal.inst.cfg index 4a193f9fe5..93a7a18764 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.25_normal.inst.cfg @@ -33,4 +33,3 @@ support_enable = True support_infill_rate = =0 if support_enable and support_structure == 'tree' else 20 support_pattern = lines support_z_distance = 0.19 -wall_thickness = 0.88 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.4_fast.inst.cfg index 41184ed396..f113656a4e 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.4_fast.inst.cfg @@ -34,6 +34,5 @@ support_enable = True support_infill_rate = =0 if support_enable and support_structure == 'tree' else 20 support_pattern = lines support_z_distance = 0.19 -wall_thickness = 1.2 speed_topbottom = =math.ceil(speed_print * 30 / 45) speed_infill = =math.ceil(speed_print * 45 / 45) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.4_normal.inst.cfg index a90ac4a92d..3f4651f529 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.4_normal.inst.cfg @@ -34,4 +34,3 @@ support_enable = True support_infill_rate = =0 if support_enable and support_structure == 'tree' else 20 support_pattern = lines support_z_distance = 0.19 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.6_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.6_fast.inst.cfg index cece9e3581..3f8c33b01c 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.6_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.6_fast.inst.cfg @@ -40,5 +40,4 @@ support_line_distance = 3.5333 support_pattern = lines support_z_distance = 0.21 top_bottom_thickness = 0.75 -wall_thickness = 1.06 speed_infill = =math.ceil(speed_print * 45 / 45) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.6_normal.inst.cfg index 8607215af8..055285ac60 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.6_normal.inst.cfg @@ -40,4 +40,3 @@ support_line_distance = 3.5333 support_pattern = lines support_z_distance = 0.21 top_bottom_thickness = 0.75 -wall_thickness = 1.06 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.8_normal.inst.cfg index 645897c076..25d9cf6700 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pc_0.8_normal.inst.cfg @@ -34,4 +34,3 @@ support_infill_rate = =0 if support_structure == 'tree' else 20 support_pattern = lines support_z_distance = 0.26 top_bottom_thickness = 1.2 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.25_normal.inst.cfg index 274e88148a..ea386d606c 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.25_normal.inst.cfg @@ -20,5 +20,4 @@ infill_sparse_density = 20 speed_layer_0 = 30 speed_print = 30 top_bottom_thickness = 0.72 -wall_thickness = 0.88 retraction_combing_max_distance = 8
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_draft.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_draft.inst.cfg index b3603991b1..47b9eae5e8 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_draft.inst.cfg @@ -22,7 +22,6 @@ speed_print = 45 speed_travel = 150 speed_wall = =math.ceil(speed_print * 40 / 45) top_bottom_thickness = 0.75 -wall_thickness = 0.7 speed_wall_0 = =math.ceil(speed_print * 30 / 45) speed_topbottom = =math.ceil(speed_print * 30 / 45) speed_wall_x = =math.ceil(speed_print * 40 / 45) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_fast.inst.cfg index 08d60d6018..9bee196642 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_fast.inst.cfg @@ -22,7 +22,6 @@ speed_print = 45 speed_travel = 150 speed_wall = =math.ceil(speed_print * 40 / 45) top_bottom_thickness = 0.75 -wall_thickness = 0.7 speed_wall_0 = =math.ceil(speed_print * 30 / 45) speed_topbottom = =math.ceil(speed_print * 30 / 45) speed_wall_x = =math.ceil(speed_print * 40 / 45) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_normal.inst.cfg index c86e206475..7e99b790ed 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.4_normal.inst.cfg @@ -21,5 +21,4 @@ speed_layer_0 = 30 speed_print = 45 speed_wall = =math.ceil(speed_print * 30 / 45) top_bottom_thickness = 0.8 -wall_thickness = 1.05 retraction_combing_max_distance = 8
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.6_normal.inst.cfg index 43cf222a39..3f72860e7f 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.6_normal.inst.cfg @@ -20,5 +20,4 @@ infill_sparse_density = 20 speed_layer_0 = 30 speed_print = 40 top_bottom_thickness = 1.2 -wall_thickness = 1.59 retraction_combing_max_distance = 8
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.8_normal.inst.cfg index de2df7dee3..6c337bf1d5 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_petg_0.8_normal.inst.cfg @@ -20,5 +20,4 @@ infill_sparse_density = 20 speed_layer_0 = 30 speed_print = 40 top_bottom_thickness = 1.2 -wall_thickness = 2.1 retraction_combing_max_distance = 8
\ No newline at end of file diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.25_normal.inst.cfg index 84442b895a..f561853992 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.25_normal.inst.cfg @@ -18,4 +18,3 @@ infill_sparse_density = 20 speed_layer_0 = =round(speed_print * 30 / 30) speed_print = 30 top_bottom_thickness = 0.72 -wall_thickness = 0.88 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_draft.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_draft.inst.cfg index 94562f422d..927fff72d8 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_draft.inst.cfg @@ -22,4 +22,3 @@ speed_topbottom = =math.ceil(speed_print * 30 / 60) speed_travel = 150 speed_wall = =math.ceil(speed_print * 50 / 60) top_bottom_thickness = 0.75 -wall_thickness = 0.7 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_fast.inst.cfg index 43a5cb6596..76d264ac80 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_fast.inst.cfg @@ -22,4 +22,3 @@ speed_topbottom = =math.ceil(speed_print * 30 / 60) speed_travel = 150 speed_wall = =math.ceil(speed_print * 50 / 60) top_bottom_thickness = 0.75 -wall_thickness = 0.7 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_high.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_high.inst.cfg index c7c7753cf2..3af455dca4 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_high.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_high.inst.cfg @@ -20,4 +20,3 @@ speed_layer_0 = =round(speed_print * 30 / 50) speed_print = 50 speed_topbottom = =math.ceil(speed_print * 20 / 50) top_bottom_thickness = 0.72 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_normal.inst.cfg index 2b3c24a912..e6c6d71737 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.4_normal.inst.cfg @@ -20,4 +20,3 @@ speed_layer_0 = =round(speed_print * 30 / 50) speed_print = 50 speed_topbottom = =math.ceil(speed_print * 20 / 50) top_bottom_thickness = 0.8 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.6_normal.inst.cfg index 8f3079c4f4..b4719e69db 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.6_normal.inst.cfg @@ -22,4 +22,3 @@ speed_topbottom = =math.ceil(speed_print * 20 / 55) speed_wall = =math.ceil(speed_print * 40 / 55) speed_wall_0 = =math.ceil(speed_print * 25 / 55) top_bottom_thickness = 1.2 -wall_thickness = 1.59 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.8_normal.inst.cfg index f7798a0293..e4f31c9fe1 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pla_0.8_normal.inst.cfg @@ -19,4 +19,3 @@ speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 speed_wall_0 = =math.ceil(speed_print * 25 / 40) top_bottom_thickness = 1.2 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.4_fast.inst.cfg index a7dad05ae9..9f7058912a 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.4_fast.inst.cfg @@ -63,6 +63,5 @@ support_xy_distance_overhang = =wall_line_width_0 support_z_distance = =layer_height * 2 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 0.76 speed_wall_x = =math.ceil(speed_print * 25 / 25) speed_infill = =math.ceil(speed_print * 25 / 25) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.4_normal.inst.cfg index 6f9612ff9a..961124229a 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.4_normal.inst.cfg @@ -63,4 +63,3 @@ support_xy_distance_overhang = =wall_line_width_0 support_z_distance = =layer_height * 2 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 0.76 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.6_draft.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.6_draft.inst.cfg index 7c94a57190..db506827db 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.6_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.6_draft.inst.cfg @@ -63,4 +63,3 @@ support_z_distance = =layer_height * 2 top_bottom_thickness = 1.1 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 1.14 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.6_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.6_fast.inst.cfg index 6e2a8960bd..eca5bdfd15 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.6_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.6_fast.inst.cfg @@ -63,6 +63,5 @@ support_z_distance = =layer_height * 2 top_bottom_thickness = 1.1 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 1.14 speed_wall_x = =math.ceil(speed_print * 25 / 25) speed_infill = =math.ceil(speed_print * 25 / 25) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.8_draft.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.8_draft.inst.cfg index b13fcb5572..0209e93e41 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.8_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.8_draft.inst.cfg @@ -64,4 +64,3 @@ support_z_distance = =layer_height * 2 top_bottom_thickness = 1.5 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 1.52 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.8_verydraft.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.8_verydraft.inst.cfg index 935c0bb603..7873dc5cac 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.8_verydraft.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_pp_0.8_verydraft.inst.cfg @@ -64,4 +64,3 @@ support_z_distance = =layer_height * 2 top_bottom_thickness = 1.5 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = 1.52 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.25_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.25_normal.inst.cfg index b3308686de..44f944a3d4 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.25_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.25_normal.inst.cfg @@ -18,4 +18,3 @@ infill_sparse_density = 20 speed_layer_0 = =round(speed_print * 30 / 30) speed_print = 30 top_bottom_thickness = 0.72 -wall_thickness = 0.88 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_draft.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_draft.inst.cfg index 4161bd3781..8090d369fc 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_draft.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_draft.inst.cfg @@ -22,4 +22,3 @@ speed_topbottom = =math.ceil(speed_print * 30 / 50) speed_travel = 150 speed_wall = =math.ceil(speed_print * 40 / 50) top_bottom_thickness = 0.75 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_fast.inst.cfg index b26340fdb2..dbec326472 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_fast.inst.cfg @@ -22,4 +22,3 @@ speed_topbottom = =math.ceil(speed_print * 30 / 40) speed_travel = 150 speed_wall = =math.ceil(speed_print * 30 / 40) top_bottom_thickness = 0.75 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_normal.inst.cfg index a4ee94c36c..cff856f97d 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.4_normal.inst.cfg @@ -21,4 +21,3 @@ speed_print = 40 speed_topbottom = =math.ceil(speed_print * 20 / 40) speed_wall = =math.ceil(speed_print * 30 / 40) top_bottom_thickness = 0.8 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.6_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.6_normal.inst.cfg index 173b551e8b..0ade828d53 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.6_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.6_normal.inst.cfg @@ -22,4 +22,3 @@ speed_topbottom = =math.ceil(speed_print * 20 / 50) speed_wall = =math.ceil(speed_print * 40 / 50) speed_wall_0 = =math.ceil(speed_print * 30 / 50) top_bottom_thickness = 1.2 -wall_thickness = 1.59 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.8_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.8_normal.inst.cfg index 8a5d70f1f7..f53fe84bb0 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.8_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_tpla_0.8_normal.inst.cfg @@ -19,4 +19,3 @@ speed_layer_0 = =round(speed_print * 30 / 40) speed_print = 40 speed_wall_0 = =math.ceil(speed_print * 25 / 40) top_bottom_thickness = 1.2 -wall_thickness = 2.1 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.25_high.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.25_high.inst.cfg index 35654230e4..9a3f92105a 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.25_high.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.25_high.inst.cfg @@ -39,5 +39,4 @@ support_infill_rate = =0 if support_enable and support_structure == 'tree' else support_xy_distance = 0.6 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 0.88 speed_infill = =math.ceil(speed_print * 40 / 40) diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.4_normal.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.4_normal.inst.cfg index 35a2fd03db..93b84c7168 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.4_normal.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.4_normal.inst.cfg @@ -37,4 +37,3 @@ support_infill_rate = =0 if support_enable and support_structure == 'tree' else support_xy_distance = 0.65 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1.05 diff --git a/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.6_fast.inst.cfg b/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.6_fast.inst.cfg index f7fbb956b7..6637e06deb 100644 --- a/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.6_fast.inst.cfg +++ b/resources/quality/ultimaker2_plus_connect/um2pc_tpu_0.6_fast.inst.cfg @@ -40,5 +40,4 @@ support_infill_rate = =0 if support_structure == 'tree' else 25 support_xy_distance = 0.7 support_z_distance = =layer_height * 2 top_bottom_thickness = 1.2 -wall_thickness = 1.14 speed_infill = =math.ceil(speed_print * 45 / 45) diff --git a/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg index bba792d870..82eef143ca 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_ABS_Normal_Quality.inst.cfg @@ -17,4 +17,3 @@ infill_overlap = =0 if infill_sparse_density > 80 else 15 material_final_print_temperature = =material_print_temperature - 5 retraction_prime_speed = 25 speed_topbottom = =math.ceil(speed_print * 30 / 55) -wall_thickness = 0.92 diff --git a/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg index df61c040ae..559c3fdbb8 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_CPE_Normal_Quality.inst.cfg @@ -16,4 +16,3 @@ retraction_extrusion_window = 0.5 speed_infill = =math.ceil(speed_print * 40 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) top_bottom_thickness = 0.8 -wall_thickness = 0.92 diff --git a/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg index 1eaab8a586..21e09ea09b 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_PC_Normal_Quality.inst.cfg @@ -49,4 +49,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker3/um3_aa0.25_PETG_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_PETG_Normal_Quality.inst.cfg index c09c172357..87af117ef0 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_PETG_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_PETG_Normal_Quality.inst.cfg @@ -16,7 +16,6 @@ retraction_extrusion_window = 0.5 speed_infill = =math.ceil(speed_print * 40 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) top_bottom_thickness = 0.8 -wall_thickness = 0.92 material_print_temperature = =default_material_print_temperature - 5 retraction_combing_max_distance = 8 retraction_combing = all diff --git a/resources/quality/ultimaker3/um3_aa0.25_PLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_PLA_Normal_Quality.inst.cfg index 1287a5b43b..82ddc1ae95 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_PLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_PLA_Normal_Quality.inst.cfg @@ -33,4 +33,3 @@ top_bottom_thickness = 0.72 travel_avoid_distance = 0.4 wall_0_inset = 0.015 wall_0_wipe_dist = 0.25 -wall_thickness = 0.7 diff --git a/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg index fe621363d4..50e988afa2 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_PP_Normal_Quality.inst.cfg @@ -51,4 +51,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker3/um3_aa0.25_TPLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.25_TPLA_Normal_Quality.inst.cfg index 0da1ac1283..2ec6072c70 100644 --- a/resources/quality/ultimaker3/um3_aa0.25_TPLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.25_TPLA_Normal_Quality.inst.cfg @@ -32,4 +32,3 @@ speed_wall_0 = =math.ceil(speed_print * 20 / 30) top_bottom_thickness = 0.72 wall_0_inset = 0.015 wall_0_wipe_dist = 0.25 -wall_thickness = 0.7 diff --git a/resources/quality/ultimaker3/um3_aa0.4_ABS_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_ABS_Draft_Print.inst.cfg index 4a0278c7c2..7094d0635e 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_ABS_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_ABS_Draft_Print.inst.cfg @@ -24,4 +24,3 @@ speed_layer_0 = =math.ceil(speed_print * 20 / 60) speed_topbottom = =math.ceil(speed_print * 35 / 60) speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) -wall_thickness = 1 diff --git a/resources/quality/ultimaker3/um3_aa0.4_BAM_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_BAM_Draft_Print.inst.cfg index b302bbee32..f6a00a7527 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_BAM_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_BAM_Draft_Print.inst.cfg @@ -26,7 +26,6 @@ speed_topbottom = =math.ceil(speed_print * 35 / 70) speed_wall = =math.ceil(speed_print * 50 / 70) speed_wall_0 = =math.ceil(speed_wall * 35 / 50) top_bottom_thickness = 1 -wall_thickness = 1 support_brim_enable = True support_interface_enable = True support_interface_density = =min(extruderValues('material_surface_energy')) diff --git a/resources/quality/ultimaker3/um3_aa0.4_BAM_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_BAM_Fast_Print.inst.cfg index e74bf83698..e2b621c8d4 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_BAM_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_BAM_Fast_Print.inst.cfg @@ -25,7 +25,6 @@ speed_topbottom = =math.ceil(speed_print * 30 / 80) speed_wall = =math.ceil(speed_print * 40 / 80) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) top_bottom_thickness = 1 -wall_thickness = 1 support_brim_enable = True support_interface_enable = True support_interface_density = =min(extruderValues('material_surface_energy')) diff --git a/resources/quality/ultimaker3/um3_aa0.4_BAM_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_BAM_Normal_Quality.inst.cfg index da5b43de8a..e837c5cd9c 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_BAM_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_BAM_Normal_Quality.inst.cfg @@ -34,4 +34,3 @@ support_offset = 2 support_pattern = triangles support_infill_rate = =10 if support_enable and support_structure == 'normal' else 0 if support_enable and support_structure == 'tree' else 10 top_bottom_thickness = 1 -wall_thickness = 1 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg index 6175c54619..737d4683a5 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg @@ -43,4 +43,3 @@ speed_wall_0 = =math.ceil(speed_wall * 40 / 50) support_bottom_distance = =support_z_distance support_z_distance = =layer_height wall_0_inset = 0 -wall_thickness = 1 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg index 413b3da609..1379433040 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg @@ -22,4 +22,3 @@ speed_layer_0 = =math.ceil(speed_print * 20 / 60) speed_topbottom = =math.ceil(speed_print * 35 / 60) speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) -wall_thickness = 1 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg index c2129652ee..0eb741335b 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg @@ -59,4 +59,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg index 1b3fc14f06..1cf03d3cc7 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg @@ -57,4 +57,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg index c704d6ca5d..8b167fe35d 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg @@ -59,4 +59,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg index 2964528789..cb176dbb96 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg @@ -56,4 +56,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PETG_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PETG_Draft_Print.inst.cfg index 5ef579300e..971cb3cc1d 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PETG_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PETG_Draft_Print.inst.cfg @@ -22,6 +22,5 @@ speed_layer_0 = =math.ceil(speed_print * 20 / 60) speed_topbottom = =math.ceil(speed_print * 35 / 60) speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) -wall_thickness = 1 retraction_combing_max_distance = 8 retraction_combing = all diff --git a/resources/quality/ultimaker3/um3_aa0.4_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PLA_Draft_Print.inst.cfg index 818e01f742..436bcc487e 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PLA_Draft_Print.inst.cfg @@ -25,4 +25,3 @@ speed_topbottom = =math.ceil(speed_print * 40 / 70) speed_wall = =math.ceil(speed_print * 55 / 70) speed_wall_0 = =math.ceil(speed_wall * 45 / 50) top_bottom_thickness = 1 -wall_thickness = 1 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PLA_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PLA_Fast_Print.inst.cfg index 22a6b35322..7122388645 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PLA_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PLA_Fast_Print.inst.cfg @@ -24,4 +24,3 @@ speed_topbottom = =math.ceil(speed_print * 30 / 80) speed_wall = =math.ceil(speed_print * 40 / 80) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) top_bottom_thickness = 1 -wall_thickness = 1 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PLA_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PLA_High_Quality.inst.cfg index bfc4c38c8c..d51d53a932 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PLA_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PLA_High_Quality.inst.cfg @@ -26,4 +26,3 @@ speed_layer_0 = =math.ceil(speed_print * 20 / 60) speed_topbottom = =math.ceil(speed_print * 30 / 60) speed_wall = =math.ceil(speed_print * 30 / 60) top_bottom_thickness = 1 -wall_thickness = 1 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PLA_Normal_Quality.inst.cfg index c47f454305..e8c38d5114 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PLA_Normal_Quality.inst.cfg @@ -22,4 +22,3 @@ prime_tower_enable = False skin_overlap = 10 speed_layer_0 = =math.ceil(speed_print * 20 / 70) top_bottom_thickness = 1 -wall_thickness = 1 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PP_Draft_Print.inst.cfg index 3d74fc55b3..532a8453cd 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PP_Draft_Print.inst.cfg @@ -57,4 +57,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PP_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PP_Fast_Print.inst.cfg index 70935140fb..6f6819e513 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PP_Fast_Print.inst.cfg @@ -57,4 +57,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1.1 wall_0_inset = 0 -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker3/um3_aa0.4_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PP_Normal_Quality.inst.cfg index 8c84e4787c..65f9bfa7de 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_PP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_PP_Normal_Quality.inst.cfg @@ -56,4 +56,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1 wall_0_inset = 0 -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPLA_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPLA_Draft_Print.inst.cfg index b3b71ee573..024e1469ba 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPLA_Draft_Print.inst.cfg @@ -31,4 +31,3 @@ speed_topbottom = =math.ceil(speed_print * 25 / 50) speed_wall = =math.ceil(speed_print * 36 / 50) speed_wall_0 = =math.ceil(speed_print * 26 / 50) top_bottom_thickness = 1.2 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPLA_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPLA_Fast_Print.inst.cfg index 71f674616f..e45cfb4b06 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPLA_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPLA_Fast_Print.inst.cfg @@ -26,5 +26,3 @@ speed_topbottom = =math.ceil(speed_print * 35 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) top_bottom_thickness = 1.2 -wall_thickness = 1.23 - diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPLA_Normal_Quality.inst.cfg index 42de88a562..b41f591f2e 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPLA_Normal_Quality.inst.cfg @@ -28,5 +28,3 @@ speed_topbottom = =math.ceil(speed_print * 35 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) top_bottom_thickness = 1.2 -wall_thickness = 1.23 - diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg index 370f636bc4..c72deb5540 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg @@ -58,4 +58,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 0.7 travel_avoid_distance = 1.5 wall_0_inset = 0 -wall_thickness = 0.76 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg index d7992a20b9..f44c8e7955 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg @@ -59,4 +59,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 0.7 travel_avoid_distance = 1.5 wall_0_inset = 0 -wall_thickness = 0.76 diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg index 59f0cae71d..d2c6c02bce 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg @@ -56,4 +56,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 0.7 travel_avoid_distance = 1.5 wall_0_inset = 0 -wall_thickness = 0.76 diff --git a/resources/quality/ultimaker3/um3_aa0.8_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PLA_Draft_Print.inst.cfg index added0b5ad..312157bdea 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PLA_Draft_Print.inst.cfg @@ -34,4 +34,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker3/um3_aa0.8_PLA_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PLA_Superdraft_Print.inst.cfg index 0c55551453..708ddd4ff5 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PLA_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PLA_Superdraft_Print.inst.cfg @@ -36,4 +36,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker3/um3_aa0.8_PLA_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PLA_Verydraft_Print.inst.cfg index 00bdc6c219..3705cc94ad 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PLA_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PLA_Verydraft_Print.inst.cfg @@ -35,4 +35,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg index 16093951d2..23baa1d8af 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PP_Draft_Print.inst.cfg @@ -40,4 +40,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.6 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.6 diff --git a/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg index 9a2b73fa91..8981a40303 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PP_Superdraft_Print.inst.cfg @@ -40,4 +40,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.6 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.6 diff --git a/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg index d08659c036..272485845b 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_PP_Verydraft_Print.inst.cfg @@ -40,4 +40,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.6 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.6 diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPLA_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPLA_Draft_Print.inst.cfg index 1f86a66c38..eb59d69f6c 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPLA_Draft_Print.inst.cfg @@ -29,4 +29,3 @@ speed_print = 45 support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 6 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPLA_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPLA_Superdraft_Print.inst.cfg index 1c144290b4..b8eaa7d061 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPLA_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPLA_Superdraft_Print.inst.cfg @@ -34,4 +34,3 @@ speed_wall_0 = =math.ceil(speed_print * 20 / 30) support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x
\ No newline at end of file diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPLA_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPLA_Verydraft_Print.inst.cfg index 31f23166f0..595ab7098b 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPLA_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPLA_Verydraft_Print.inst.cfg @@ -35,5 +35,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x - diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg index f0bc86da9f..969441316a 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Draft_Print.inst.cfg @@ -50,4 +50,3 @@ switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.2 travel_avoid_distance = 1.5 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.3 diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg index 73ae3a5564..063485cb2d 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Superdraft_Print.inst.cfg @@ -51,4 +51,3 @@ switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.2 travel_avoid_distance = 1.5 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.3 diff --git a/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg index af1cbe6051..11015d0af0 100644 --- a/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.8_TPU_Verydraft_Print.inst.cfg @@ -50,4 +50,3 @@ switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.2 travel_avoid_distance = 1.5 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.3 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.25_ABS_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.25_ABS_Normal_Quality.inst.cfg index f3cc0937a0..777dc63222 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.25_ABS_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.25_ABS_Normal_Quality.inst.cfg @@ -16,4 +16,3 @@ cool_fan_speed = 40 infill_overlap = =0 if infill_sparse_density > 80 else 15 material_final_print_temperature = =material_print_temperature - 5 speed_topbottom = =math.ceil(speed_print * 30 / 55) -wall_thickness = 0.92 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.25_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.25_CPE_Normal_Quality.inst.cfg index fc2ae7e17f..1d62998c14 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.25_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.25_CPE_Normal_Quality.inst.cfg @@ -17,4 +17,3 @@ retraction_extrusion_window = 0.5 speed_infill = =math.ceil(speed_print * 40 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) top_bottom_thickness = 0.8 -wall_thickness = 0.92
\ No newline at end of file diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.25_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.25_PC_Normal_Quality.inst.cfg index 59423682f1..e39774bf16 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.25_PC_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.25_PC_Normal_Quality.inst.cfg @@ -47,4 +47,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.25_PETG_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.25_PETG_Normal_Quality.inst.cfg index 34fa0d7c84..f65f3b2043 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.25_PETG_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.25_PETG_Normal_Quality.inst.cfg @@ -17,7 +17,6 @@ retraction_extrusion_window = 0.5 speed_infill = =math.ceil(speed_print * 40 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) top_bottom_thickness = 0.8 -wall_thickness = 0.92 initial_layer_line_width_factor = 100 material_print_temperature = =default_material_print_temperature - 5
\ No newline at end of file diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.25_PLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.25_PLA_Normal_Quality.inst.cfg index 5f51f32b6a..74350d9509 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.25_PLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.25_PLA_Normal_Quality.inst.cfg @@ -33,4 +33,3 @@ top_bottom_thickness = 0.72 travel_avoid_distance = 0.4 wall_0_inset = 0.015 wall_0_wipe_dist = 0.25 -wall_thickness = 0.7 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.25_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.25_PP_Normal_Quality.inst.cfg index 2f6c5f2888..7b335ddd02 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.25_PP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.25_PP_Normal_Quality.inst.cfg @@ -50,4 +50,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.25_TPLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.25_TPLA_Normal_Quality.inst.cfg index 447d0412aa..faf54f8f77 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.25_TPLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.25_TPLA_Normal_Quality.inst.cfg @@ -32,5 +32,3 @@ speed_wall_0 = =math.ceil(speed_print * 20 / 30) top_bottom_thickness = 0.72 wall_0_inset = 0.015 wall_0_wipe_dist = 0.25 -wall_thickness = 0.7 - diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_ABS_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_ABS_Draft_Print.inst.cfg index 9644732c0c..69ee9155fc 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_ABS_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_ABS_Draft_Print.inst.cfg @@ -24,9 +24,6 @@ speed_layer_0 = 10 speed_topbottom = =math.ceil(speed_print * 35 / 60) speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) -wall_thickness = 1 - - speed_infill = =math.ceil(speed_print * 50 / 60) raft_airgap = 0.15 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Draft_Print.inst.cfg index 4d33d3f8e2..79d9d27df7 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Draft_Print.inst.cfg @@ -26,7 +26,6 @@ speed_topbottom = =math.ceil(speed_print * 35 / 70) speed_wall = =math.ceil(speed_print * 50 / 70) speed_wall_0 = =math.ceil(speed_wall * 35 / 50) top_bottom_thickness = 1 -wall_thickness = 1 support_brim_enable = True support_interface_enable = True support_interface_density = =min(extruderValues('material_surface_energy')) diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Fast_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Fast_Print.inst.cfg index a803e13f20..d9153d20b1 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Fast_Print.inst.cfg @@ -25,7 +25,6 @@ speed_topbottom = =math.ceil(speed_print * 30 / 80) speed_wall = =math.ceil(speed_print * 40 / 80) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) top_bottom_thickness = 1 -wall_thickness = 1 support_brim_enable = True support_interface_enable = True support_interface_density = =min(extruderValues('material_surface_energy')) diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Normal_Quality.inst.cfg index b3ef4abe94..2d7f889236 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_Normal_Quality.inst.cfg @@ -35,4 +35,3 @@ support_offset = 2 support_pattern = triangles support_infill_rate = =10 if support_enable and support_structure == 'normal' else 0 if support_enable and support_structure == 'tree' else 10 top_bottom_thickness = 1 -wall_thickness = 1 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_VeryDraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_VeryDraft_Print.inst.cfg index 757743c70b..c732cb2deb 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_VeryDraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_BAM_VeryDraft_Print.inst.cfg @@ -26,7 +26,6 @@ speed_topbottom = =math.ceil(speed_print * 35 / 70) speed_wall = =math.ceil(speed_print * 50 / 70) speed_wall_0 = =math.ceil(speed_wall * 35 / 50) top_bottom_thickness = 1 -wall_thickness = 1 support_brim_enable = True support_interface_enable = True support_interface_density = =min(extruderValues('material_surface_energy')) diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_CPEP_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_CPEP_Draft_Print.inst.cfg index 1aad4c498f..78e6cee580 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_CPEP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_CPEP_Draft_Print.inst.cfg @@ -43,5 +43,3 @@ speed_wall_0 = =math.ceil(speed_wall * 40 / 50) support_bottom_distance = =support_z_distance support_z_distance = =layer_height wall_0_inset = 0 -wall_thickness = 1 - diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_CPE_Draft_Print.inst.cfg index 7c42d02ada..8b4cdca8f1 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_CPE_Draft_Print.inst.cfg @@ -23,8 +23,6 @@ speed_layer_0 = =math.ceil(speed_print * 20 / 60) speed_topbottom = =math.ceil(speed_print * 35 / 60) speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) -wall_thickness = 1 - infill_pattern = ='zigzag' if infill_sparse_density > 80 else 'triangles' speed_infill = =math.ceil(speed_print * 50 / 60) diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Draft_Print.inst.cfg index f4bb4ba024..71ae63c975 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Draft_Print.inst.cfg @@ -56,5 +56,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 - -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Fast_Print.inst.cfg index ece85f2168..37a0599ee7 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Fast_Print.inst.cfg @@ -55,5 +55,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 - -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_High_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_High_Quality.inst.cfg index 0caf9b1cd6..363a8ab0b7 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_High_Quality.inst.cfg @@ -57,5 +57,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 - -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Normal_Quality.inst.cfg index 751942b0f9..81b352fe8c 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PC_Normal_Quality.inst.cfg @@ -55,5 +55,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 - -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PETG_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PETG_Draft_Print.inst.cfg index bff77a1390..0fd77e24b3 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PETG_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PETG_Draft_Print.inst.cfg @@ -22,8 +22,6 @@ speed_layer_0 = =math.ceil(speed_print * 20 / 60) speed_topbottom = =math.ceil(speed_print * 35 / 60) speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) -wall_thickness = 1 - infill_pattern = ='zigzag' if infill_sparse_density > 80 else 'triangles' speed_infill = =math.ceil(speed_print * 50 / 60) diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Draft_Print.inst.cfg index d5a5be70f8..a4b3fb3380 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Draft_Print.inst.cfg @@ -26,8 +26,6 @@ speed_topbottom = =math.ceil(speed_print * 40 / 70) speed_wall = =math.ceil(speed_print * 55 / 70) speed_wall_0 = =math.ceil(speed_wall * 45 / 50) top_bottom_thickness = 0.8 -wall_thickness = 0.8 - jerk_travel = 50 infill_sparse_density = 15 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Print.inst.cfg index d274eaffd3..2f89be38f9 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Fast_Print.inst.cfg @@ -25,8 +25,6 @@ speed_topbottom = =math.ceil(speed_print * 35 / 70) speed_wall = =math.ceil(speed_print * 45 / 70) speed_wall_0 = =math.ceil(speed_wall * 35 / 70) top_bottom_thickness = 1 -wall_thickness = 1 - jerk_travel = 50 layer_height_0 = 0.2 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_High_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_High_Quality.inst.cfg index 2f54d272fe..d80d8427c9 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_High_Quality.inst.cfg @@ -27,8 +27,6 @@ speed_layer_0 = 10 speed_topbottom = =math.ceil(speed_print * 35 / 50) speed_wall = =math.ceil(speed_print * 35 / 50) top_bottom_thickness = 1 -wall_thickness = 1 - jerk_travel = 50 layer_height_0 = 0.2 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Quality.inst.cfg index 2c23a4ae71..20025a8c0b 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_Normal_Quality.inst.cfg @@ -23,8 +23,6 @@ retraction_prime_speed = =retraction_speed skin_overlap = 10 speed_layer_0 = 10 top_bottom_thickness = 1 -wall_thickness = 1 - jerk_travel = 50 layer_height_0 = 0.2 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_VeryDraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_VeryDraft_Print.inst.cfg index 362d9ef5b9..fd5e5a7217 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_VeryDraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PLA_VeryDraft_Print.inst.cfg @@ -37,8 +37,6 @@ prime_tower_enable = False retraction_prime_speed = =retraction_speed skin_edge_support_thickness = =0.9 if infill_sparse_density < 30 else 0 skin_overlap = 20 - -wall_thickness = =line_width * 3 top_bottom_thickness = 0.9 infill_pattern = ='zigzag' if infill_sparse_density > 80 else 'triangles' diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Draft_Print.inst.cfg index b59e2537e3..66aed15373 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Draft_Print.inst.cfg @@ -53,5 +53,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 - -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Fast_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Fast_Print.inst.cfg index 3b3ff5b463..a600281dc4 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Fast_Print.inst.cfg @@ -54,5 +54,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1.1 wall_0_inset = 0 - -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Normal_Quality.inst.cfg index 2530ca9490..37a9293976 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_PP_Normal_Quality.inst.cfg @@ -56,5 +56,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1 wall_0_inset = 0 - -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Draft_Print.inst.cfg index a3d1d1f255..d212ce86e6 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Draft_Print.inst.cfg @@ -32,5 +32,3 @@ speed_topbottom = =math.ceil(speed_print * 25 / 50) speed_wall = =math.ceil(speed_print * 36 / 50) speed_wall_0 = =math.ceil(speed_print * 26 / 50) top_bottom_thickness = 1.2 - -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Print.inst.cfg index cb2d019fdc..9cf21612a2 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Fast_Print.inst.cfg @@ -27,5 +27,3 @@ speed_topbottom = =math.ceil(speed_print * 35 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) top_bottom_thickness = 1.2 - -wall_thickness = 1.23 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_High_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_High_Quality.inst.cfg index 32ae7fbd53..14dcd79a29 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_High_Quality.inst.cfg @@ -28,7 +28,5 @@ speed_topbottom = =math.ceil(speed_print * 35 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) top_bottom_thickness = 1.2 -wall_thickness = 1.23 - layer_height_0 = 0.2 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Quality.inst.cfg index a81a3b9f08..126cf13670 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_Normal_Quality.inst.cfg @@ -29,5 +29,3 @@ speed_topbottom = =math.ceil(speed_print * 35 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) top_bottom_thickness = 1.2 -wall_thickness = 1.23 - diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_VeryDraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_VeryDraft_Print.inst.cfg index bda8ad2775..7a67e10783 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_VeryDraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPLA_VeryDraft_Print.inst.cfg @@ -37,8 +37,6 @@ prime_tower_enable = False retraction_prime_speed = =retraction_speed skin_edge_support_thickness = =0.9 if infill_sparse_density < 30 else 0 skin_overlap = 20 - -wall_thickness = =line_width * 3 top_bottom_thickness = 1.2 infill_pattern = ='zigzag' if infill_sparse_density > 80 else 'triangles' diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Draft_Print.inst.cfg index 8b0b8abf0c..b20cc2eaef 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Draft_Print.inst.cfg @@ -55,5 +55,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 0.7 travel_avoid_distance = 1.5 wall_0_inset = 0 - -wall_thickness = 0.76 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Fast_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Fast_Print.inst.cfg index 0f4a416273..849763dd0d 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Fast_Print.inst.cfg @@ -55,6 +55,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 0.7 travel_avoid_distance = 1.5 wall_0_inset = 0 - -wall_thickness = 0.76 - diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Normal_Quality.inst.cfg index 2b0b1c1720..5b2d81f30e 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.4_TPU_Normal_Quality.inst.cfg @@ -54,6 +54,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 0.7 travel_avoid_distance = 1.5 wall_0_inset = 0 - -wall_thickness = 0.76 - diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Draft_Print.inst.cfg index 279e4f4beb..ab1d37a0ed 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Draft_Print.inst.cfg @@ -25,7 +25,6 @@ prime_tower_enable = True support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x retract_at_layer_change = False speed_print = 45 speed_topbottom = =math.ceil(speed_print * 35 / 45) diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Superdraft_Print.inst.cfg index 9c6ec154fe..01bec374a6 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Superdraft_Print.inst.cfg @@ -26,7 +26,6 @@ raft_margin = 10 support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x retract_at_layer_change = False speed_print = 45 speed_topbottom = =math.ceil(speed_print * 35 / 45) diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Verydraft_Print.inst.cfg index 6ef378376d..86734f57a5 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_PLA_Verydraft_Print.inst.cfg @@ -25,7 +25,6 @@ prime_tower_enable = True support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x retract_at_layer_change = False speed_print = 45 speed_topbottom = =math.ceil(speed_print * 35 / 45) diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Draft_Print.inst.cfg index 0350a1836f..4ae29a2e78 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Draft_Print.inst.cfg @@ -39,4 +39,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.6 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.6 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Superdraft_Print.inst.cfg index cfe751f38b..690ae20b68 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Superdraft_Print.inst.cfg @@ -39,4 +39,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.6 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.6 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Verydraft_Print.inst.cfg index 58a7cea554..ed4ca081cb 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_PP_Verydraft_Print.inst.cfg @@ -38,4 +38,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.6 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.6 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Draft_Print.inst.cfg index 91e9ac5632..d8f7e4e236 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Draft_Print.inst.cfg @@ -32,4 +32,3 @@ speed_wall_0 = =round(speed_print * 35 / 45) support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 6 -wall_thickness = =wall_line_width_0 + wall_line_width_x
\ No newline at end of file diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Superdraft_Print.inst.cfg index db12dff2f0..f9a23df7dc 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Superdraft_Print.inst.cfg @@ -34,4 +34,3 @@ speed_wall_0 = =math.ceil(speed_print * 20 / 30) support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Verydraft_Print.inst.cfg index a97439f98c..31d43d6d1a 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPLA_Verydraft_Print.inst.cfg @@ -35,4 +35,3 @@ speed_wall_0 = =math.ceil(speed_print * 20 / 35) support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Draft_Print.inst.cfg index 47cb0623eb..bc3464b305 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Draft_Print.inst.cfg @@ -47,5 +47,4 @@ switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.2 travel_avoid_distance = 1.5 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.3 jerk_travel = 50 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Superdraft_Print.inst.cfg index 1155e46024..bbbc40dd0d 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Superdraft_Print.inst.cfg @@ -48,5 +48,4 @@ switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.2 travel_avoid_distance = 1.5 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.3 jerk_travel = 50 diff --git a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Verydraft_Print.inst.cfg index ab5562474d..1eb27c3e9a 100644 --- a/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_aa0.8_TPU_Verydraft_Print.inst.cfg @@ -47,5 +47,4 @@ switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.2 travel_avoid_distance = 1.5 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.3 jerk_travel = 50 diff --git a/resources/quality/ultimaker_s3/um_s3_cc0.4_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_cc0.4_PLA_Draft_Print.inst.cfg index c354eea9e3..6ce68aea6b 100644 --- a/resources/quality/ultimaker_s3/um_s3_cc0.4_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_cc0.4_PLA_Draft_Print.inst.cfg @@ -35,4 +35,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s3/um_s3_cc0.4_PLA_Fast_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_cc0.4_PLA_Fast_Print.inst.cfg index a0778a7f88..a6cc519d08 100644 --- a/resources/quality/ultimaker_s3/um_s3_cc0.4_PLA_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_cc0.4_PLA_Fast_Print.inst.cfg @@ -35,4 +35,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s3/um_s3_cc0.6_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_cc0.6_PLA_Draft_Print.inst.cfg index c78b060dee..7c660d8d67 100644 --- a/resources/quality/ultimaker_s3/um_s3_cc0.6_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_cc0.6_PLA_Draft_Print.inst.cfg @@ -35,4 +35,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s3/um_s3_cc0.6_PLA_Fast_Print.inst.cfg b/resources/quality/ultimaker_s3/um_s3_cc0.6_PLA_Fast_Print.inst.cfg index 031db016b6..7cb6a071fb 100644 --- a/resources/quality/ultimaker_s3/um_s3_cc0.6_PLA_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s3/um_s3_cc0.6_PLA_Fast_Print.inst.cfg @@ -35,4 +35,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg index c1d936a7a7..681eae2250 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_ABS_Normal_Quality.inst.cfg @@ -16,4 +16,3 @@ cool_fan_speed = 40 infill_overlap = =0 if infill_sparse_density > 80 else 15 material_final_print_temperature = =material_print_temperature - 5 speed_topbottom = =math.ceil(speed_print * 30 / 55) -wall_thickness = 0.92 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg index 761a361df3..ec7975921a 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_CPE_Normal_Quality.inst.cfg @@ -17,4 +17,3 @@ retraction_extrusion_window = 0.5 speed_infill = =math.ceil(speed_print * 40 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) top_bottom_thickness = 0.8 -wall_thickness = 0.92
\ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_PC_Normal_Quality.inst.cfg index 2b6121e9ee..2e238eba22 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_PC_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_PC_Normal_Quality.inst.cfg @@ -47,4 +47,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_PETG_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_PETG_Normal_Quality.inst.cfg index d81ae5f88e..be138a72e1 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_PETG_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_PETG_Normal_Quality.inst.cfg @@ -17,7 +17,6 @@ retraction_extrusion_window = 0.5 speed_infill = =math.ceil(speed_print * 40 / 55) speed_topbottom = =math.ceil(speed_print * 30 / 55) top_bottom_thickness = 0.8 -wall_thickness = 0.92 initial_layer_line_width_factor = 100 material_print_temperature = =default_material_print_temperature - 5
\ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_PLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_PLA_Normal_Quality.inst.cfg index 621d837b92..d47272bbf6 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_PLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_PLA_Normal_Quality.inst.cfg @@ -33,4 +33,3 @@ top_bottom_thickness = 0.72 travel_avoid_distance = 0.4 wall_0_inset = 0.015 wall_0_wipe_dist = 0.25 -wall_thickness = 0.7 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg index 9870b07ab4..afd70b7318 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_PP_Normal_Quality.inst.cfg @@ -50,4 +50,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1 travel_avoid_distance = 3 wall_0_inset = 0 -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.25_TPLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.25_TPLA_Normal_Quality.inst.cfg index e4aa517abb..4be629314e 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.25_TPLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.25_TPLA_Normal_Quality.inst.cfg @@ -32,5 +32,3 @@ speed_wall_0 = =math.ceil(speed_print * 20 / 30) top_bottom_thickness = 0.72 wall_0_inset = 0.015 wall_0_wipe_dist = 0.25 -wall_thickness = 0.7 - diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print.inst.cfg index d6ef41abe1..c6d0ff9985 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_ABS_Draft_Print.inst.cfg @@ -24,6 +24,5 @@ speed_layer_0 = 10 speed_topbottom = =math.ceil(speed_print * 35 / 60) speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) -wall_thickness = 1 speed_infill = =math.ceil(speed_print * 50 / 60) raft_airgap = 0.15 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Draft_Print.inst.cfg index 04353d64f9..893c500797 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Draft_Print.inst.cfg @@ -26,7 +26,6 @@ speed_topbottom = =math.ceil(speed_print * 35 / 70) speed_wall = =math.ceil(speed_print * 50 / 70) speed_wall_0 = =math.ceil(speed_wall * 35 / 50) top_bottom_thickness = 1 -wall_thickness = 1 support_brim_enable = True support_interface_enable = True support_interface_density = =min(extruderValues('material_surface_energy')) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Fast_Print.inst.cfg index c1bb6be22f..df7189fbb8 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Fast_Print.inst.cfg @@ -25,7 +25,6 @@ speed_topbottom = =math.ceil(speed_print * 30 / 80) speed_wall = =math.ceil(speed_print * 40 / 80) speed_wall_0 = =math.ceil(speed_wall * 30 / 40) top_bottom_thickness = 1 -wall_thickness = 1 support_brim_enable = True support_interface_enable = True support_interface_density = =min(extruderValues('material_surface_energy')) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Normal_Quality.inst.cfg index 3e70bcacaf..f350d12cae 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_Normal_Quality.inst.cfg @@ -35,4 +35,3 @@ support_offset = 2 support_pattern = triangles support_infill_rate = =10 if support_enable and support_structure == 'normal' else 0 if support_enable and support_structure == 'tree' else 10 top_bottom_thickness = 1 -wall_thickness = 1 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_VeryDraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_VeryDraft_Print.inst.cfg index f4528b7fb8..936d157139 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_VeryDraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_BAM_VeryDraft_Print.inst.cfg @@ -26,7 +26,6 @@ speed_topbottom = =math.ceil(speed_print * 35 / 70) speed_wall = =math.ceil(speed_print * 50 / 70) speed_wall_0 = =math.ceil(speed_wall * 35 / 50) top_bottom_thickness = 1 -wall_thickness = 1 support_brim_enable = True support_interface_enable = True support_interface_density = =min(extruderValues('material_surface_energy')) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPEP_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPEP_Draft_Print.inst.cfg index 26dc7ea9c3..8ddf41fbea 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPEP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPEP_Draft_Print.inst.cfg @@ -43,5 +43,3 @@ speed_wall_0 = =math.ceil(speed_wall * 40 / 50) support_bottom_distance = =support_z_distance support_z_distance = =layer_height wall_0_inset = 0 -wall_thickness = 1 - diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg index 3f3ce3ce79..56924e319a 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_CPE_Draft_Print.inst.cfg @@ -25,8 +25,5 @@ speed_topbottom = =math.ceil(speed_print * 35 / 60) speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) top_thickness = =0.8 if infill_sparse_density < 30 and skin_edge_support_thickness == 0.8 else top_bottom_thickness -wall_thickness = 1 - - infill_pattern = ='zigzag' if infill_sparse_density > 80 else 'triangles' speed_infill = =math.ceil(speed_print * 50 / 60) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Draft_Print.inst.cfg index 601d1164fd..f90cab6aee 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Draft_Print.inst.cfg @@ -55,4 +55,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Fast_Print.inst.cfg index cad4e25f95..3222a33386 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Fast_Print.inst.cfg @@ -55,4 +55,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_High_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_High_Quality.inst.cfg index 6cc4d15e73..027b93ca14 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_High_Quality.inst.cfg @@ -57,5 +57,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 - -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Normal_Quality.inst.cfg index 093a04b8a2..9b98b10d72 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PC_Normal_Quality.inst.cfg @@ -55,5 +55,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 - -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PETG_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PETG_Draft_Print.inst.cfg index 2d39086d6f..344ad9108c 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PETG_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PETG_Draft_Print.inst.cfg @@ -24,8 +24,6 @@ speed_topbottom = =math.ceil(speed_print * 35 / 60) speed_wall = =math.ceil(speed_print * 45 / 60) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) top_thickness = =0.8 if infill_sparse_density < 30 and skin_edge_support_thickness == 0.8 else top_bottom_thickness -wall_thickness = 1 - infill_pattern = ='zigzag' if infill_sparse_density > 80 else 'triangles' speed_infill = =math.ceil(speed_print * 50 / 60) initial_layer_line_width_factor = 100 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Draft_Print.inst.cfg index f339aa3988..d057a8a057 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Draft_Print.inst.cfg @@ -27,8 +27,6 @@ speed_topbottom = =math.ceil(speed_print * 40 / 70) speed_wall = =math.ceil(speed_print * 55 / 70) speed_wall_0 = =math.ceil(speed_wall * 45 / 50) top_bottom_thickness = 0.8 -wall_thickness = 0.8 - jerk_travel = 50 infill_sparse_density = 15 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Print.inst.cfg index 206442121b..1ed844b4fc 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Fast_Print.inst.cfg @@ -25,8 +25,6 @@ speed_topbottom = =math.ceil(speed_print * 35 / 70) speed_wall = =math.ceil(speed_print * 45 / 70) speed_wall_0 = =math.ceil(speed_wall * 35 / 70) top_bottom_thickness = 1 -wall_thickness = 1 - jerk_travel = 50 layer_height_0 = 0.2 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_High_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_High_Quality.inst.cfg index 3f29983cfd..2e69215798 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_High_Quality.inst.cfg @@ -27,8 +27,6 @@ speed_layer_0 = 10 speed_topbottom = =math.ceil(speed_print * 35 / 50) speed_wall = =math.ceil(speed_print * 35 / 50) top_bottom_thickness = 1 -wall_thickness = 1 - jerk_travel = 50 layer_height_0 = 0.2 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Quality.inst.cfg index 227730f359..8939294b54 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_Normal_Quality.inst.cfg @@ -23,8 +23,6 @@ retraction_prime_speed = =retraction_speed skin_overlap = 10 speed_layer_0 = 10 top_bottom_thickness = 1 -wall_thickness = 1 - jerk_travel = 50 layer_height_0 = 0.2 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_VeryDraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_VeryDraft_Print.inst.cfg index 141c4604b0..efccc3a347 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_VeryDraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PLA_VeryDraft_Print.inst.cfg @@ -37,8 +37,6 @@ prime_tower_enable = False retraction_prime_speed = =retraction_speed skin_edge_support_thickness = =0.9 if infill_sparse_density < 30 else 0 skin_overlap = 20 - -wall_thickness = =line_width * 3 top_bottom_thickness = 0.9 infill_pattern = ='zigzag' if infill_sparse_density > 80 else 'triangles' diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Draft_Print.inst.cfg index 8c8091cb1e..7312f07e1a 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Draft_Print.inst.cfg @@ -54,5 +54,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 wall_0_inset = 0 - -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Fast_Print.inst.cfg index 047ee82739..c9229621dc 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Fast_Print.inst.cfg @@ -56,5 +56,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1.1 wall_0_inset = 0 - -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Normal_Quality.inst.cfg index c91c73983e..46a74cb3a9 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_PP_Normal_Quality.inst.cfg @@ -56,5 +56,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 35 top_bottom_thickness = 1 wall_0_inset = 0 - -wall_thickness = =line_width * 3 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Draft_Print.inst.cfg index d65f61cf74..06a79da7bb 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Draft_Print.inst.cfg @@ -32,5 +32,3 @@ speed_topbottom = =math.ceil(speed_print * 25 / 50) speed_wall = =math.ceil(speed_print * 36 / 50) speed_wall_0 = =math.ceil(speed_print * 26 / 50) top_bottom_thickness = 1.2 - -wall_thickness = 1.2 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Print.inst.cfg index bea0ca9228..5dda143bb2 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Fast_Print.inst.cfg @@ -27,5 +27,3 @@ speed_topbottom = =math.ceil(speed_print * 35 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) top_bottom_thickness = 1.2 - -wall_thickness = 1.23 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_High_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_High_Quality.inst.cfg index 190f2f8e06..cdb80b7ed7 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_High_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_High_Quality.inst.cfg @@ -28,5 +28,4 @@ speed_topbottom = =math.ceil(speed_print * 35 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) top_bottom_thickness = 1.2 -wall_thickness = 1.23 layer_height_0 = 0.2 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Quality.inst.cfg index 190f3422b0..c98bc73da9 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_Normal_Quality.inst.cfg @@ -29,5 +29,3 @@ speed_topbottom = =math.ceil(speed_print * 35 / 45) speed_wall = =math.ceil(speed_print * 40 / 45) speed_wall_0 = =math.ceil(speed_wall * 35 / 45) top_bottom_thickness = 1.2 -wall_thickness = 1.23 - diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_VeryDraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_VeryDraft_Print.inst.cfg index 9e614cdd28..54eb99d099 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_VeryDraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPLA_VeryDraft_Print.inst.cfg @@ -37,8 +37,6 @@ prime_tower_enable = False retraction_prime_speed = =retraction_speed skin_edge_support_thickness = =0.9 if infill_sparse_density < 30 else 0 skin_overlap = 20 - -wall_thickness = =line_width * 3 top_bottom_thickness = 1.2 infill_pattern = ='zigzag' if infill_sparse_density > 80 else 'triangles' diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg index a867e168b1..790551aab4 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Draft_Print.inst.cfg @@ -55,5 +55,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 0.7 travel_avoid_distance = 1.5 wall_0_inset = 0 - -wall_thickness = 0.76 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg index f4ef171a69..6b01e411e5 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Fast_Print.inst.cfg @@ -55,6 +55,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 0.7 travel_avoid_distance = 1.5 wall_0_inset = 0 - -wall_thickness = 0.76 - diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg index ce9b26051e..20ce8fd979 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.4_TPU_Normal_Quality.inst.cfg @@ -54,6 +54,3 @@ switch_extruder_retraction_speeds = 35 top_bottom_thickness = 0.7 travel_avoid_distance = 1.5 wall_0_inset = 0 - -wall_thickness = 0.76 - diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg index 495f18dc4a..70cf3bd857 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Draft_Print.inst.cfg @@ -25,7 +25,6 @@ prime_tower_enable = True support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x retract_at_layer_change = False speed_print = 45 speed_topbottom = =math.ceil(speed_print * 35 / 45) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg index 814c7a2b5e..1e2ae90927 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Superdraft_Print.inst.cfg @@ -26,7 +26,6 @@ raft_margin = 10 support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x retract_at_layer_change = False speed_print = 45 speed_topbottom = =math.ceil(speed_print * 35 / 45) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg index bf341d3bf0..0833197f9c 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PLA_Verydraft_Print.inst.cfg @@ -25,7 +25,6 @@ prime_tower_enable = True support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x retract_at_layer_change = False speed_print = 45 speed_topbottom = =math.ceil(speed_print * 35 / 45) diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg index 2042e29518..074e24b223 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Draft_Print.inst.cfg @@ -39,4 +39,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.6 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.6 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg index f0b09c333d..067033d1c3 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Superdraft_Print.inst.cfg @@ -39,4 +39,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.6 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.6 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg index 9cb6b43d70..26c2b53052 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_PP_Verydraft_Print.inst.cfg @@ -38,4 +38,3 @@ switch_extruder_retraction_amount = 20 switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.6 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.6 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Draft_Print.inst.cfg index 6f02b91def..852b4ad45a 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Draft_Print.inst.cfg @@ -32,4 +32,3 @@ speed_wall_0 = =round(speed_print * 35 / 45) support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 6 -wall_thickness = =wall_line_width_0 + wall_line_width_x
\ No newline at end of file diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Superdraft_Print.inst.cfg index 818e9130e5..5028f98e7b 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Superdraft_Print.inst.cfg @@ -34,4 +34,3 @@ speed_wall_0 = =math.ceil(speed_print * 20 / 30) support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Verydraft_Print.inst.cfg index b5d32d020c..4c4164feab 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPLA_Verydraft_Print.inst.cfg @@ -35,4 +35,3 @@ speed_wall_0 = =math.ceil(speed_print * 20 / 35) support_angle = 70 support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg index d89919328e..12b4734b7f 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Draft_Print.inst.cfg @@ -47,5 +47,4 @@ switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.2 travel_avoid_distance = 1.5 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.3 jerk_travel = 50 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg index 99511e1ab6..bb6520947b 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Superdraft_Print.inst.cfg @@ -47,5 +47,4 @@ switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.2 travel_avoid_distance = 1.5 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.3 jerk_travel = 50 diff --git a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg index 19842185fe..847552d471 100644 --- a/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_aa0.8_TPU_Verydraft_Print.inst.cfg @@ -47,5 +47,4 @@ switch_extruder_retraction_speeds = 45 top_bottom_thickness = 1.2 travel_avoid_distance = 1.5 wall_0_wipe_dist = =line_width * 2 -wall_thickness = 1.3 jerk_travel = 50 diff --git a/resources/quality/ultimaker_s5/um_s5_cc0.4_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_cc0.4_PLA_Draft_Print.inst.cfg index a9cef5ca36..198c8df013 100644 --- a/resources/quality/ultimaker_s5/um_s5_cc0.4_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_cc0.4_PLA_Draft_Print.inst.cfg @@ -35,4 +35,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s5/um_s5_cc0.4_PLA_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_cc0.4_PLA_Fast_Print.inst.cfg index e8a37bb6fc..717b14a722 100644 --- a/resources/quality/ultimaker_s5/um_s5_cc0.4_PLA_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_cc0.4_PLA_Fast_Print.inst.cfg @@ -35,4 +35,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Draft_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Draft_Print.inst.cfg index 9052dfee7d..3785791ec2 100644 --- a/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Draft_Print.inst.cfg @@ -35,4 +35,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Fast_Print.inst.cfg b/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Fast_Print.inst.cfg index fd41d88a76..e1b22ab0f7 100644 --- a/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker_s5/um_s5_cc0.6_PLA_Fast_Print.inst.cfg @@ -35,4 +35,3 @@ support_angle = 70 support_pattern = ='triangles' support_xy_distance = =wall_line_width_0 * 1.5 top_bottom_thickness = =layer_height * 4 -wall_thickness = =wall_line_width_0 + wall_line_width_x diff --git a/resources/themes/cura-dark-colorblind/theme.json b/resources/themes/cura-dark-colorblind/theme.json index c98fb0c815..4a006ee836 100644 --- a/resources/themes/cura-dark-colorblind/theme.json +++ b/resources/themes/cura-dark-colorblind/theme.json @@ -8,12 +8,8 @@ "x_axis": [212, 0, 0, 255], "y_axis": [64, 64, 255, 255], - "model_default": [156, 201, 36, 255], "model_overhang": [200, 0, 255, 255], - - "xray_error_dark": [255, 0, 0, 255], - "xray_error_light": [255, 255, 0, 255], "xray": [26, 26, 62, 255], "xray_error": [255, 0, 0, 255], diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 2956e3f809..b7c1718c0d 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -4,47 +4,85 @@ "inherits": "cura-light" }, + "base_colors": + { + "background_1": [31, 31, 32, 255], + "background_2": [57, 57, 58, 255], + "background_3": [85, 85, 87, 255], + "background_4": [23, 23, 23, 255], + + "accent_1": [25, 110, 240, 255], + "accent_2": [16, 70, 156, 255], + "border_main": [118, 118, 119, 255], + "border_accent_1": [255, 255, 255, 255], + "border_accent_2": [16, 70, 156, 255], + "border_field": [57, 57, 58, 255], + + "text_default": [255, 255, 255, 255], + "text_disabled": [118, 118, 118, 255], + "text_primary_button": [255, 255, 255, 255], + "text_secondary_button": [255, 255, 255, 255], + "text_link_hover": [156, 195, 255, 255], + "text_lighter": [243, 243, 243, 255], + + "um_green_1": [233, 245, 237, 255], + "um_green_5": [36, 162, 73, 255], + "um_green_9": [31, 44, 36, 255], + "um_red_1": [251, 232, 233, 255], + "um_red_5": [218, 30, 40, 255], + "um_red_9": [59, 31, 33, 255], + "um_orange_1": [255, 235, 221, 255], + "um_orange_5": [252, 123, 30, 255], + "um_orange_9": [64, 45, 32, 255], + "um_yellow_1": [255, 248, 225, 255], + "um_yellow_5": [253, 209, 58, 255], + "um_yellow_9": [64, 58, 36, 255] + }, + "colors": { - "main_background": [39, 44, 48, 255], - "detail_background": [63, 63, 63, 255], - "message_background": [39, 44, 48, 255], + "main_background": "background_1", + "detail_background": "background_2", + "message_background": "background_1", "wide_lining": [31, 36, 39, 255], "thick_lining": [255, 255, 255, 60], - "lining": [64, 69, 72, 255], - "viewport_overlay": [30, 36, 39, 255], + "lining": "border_main", + "viewport_overlay": "background_1", "primary": [12, 169, 227, 255], - "primary_text": [255, 255, 255, 204], + "primary_text": "text_default", "secondary": [95, 95, 95, 255], - "secondary_button": [39, 44, 48, 255], - "secondary_button_hover": [85, 85, 87, 255], - "secondary_button_text": [255, 255, 255, 255], + "expandable_active": "background_2", + "expandable_hover": "background_2", - "icon": [255, 255, 255, 255], - "toolbar_background": [39, 44, 48, 255], - "toolbar_button_active": [57, 57, 58, 255], - "toolbar_button_hover": [57, 57, 58, 255], - "toolbar_button_active_hover": [57, 57, 58, 255], + "secondary_button": "background_1", + "secondary_button_hover": "background_3", + "secondary_button_text": [255, 255, 255, 255], - "main_window_header_button_text_inactive": [128, 128, 128, 255], - "main_window_header_background": [14, 14, 14, 255], - "main_window_header_background_gradient": [32, 32, 32, 255], + "icon": "text_default", + "toolbar_background": "background_1", + "toolbar_button_active": "background_3", + "toolbar_button_hover": "background_3", + "toolbar_button_active_hover": "background_3", + + "main_window_header_button_background_inactive": "background_4", + "main_window_header_button_text_inactive": "text_primary_button", + "main_window_header_button_text_active": "background_4", + "main_window_header_background": "background_4", + "main_window_header_background_gradient": "background_4", "main_window_header_button_background_hovered": [46, 46, 46, 255], + "secondary_button_text": "text_secondary_button", + "account_sync_state_icon": [255, 255, 255, 204], - "machine_selector_bar": [39, 44, 48, 255], - "machine_selector_active": [39, 44, 48, 255], "machine_selector_printer_icon": [204, 204, 204, 255], - "text": [255, 255, 255, 204], + "text": "text_default", "text_detail": [255, 255, 255, 172], - "text_link": [25, 110, 240, 255], + "text_link": "accent_1", "text_inactive": [255, 255, 255, 88], "text_hover": [255, 255, 255, 204], - "text_pressed": [255, 255, 255, 204], - "text_subtext": [255, 255, 255, 172], "text_scene": [255, 255, 255, 162], "text_scene_hover": [255, 255, 255, 204], @@ -55,22 +93,14 @@ "button": [39, 44, 48, 255], "button_hover": [39, 44, 48, 255], - "button_active": [67, 72, 75, 255], - "button_active_hover": [67, 72, 75, 255], - "button_text": [255, 255, 255, 197], + "button_text": "text_default", "button_disabled": [39, 44, 48, 255], "button_disabled_text": [255, 255, 255, 101], - "small_button": [39, 44, 48, 0], - "small_button_hover": [39, 44, 48, 255], - "small_button_active": [67, 72, 75, 255], - "small_button_active_hover": [67, 72, 75, 255], "small_button_text": [255, 255, 255, 197], "small_button_text_hover": [255, 255, 255, 255], "button_tooltip": [39, 44, 48, 255], - "button_tooltip_border": [39, 44, 48, 255], - "button_tooltip_text": [255, 255, 255, 172], "tab_checked": [39, 44, 48, 255], "tab_checked_border": [255, 255, 255, 30], @@ -86,17 +116,17 @@ "tab_active_text": [255, 255, 255, 255], "tab_background": [39, 44, 48, 255], - "action_button": [39, 44, 48, 255], + "action_button": "background_1", "action_button_text": [255, 255, 255, 200], - "action_button_border": [255, 255, 255, 30], + "action_button_border": "border_main", "action_button_hovered": [79, 85, 89, 255], - "action_button_hovered_text": [255, 255, 255, 255], - "action_button_hovered_border": [255, 255, 255, 30], + "action_button_hovered_text": "text_default", + "action_button_hovered_border": "border_main", "action_button_active": [39, 44, 48, 30], - "action_button_active_text": [255, 255, 255, 255], + "action_button_active_text": "text_default", "action_button_active_border": [255, 255, 255, 100], - "action_button_disabled": [85, 85, 87, 255], - "action_button_disabled_text": [103, 103, 104, 255], + "action_button_disabled": "background_3", + "action_button_disabled_text": "text_disabled", "action_button_disabled_border": [255, 255, 255, 30], "scrollbar_background": [39, 44, 48, 0], @@ -104,39 +134,24 @@ "scrollbar_handle_hover": [255, 255, 255, 255], "scrollbar_handle_down": [255, 255, 255, 255], - "setting_category": [75, 80, 83, 255], "setting_category_disabled": [75, 80, 83, 255], - "setting_category_hover": [75, 80, 83, 255], - "setting_category_active": [75, 80, 83, 255], - "setting_category_active_hover": [75, 80, 83, 255], - "setting_category_text": [255, 255, 255, 152], "setting_category_disabled_text": [255, 255, 255, 101], - "setting_category_hover_text": [255, 255, 255, 204], - "setting_category_active_text": [255, 255, 255, 204], - "setting_category_active_hover_text": [255, 255, 255, 204], - "setting_category_border": [39, 44, 48, 0], - "setting_category_disabled_border": [39, 44, 48, 0], - "setting_category_hover_border": [12, 169, 227, 255], - "setting_category_active_border": [39, 44, 48, 0], - "setting_category_active_hover_border": [12, 169, 227, 255], - - "setting_control": [43, 48, 52, 255], + + "setting_control": "background_2", "setting_control_selected": [34, 39, 42, 38], - "setting_control_highlight": [43, 48, 52, 255], + "setting_control_highlight": "background_3", "setting_control_border": [255, 255, 255, 38], "setting_control_border_highlight": [12, 169, 227, 255], - "setting_control_text": [255, 255, 255, 181], + "setting_control_text": "text_default", "setting_control_button": [255, 255, 255, 127], "setting_control_button_hover": [255, 255, 255, 204], "setting_control_disabled": [34, 39, 42, 255], "setting_control_disabled_text": [255, 255, 255, 101], "setting_control_disabled_border": [255, 255, 255, 101], "setting_unit": [255, 255, 255, 127], - "setting_validation_error_background": [59, 31, 53, 255], - "setting_validation_error": [212, 31, 53, 255], - "setting_validation_warning_background": [62, 54, 46, 255], - "setting_validation_warning": [245, 166, 35, 255], - "setting_validation_ok": [43, 48, 52, 255], + "setting_validation_error_background": "um_red_9", + "setting_validation_warning_background": "um_yellow_9", + "setting_validation_ok": "background_2", "progressbar_background": [255, 255, 255, 48], "progressbar_control": [255, 255, 255, 197], @@ -147,22 +162,14 @@ "slider_handle": [255, 255, 255, 255], "slider_handle_active": [68, 192, 255, 255], - "checkbox": [43, 48, 52, 255], - "checkbox_hover": [43, 48, 52, 255], - "checkbox_border": [255, 255, 255, 38], - "checkbox_border_hover": [255, 255, 255, 38], - "checkbox_mark": [255, 255, 255, 181], - "checkbox_square": [118, 118, 118, 255], - "checkbox_text": [255, 255, 255, 181], + "category_background": "background_3", - "tooltip": [39, 44, 48, 255], - "tooltip_text": [255, 255, 255, 204], + "tooltip": "background_2", + "tooltip_text": "text_default", - "tool_panel_background": [39, 44, 48, 255], + "tool_panel_background": "background_1", - "tool_button_border": [255, 255, 255, 38], - - "viewport_background": [31, 36, 39, 255], + "viewport_background": "background_1", "volume_outline": [12, 169, 227, 128], "buildplate": [169, 169, 169, 255], "buildplate_grid_minor": [154, 154, 155, 255], @@ -182,16 +189,12 @@ "monitor_icon_disabled": [102, 102, 102, 255], "monitor_secondary_button_hover": [80, 80, 80, 255], - "monitor_secondary_button": [92, 92, 92, 255], - "monitor_secondary_button_text": [250, 250, 250, 255], - "monitor_secondary_button_shadow": [74, 74, 74, 255], - "monitor_card_border": [102, 102, 102, 255], "monitor_card_background": [51, 53, 54, 255], "monitor_card_hover": [84, 89, 95, 255], - "monitor_stage_background": [30, 36, 39, 255], - "monitor_stage_background_fade": [30, 36, 39, 102], + "monitor_stage_background": "background_1", + "monitor_stage_background_fade": "background_1", "monitor_progress_bar_deactive": [102, 102, 102, 255], "monitor_progress_bar_empty": [67, 67, 67, 255], diff --git a/resources/themes/cura-light-colorblind/theme.json b/resources/themes/cura-light-colorblind/theme.json index 5628fad880..740bf977b2 100644 --- a/resources/themes/cura-light-colorblind/theme.json +++ b/resources/themes/cura-light-colorblind/theme.json @@ -8,7 +8,6 @@ "x_axis": [200, 0, 0, 255], "y_axis": [64, 64, 255, 255], - "model_default": [156, 201, 36, 255], "model_overhang": [200, 0, 255, 255], "model_selection_outline": [12, 169, 227, 255], diff --git a/resources/themes/cura-light/styles.qml b/resources/themes/cura-light/styles.qml deleted file mode 100755 index e497215c0c..0000000000 --- a/resources/themes/cura-light/styles.qml +++ /dev/null @@ -1,753 +0,0 @@ -// Copyright (c) 2021 Ultimaker B.V. -// Cura is released under the terms of the LGPLv3 or higher. - -import QtQuick 2.10 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 - -import UM 1.1 as UM - -QtObject -{ - property Component print_setup_header_button: Component - { - ButtonStyle - { - background: Rectangle - { - color: - { - if(control.enabled) - { - if(control.valueError) - { - return UM.Theme.getColor("setting_validation_error_background"); - } - else if(control.valueWarning) - { - return UM.Theme.getColor("setting_validation_warning_background"); - } - else - { - return UM.Theme.getColor("setting_control"); - } - } - else - { - return UM.Theme.getColor("setting_control_disabled"); - } - } - - radius: UM.Theme.getSize("setting_control_radius").width - border.width: UM.Theme.getSize("default_lining").width - border.color: - { - if (control.enabled) - { - if (control.valueError) - { - return UM.Theme.getColor("setting_validation_error"); - } - else if (control.valueWarning) - { - return UM.Theme.getColor("setting_validation_warning"); - } - else if (control.hovered) - { - return UM.Theme.getColor("setting_control_border_highlight"); - } - else - { - return UM.Theme.getColor("setting_control_border"); - } - } - else - { - return UM.Theme.getColor("setting_control_disabled_border"); - } - } - UM.RecolorImage - { - id: downArrow - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width - width: UM.Theme.getSize("standard_arrow").width - height: UM.Theme.getSize("standard_arrow").height - sourceSize.height: width - color: control.enabled ? UM.Theme.getColor("setting_control_button") : UM.Theme.getColor("setting_category_disabled_text") - source: UM.Theme.getIcon("ChevronSingleDown") - } - Label - { - id: printSetupComboBoxLabel - color: control.enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") - text: control.text; - elide: Text.ElideRight; - anchors.left: parent.left; - anchors.leftMargin: UM.Theme.getSize("setting_unit_margin").width - anchors.right: downArrow.left; - anchors.rightMargin: control.rightMargin; - anchors.verticalCenter: parent.verticalCenter; - font: UM.Theme.getFont("default") - } - } - label: Label{} - } - } - - property Component main_window_header_tab: Component - { - ButtonStyle - { - // This property will be back-propagated when the width of the label is calculated - property var buttonWidth: 0 - - background: Rectangle - { - id: backgroundRectangle - implicitHeight: control.height - implicitWidth: buttonWidth - radius: UM.Theme.getSize("action_button_radius").width - - color: - { - if (control.checked) - { - return UM.Theme.getColor("main_window_header_button_background_active") - } - else - { - if (control.hovered) - { - return UM.Theme.getColor("main_window_header_button_background_hovered") - } - return UM.Theme.getColor("main_window_header_button_background_inactive") - } - } - - } - - label: Item - { - id: contents - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - height: control.height - width: buttonLabel.width + 4 * UM.Theme.getSize("default_margin").width - - Label - { - id: buttonLabel - text: control.text - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - font: UM.Theme.getFont("medium") - color: - { - if (control.checked) - { - return UM.Theme.getColor("main_window_header_button_text_active") - } - else - { - if (control.hovered) - { - return UM.Theme.getColor("main_window_header_button_text_hovered") - } - return UM.Theme.getColor("main_window_header_button_text_inactive") - } - } - } - Component.onCompleted: - { - buttonWidth = width - } - } - - - } - } - - property Component tool_button: Component - { - ButtonStyle - { - background: Item - { - implicitWidth: UM.Theme.getSize("button").width - implicitHeight: UM.Theme.getSize("button").height - - UM.PointingRectangle - { - id: button_tooltip - - anchors.left: parent.right - anchors.leftMargin: UM.Theme.getSize("button_tooltip_arrow").width * 2 - anchors.verticalCenter: parent.verticalCenter - - target: Qt.point(parent.x, y + Math.round(height/2)) - arrowSize: UM.Theme.getSize("button_tooltip_arrow").width - color: UM.Theme.getColor("button_tooltip") - opacity: control.hovered ? 1.0 : 0.0; - visible: control.text != "" - - width: control.hovered ? button_tip.width + UM.Theme.getSize("button_tooltip").width : 0 - height: UM.Theme.getSize("button_tooltip").height - - Behavior on width { NumberAnimation { duration: 100; } } - Behavior on opacity { NumberAnimation { duration: 100; } } - - Label - { - id: button_tip - - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - - text: control.text - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("tooltip_text") - } - } - - Rectangle - { - id: buttonFace - - anchors.fill: parent - property bool down: control.pressed || (control.checkable && control.checked) - - color: - { - if(control.customColor !== undefined && control.customColor !== null) - { - return control.customColor - } - else if(control.checkable && control.checked && control.hovered) - { - return UM.Theme.getColor("toolbar_button_active_hover") - } - else if(control.pressed || (control.checkable && control.checked)) - { - return UM.Theme.getColor("toolbar_button_active") - } - else if(control.hovered) - { - return UM.Theme.getColor("toolbar_button_hover") - } - return UM.Theme.getColor("toolbar_background") - } - Behavior on color { ColorAnimation { duration: 50; } } - - border.width: (control.hasOwnProperty("needBorder") && control.needBorder) ? UM.Theme.getSize("default_lining").width : 0 - border.color: control.checked ? UM.Theme.getColor("icon") : UM.Theme.getColor("lining") - } - } - - label: Item - { - UM.RecolorImage - { - anchors.centerIn: parent - opacity: control.enabled ? 1.0 : 0.2 - source: control.iconSource - width: UM.Theme.getSize("medium_button_icon").width - height: UM.Theme.getSize("medium_button_icon").height - color: UM.Theme.getColor("icon") - - sourceSize: UM.Theme.getSize("medium_button_icon") - } - } - } - } - - property Component progressbar: Component - { - ProgressBarStyle - { - background: Rectangle - { - implicitWidth: UM.Theme.getSize("message").width - (UM.Theme.getSize("default_margin").width * 2) - implicitHeight: UM.Theme.getSize("progressbar").height - color: control.hasOwnProperty("backgroundColor") ? control.backgroundColor : UM.Theme.getColor("progressbar_background") - radius: UM.Theme.getSize("progressbar_radius").width - } - progress: Rectangle - { - color: - { - if(control.indeterminate) - { - return "transparent"; - } - else if(control.hasOwnProperty("controlColor")) - { - return control.controlColor; - } - else - { - return UM.Theme.getColor("progressbar_control"); - } - } - radius: UM.Theme.getSize("progressbar_radius").width - Rectangle - { - radius: UM.Theme.getSize("progressbar_radius").width - color: control.hasOwnProperty("controlColor") ? control.controlColor : UM.Theme.getColor("progressbar_control") - width: UM.Theme.getSize("progressbar_control").width - height: UM.Theme.getSize("progressbar_control").height - visible: control.indeterminate - - SequentialAnimation on x - { - id: xAnim - property int animEndPoint: UM.Theme.getSize("message").width - Math.round((UM.Theme.getSize("default_margin").width * 2.5)) - UM.Theme.getSize("progressbar_control").width - running: control.indeterminate && control.visible - loops: Animation.Infinite - NumberAnimation { from: 0; to: xAnim.animEndPoint; duration: 2000;} - NumberAnimation { from: xAnim.animEndPoint; to: 0; duration: 2000;} - } - } - } - } - } - - property Component scrollview: Component - { - ScrollViewStyle - { - decrementControl: Item { } - incrementControl: Item { } - - transientScrollBars: false - - scrollBarBackground: Rectangle - { - implicitWidth: UM.Theme.getSize("scrollbar").width - radius: Math.round(implicitWidth / 2) - color: UM.Theme.getColor("scrollbar_background") - } - - handle: Rectangle - { - id: scrollViewHandle - implicitWidth: UM.Theme.getSize("scrollbar").width - radius: Math.round(implicitWidth / 2) - - color: styleData.pressed ? UM.Theme.getColor("scrollbar_handle_down") : styleData.hovered ? UM.Theme.getColor("scrollbar_handle_hover") : UM.Theme.getColor("scrollbar_handle") - Behavior on color { ColorAnimation { duration: 50; } } - } - } - } - - property Component combobox: Component - { - ComboBoxStyle - { - - background: Rectangle - { - implicitHeight: UM.Theme.getSize("setting_control").height; - implicitWidth: UM.Theme.getSize("setting_control").width; - - color: control.hovered ? UM.Theme.getColor("setting_control_highlight") : UM.Theme.getColor("setting_control") - Behavior on color { ColorAnimation { duration: 50; } } - - border.width: UM.Theme.getSize("default_lining").width; - border.color: control.hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border"); - radius: UM.Theme.getSize("setting_control_radius").width - } - - label: Item - { - Label - { - anchors.left: parent.left - anchors.leftMargin: UM.Theme.getSize("default_lining").width - anchors.right: downArrow.left - anchors.rightMargin: UM.Theme.getSize("default_lining").width - anchors.verticalCenter: parent.verticalCenter - - text: control.currentText - font: UM.Theme.getFont("default"); - color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text") - - elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter - } - - UM.RecolorImage - { - id: downArrow - anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_lining").width * 2 - anchors.verticalCenter: parent.verticalCenter - - source: UM.Theme.getIcon("ChevronSingleDown") - width: UM.Theme.getSize("standard_arrow").width - height: UM.Theme.getSize("standard_arrow").height - sourceSize.width: width + 5 * screenScaleFactor - sourceSize.height: width + 5 * screenScaleFactor - - color: UM.Theme.getColor("setting_control_button"); - } - } - } - } - - property Component checkbox: Component - { - CheckBoxStyle - { - background: Item { } - indicator: Rectangle - { - implicitWidth: UM.Theme.getSize("checkbox").width - implicitHeight: UM.Theme.getSize("checkbox").height - - color: (control.hovered || control._hovered) ? UM.Theme.getColor("checkbox_hover") : (control.enabled ? UM.Theme.getColor("checkbox") : UM.Theme.getColor("checkbox_disabled")) - Behavior on color { ColorAnimation { duration: 50; } } - anchors.verticalCenter: parent.verticalCenter - radius: control.exclusiveGroup ? Math.round(UM.Theme.getSize("checkbox").width / 2) : UM.Theme.getSize("checkbox_radius").width - - border.width: UM.Theme.getSize("default_lining").width - border.color: (control.hovered || control._hovered) ? UM.Theme.getColor("checkbox_border_hover") : UM.Theme.getColor("checkbox_border") - - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - height: UM.Theme.getSize("checkbox_mark").height - width: UM.Theme.getSize("checkbox_mark").width - sourceSize.height: width - color: UM.Theme.getColor("checkbox_mark") - source: control.exclusiveGroup ? UM.Theme.getIcon("Dot") : UM.Theme.getIcon("Check", "low") - opacity: control.checked - Behavior on opacity { NumberAnimation { duration: 100; } } - } - } - label: Label - { - text: control.text - color: UM.Theme.getColor("checkbox_text") - font: UM.Theme.getFont("default") - elide: Text.ElideRight - renderType: Text.NativeRendering - } - } - } - - property Component partially_checkbox: Component - { - CheckBoxStyle - { - background: Item { } - indicator: Rectangle - { - implicitWidth: UM.Theme.getSize("checkbox").width - implicitHeight: UM.Theme.getSize("checkbox").height - - color: (control.hovered || control._hovered) ? UM.Theme.getColor("checkbox_hover") : UM.Theme.getColor("checkbox"); - Behavior on color { ColorAnimation { duration: 50; } } - - radius: control.exclusiveGroup ? Math.round(UM.Theme.getSize("checkbox").width / 2) : UM.Theme.getSize("checkbox_radius").width - - border.width: UM.Theme.getSize("default_lining").width; - border.color: (control.hovered || control._hovered) ? UM.Theme.getColor("checkbox_border_hover") : UM.Theme.getColor("checkbox_border"); - - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - height: UM.Theme.getSize("checkbox_mark").height - width: UM.Theme.getSize("checkbox_mark").width - sourceSize.height: width - color: UM.Theme.getColor("checkbox_mark") - source: - { - if (control.checkbox_state == 2) - { - return UM.Theme.getIcon("Solid"); - } - else - { - return control.exclusiveGroup ? UM.Theme.getIcon("Dot", "low") : UM.Theme.getIcon("Check", "low"); - } - } - opacity: control.checked - Behavior on opacity { NumberAnimation { duration: 100; } } - } - } - label: Label - { - text: control.text - color: UM.Theme.getColor("checkbox_text") - font: UM.Theme.getFont("default") - } - } - } - - property Component text_field: Component - { - TextFieldStyle - { - textColor: UM.Theme.getColor("setting_control_text") - placeholderTextColor: UM.Theme.getColor("setting_control_text") - font: UM.Theme.getFont("default") - - background: Rectangle - { - implicitHeight: control.height; - implicitWidth: control.width; - - border.width: UM.Theme.getSize("default_lining").width; - border.color: control.hovered ? UM.Theme.getColor("setting_control_border_highlight") : UM.Theme.getColor("setting_control_border"); - radius: UM.Theme.getSize("setting_control_radius").width - - color: UM.Theme.getColor("setting_validation_ok"); - - Label - { - anchors.right: parent.right; - anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width; - anchors.verticalCenter: parent.verticalCenter; - - text: control.unit ? control.unit : "" - color: UM.Theme.getColor("setting_unit"); - font: UM.Theme.getFont("default"); - renderType: Text.NativeRendering - } - } - } - } - - property Component print_setup_action_button: Component - { - ButtonStyle - { - background: Rectangle - { - border.width: UM.Theme.getSize("default_lining").width - border.color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled_border"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active_border"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered_border"); - } - else - { - return UM.Theme.getColor("action_button_border"); - } - } - color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered"); - } - else - { - return UM.Theme.getColor("action_button"); - } - } - Behavior on color { ColorAnimation { duration: 50 } } - - implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("thick_margin").width * 2) - - Label - { - id: actualLabel - anchors.centerIn: parent - color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled_text"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active_text"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered_text"); - } - else - { - return UM.Theme.getColor("action_button_text"); - } - } - font: UM.Theme.getFont("medium") - text: control.text - } - } - label: Item { } - } - } - - property Component monitor_button_style: Component - { - ButtonStyle - { - background: Rectangle - { - border.width: UM.Theme.getSize("default_lining").width - border.color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled_border"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active_border"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered_border"); - } - return UM.Theme.getColor("action_button_border"); - } - color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered"); - } - return UM.Theme.getColor("action_button"); - } - Behavior on color - { - ColorAnimation - { - duration: 50 - } - } - } - - label: Item - { - UM.RecolorImage - { - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - width: Math.floor(control.width / 2) - height: Math.floor(control.height / 2) - sourceSize.height: width - color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled_text"); - } - else if(control.pressed) - { - return UM.Theme.getColor("action_button_active_text"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered_text"); - } - return UM.Theme.getColor("action_button_text"); - } - source: control.iconSource - } - } - } - } - - property Component monitor_checkable_button_style: Component - { - ButtonStyle { - background: Rectangle { - border.width: control.checked ? UM.Theme.getSize("default_lining").width * 2 : UM.Theme.getSize("default_lining").width - border.color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled_border"); - } - else if (control.checked || control.pressed) - { - return UM.Theme.getColor("action_button_active_border"); - } - else if(control.hovered) - { - return UM.Theme.getColor("action_button_hovered_border"); - } - return UM.Theme.getColor("action_button_border"); - } - color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled"); - } - else if (control.checked || control.pressed) - { - return UM.Theme.getColor("action_button_active"); - } - else if (control.hovered) - { - return UM.Theme.getColor("action_button_hovered"); - } - return UM.Theme.getColor("action_button"); - } - Behavior on color { ColorAnimation { duration: 50; } } - Label { - anchors.left: parent.left - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: UM.Theme.getSize("default_lining").width * 2 - anchors.rightMargin: UM.Theme.getSize("default_lining").width * 2 - color: - { - if(!control.enabled) - { - return UM.Theme.getColor("action_button_disabled_text"); - } - else if (control.checked || control.pressed) - { - return UM.Theme.getColor("action_button_active_text"); - } - else if (control.hovered) - { - return UM.Theme.getColor("action_button_hovered_text"); - } - return UM.Theme.getColor("action_button_text"); - } - font: UM.Theme.getFont("default") - text: control.text - horizontalAlignment: Text.AlignHCenter - elide: Text.ElideMiddle - } - } - label: Item { } - } - } -} diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index b4ae944f45..94372d415e 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -170,34 +170,70 @@ } }, + "base_colors": { + "background_1": [255, 255, 255, 255], + "background_2": [243, 243, 243, 255], + "background_3": [232, 240, 253, 255], + "background_4": [3, 12, 66, 255], + + "accent_1": [25, 110, 240, 255], + "accent_2": [16, 70, 156, 255], + "border_main": [212, 212, 212, 255], + "border_accent_1": [25, 110, 240, 255], + "border_accent_2": [16, 70, 156, 255], + "border_field": [180, 180, 180, 255], + + "text_default": [0, 14, 26, 255], + "text_disabled": [180, 180, 180, 255], + "text_primary_button": [255, 255, 255, 255], + "text_secondary_button": [25, 110, 240, 255], + "text_link_hover": [16, 70, 156, 255], + "text_lighter": [108, 108, 108, 255], + + "um_green_1": [233, 245, 237, 255], + "um_green_5": [36, 162, 73, 255], + "um_green_9": [31, 44, 36, 255], + "um_red_1": [251, 232, 233, 255], + "um_red_5": [218, 30, 40, 255], + "um_red_9": [59, 31, 33, 255], + "um_orange_1": [255, 235, 221, 255], + "um_orange_5": [252, 123, 30, 255], + "um_orange_9": [64, 45, 32, 255], + "um_yellow_1": [255, 248, 225, 255], + "um_yellow_5": [253, 209, 58, 255], + "um_yellow_9": [64, 58, 36, 255] + }, + "colors": { - "main_background": [255, 255, 255, 255], - "detail_background": [243, 243, 243, 255], + "main_background": "background_1", + "detail_background": "background_2", "wide_lining": [245, 245, 245, 255], "thick_lining": [180, 180, 180, 255], "lining": [192, 193, 194, 255], "viewport_overlay": [246, 246, 246, 255], "primary": [25, 110, 240, 255], - "primary_shadow": [64, 47, 205, 255], "primary_hover": [48, 182, 231, 255], "primary_text": [255, 255, 255, 255], + "text_selection": [156, 195, 255, 127], "border": [127, 127, 127, 255], + "border_field": [180, 180, 180, 255], "secondary": [240, 240, 240, 255], - "secondary_shadow": [216, 216, 216, 255], + + "expandable_active": [240, 240, 240, 255], + "expandable_hover": [232, 242, 252, 255], "icon": [8, 7, 63, 255], - "primary_button": [25, 110, 240, 255], - "primary_button_shadow": [27, 95, 202, 255], + "primary_button": "accent_1", "primary_button_hover": [16, 70, 156, 255], "primary_button_text": [255, 255, 255, 255], - "secondary_button": [255, 255, 255, 255], + "secondary_button": "background_1", "secondary_button_shadow": [216, 216, 216, 255], "secondary_button_hover": [232, 240, 253, 255], - "secondary_button_text": [25, 110, 240, 255], + "secondary_button_text": "accent_1", "main_window_header_background": [8, 7, 63, 255], "main_window_header_background_gradient": [25, 23, 91, 255], @@ -211,13 +247,9 @@ "account_widget_outline_active": [70, 66, 126, 255], "account_sync_state_icon": [25, 25, 25, 255], - "machine_selector_bar": [31, 36, 39, 255], - "machine_selector_active": [68, 72, 75, 255], - "machine_selector_hover": [68, 72, 75, 255], - "machine_selector_text_active": [255, 255, 255, 255], "machine_selector_printer_icon": [8, 7, 63, 255], - "action_panel_secondary": [25, 110, 240, 255], + "action_panel_secondary": "accent_1", "first_run_shadow": [50, 50, 50, 255], @@ -230,13 +262,11 @@ "window_disabled_background": [0, 0, 0, 255], "text": [25, 25, 25, 255], + "text_disabled": [180, 180, 180, 255], "text_detail": [174, 174, 174, 128], "text_link": [25, 110, 240, 255], "text_inactive": [174, 174, 174, 255], - "text_pressed": [50, 130, 255, 255], - "text_subtext": [0, 0, 0, 255], "text_medium": [128, 128, 128, 255], - "text_emphasis": [255, 255, 255, 255], "text_scene": [102, 102, 102, 255], "text_scene_hover": [123, 123, 113, 255], @@ -249,75 +279,35 @@ "toolbar_button_active": [232, 242, 252, 255], "toolbar_button_active_hover": [232, 242, 252, 255], - "button": [31, 36, 39, 255], - "button_hover": [68, 72, 75, 255], - "button_active": [68, 72, 75, 255], - "button_active_hover": [68, 72, 75, 255], "button_text": [255, 255, 255, 255], - "button_text_hover": [255, 255, 255, 255], - "button_text_active": [255, 255, 255, 255], - "button_text_active_hover": [255, 255, 255, 255], - - "small_button": [0, 0, 0, 0], - "small_button_hover": [102, 102, 102, 255], - "small_button_active": [10, 8, 80, 255], - "small_button_active_hover": [10, 8, 80, 255], + "small_button_text": [102, 102, 102, 255], "small_button_text_hover": [8, 7, 63, 255], - "small_button_text_active": [255, 255, 255, 255], - "small_button_text_active_hover": [255, 255, 255, 255], "button_tooltip": [31, 36, 39, 255], - "button_tooltip_border": [68, 192, 255, 255], - "button_tooltip_text": [192, 193, 194, 255], - "extruder_button_material_border": [255, 255, 255, 255], "extruder_disabled": [255, 255, 255, 102], - "rating_star": [90, 90, 90, 255], - - "sync_button_text": [120, 120, 120, 255], - "sync_button_text_hovered": [0, 0, 0, 255], - "action_button": [255, 255, 255, 255], - "action_button_text": [0, 0, 0, 255], - "action_button_border": [127, 127, 127, 255], "action_button_hovered": [232, 242, 252, 255], - "action_button_hovered_text": [31, 36, 39, 255], - "action_button_hovered_border": [50, 130, 255, 255], - "action_button_active": [255, 255, 255, 255], - "action_button_active_text": [0, 0, 0, 255], - "action_button_active_border": [50, 130, 255, 255], "action_button_disabled": [245, 245, 245, 255], "action_button_disabled_text": [196, 196, 196, 255], - "action_button_disabled_border": [196, 196, 196, 255], "action_button_shadow": [223, 223, 223, 255], - "action_button_disabled_shadow": [228, 228, 228, 255], "scrollbar_background": [255, 255, 255, 255], "scrollbar_handle": [10, 8, 80, 255], "scrollbar_handle_hover": [50, 130, 255, 255], "scrollbar_handle_down": [50, 130, 255, 255], - "setting_category": [240, 240, 240, 255], + "setting_category": "background_1", "setting_category_disabled": [255, 255, 255, 255], - "setting_category_hover": [232, 242, 252, 255], - "setting_category_active": [240, 240, 240, 255], - "setting_category_active_hover": [232, 242, 252, 255], - "setting_category_text": [35, 35, 35, 255], + "setting_category_hover": "background_2", + "setting_category_text": "text_default", "setting_category_disabled_text": [24, 41, 77, 101], - "setting_category_active_text": [35, 35, 35, 255], - "setting_category_active_hover_text": [35, 35, 35, 255], - "setting_category_hover_text": [35, 35, 35, 255], - "setting_category_border": [240, 240, 240, 255], - "setting_category_disabled_border": [240, 240, 240, 255], - "setting_category_hover_border": [50, 130, 255, 255], - "setting_category_active_border": [50, 130, 255, 255], - "setting_category_active_hover_border": [50, 130, 255, 255], - - "setting_control": [255, 255, 255, 255], - "setting_control_selected": [31, 36, 39, 255], - "setting_control_highlight": [255, 255, 255, 255], + "setting_category_active_text": "text_default", + + "setting_control": "background_2", + "setting_control_highlight": "background_3", "setting_control_border": [199, 199, 199, 255], "setting_control_border_highlight": [50, 130, 255, 255], "setting_control_text": [35, 35, 35, 255], @@ -327,12 +317,11 @@ "setting_control_disabled_text": [127, 127, 127, 255], "setting_control_disabled_border": [127, 127, 127, 255], "setting_unit": [127, 127, 127, 255], - "setting_validation_error_background": [255, 66, 60, 255], - "setting_validation_error": [127, 127, 127, 255], - "setting_validation_warning_background": [255, 145, 62, 255], - "setting_validation_warning": [127, 127, 127, 255], - "setting_validation_ok": [255, 255, 255, 255], - "setting_filter_field" : [153, 153, 153, 255], + "setting_validation_error_background": "um_red_1", + "setting_validation_error": "um_red_5", + "setting_validation_warning_background": "um_yellow_1", + "setting_validation_warning": "um_yellow_5", + "setting_validation_ok": "background_2", "material_compatibility_warning": [243, 166, 59, 255], @@ -348,14 +337,38 @@ "quality_slider_unavailable": [179, 179, 179, 255], "quality_slider_available": [0, 0, 0, 255], - "checkbox": [255, 255, 255, 255], - "checkbox_hover": [255, 255, 255, 255], + "checkbox": "background_1", + "checkbox_hover": "background_1", + "checkbox_disabled": "background_2", "checkbox_border": [180, 180, 180, 255], - "checkbox_border_hover": [25, 110, 240, 255], - "checkbox_mark": [35, 35, 35, 255], + "checkbox_border_hover": "border_main", + "checkbox_border_disabled": "text_disabled", + "checkbox_mark": "text_default", + "checkbox_mark_disabled": "text_disabled", "checkbox_square": [180, 180, 180, 255], - "checkbox_disabled": [223, 223, 223, 255], - "checkbox_text": [0, 12, 26, 255], + "checkbox_text": "text_default", + "checkbox_text_disabled": "text_disabled", + + "radio": "background_1", + "radio_disabled": "background_2", + "radio_selected": "accent_1", + "radio_selected_disabled": "text_disabled", + "radio_border": [180, 180, 180, 255], + "radio_border_hover": "border_main", + "radio_border_disabled": "text_disabled", + "radio_dot": "background_1", + "radio_dot_disabled": "background_2", + "radio_text": "text_default", + "radio_text_disabled": "text_disabled", + + "text_field": "background_1", + "text_field_border": [180, 180, 180, 255], + "text_field_border_hovered": "border_main", + "text_field_border_disabled": "border_main", + "text_field_text": "text_default", + "text_field_text_disabled": "text_disabled", + + "category_background": "background_2", "tooltip": [25, 25, 25, 255], "tooltip_text": [255, 255, 255, 255], @@ -377,7 +390,6 @@ "status_busy": [50, 130, 255, 255], "status_paused": [255, 140, 0, 255], "status_stopped": [236, 82, 80, 255], - "status_unknown": [127, 127, 127, 255], "disabled_axis": [127, 127, 127, 255], "x_axis": [218, 30, 40, 255], @@ -395,17 +407,13 @@ "disallowed_area": [0, 0, 0, 40], "error_area": [255, 0, 0, 127], - "model_default": [255, 201, 36, 255], "model_overhang": [255, 0, 0, 255], "model_unslicable": [122, 122, 122, 255], "model_unslicable_alt": [172, 172, 127, 255], "model_selection_outline": [50, 130, 255, 255], "model_non_printing": [122, 122, 122, 255], - "xray_error_dark": [255, 0, 0, 255], - "xray_error_light": [255, 255, 0, 255], "xray": [26, 26, 62, 255], - "xray_error": [255, 0, 0, 255], "layerview_ghost": [31, 31, 31, 95], "layerview_none": [255, 255, 255, 255], @@ -423,17 +431,6 @@ "layerview_nozzle": [224, 192, 16, 64], "layerview_starts": [255, 255, 255, 255], - "tab_status_connected": [50, 130, 255, 255], - "tab_status_disconnected": [200, 200, 200, 255], - - "printer_config_matched": [50, 130, 255, 255], - "printer_config_mismatch": [127, 127, 127, 255], - - "favorites_header_bar": [245, 245, 245, 255], - "favorites_header_hover": [245, 245, 245, 255], - "favorites_header_text": [31, 36, 39, 255], - "favorites_header_text_hover": [31, 36, 39, 255], - "favorites_row_selected": [196, 239, 255, 255], "monitor_printer_family_tag": [228, 228, 242, 255], "monitor_text_disabled": [238, 238, 238, 255], @@ -441,11 +438,6 @@ "monitor_icon_accent": [255, 255, 255, 255], "monitor_icon_disabled": [238, 238, 238, 255], - "monitor_secondary_button_hover": [232, 242, 252, 255], - "monitor_secondary_button": [240, 240, 240, 255], - "monitor_secondary_button_text": [30, 102, 215, 255], - "monitor_secondary_button_shadow": [216, 216, 216, 255], - "monitor_card_border": [192, 193, 194, 255], "monitor_card_background": [255, 255, 255, 255], "monitor_card_hover": [232, 242, 252, 255], @@ -453,10 +445,6 @@ "monitor_stage_background": [246, 246, 246, 255], "monitor_stage_background_fade": [246, 246, 246, 102], - "monitor_progress_bar_fill": [50, 130, 255, 255], - "monitor_progress_bar_deactive": [192, 193, 194, 255], - "monitor_progress_bar_empty": [245, 245, 245, 255], - "monitor_tooltip": [25, 25, 25, 255], "monitor_tooltip_text": [255, 255, 255, 255], "monitor_context_menu": [255, 255, 255, 255], @@ -473,25 +461,24 @@ "cloud_unavailable": [153, 153, 153, 255], "connection_badge_background": [255, 255, 255, 255], "warning_badge_background": [0, 0, 0, 255], - "error_badge_background": [255, 255, 255, 255] + "error_badge_background": [255, 255, 255, 255], + + "border_field_light": [180, 180, 180, 255], + "border_main_light": [212, 212, 212, 255] }, "sizes": { "window_minimum_size": [80, 48], - "large_popup_dialog": [48, 40], "popup_dialog": [40, 36], "small_popup_dialog": [36, 12], "main_window_header": [0.0, 4.0], - "main_window_header_button": [8, 2.35], - "main_window_header_button_icon": [1.2, 1.2], "stage_menu": [0.0, 4.0], "account_button": [12, 2.5], "print_setup_widget": [38.0, 30.0], - "print_setup_mode_toggle": [0.0, 2.0], "print_setup_extruder_box": [0.0, 6.0], "print_setup_slider_groove": [0.16, 0.16], "print_setup_slider_handle": [1.0, 1.0], @@ -506,7 +493,6 @@ "expandable_component_content_header": [0.0, 3.0], "configuration_selector": [35.0, 4.0], - "configuration_selector_mode_tabs": [1.0, 3.0], "action_panel_widget": [26.0, 0.0], "action_panel_information_widget": [20.0, 0.0], @@ -537,20 +523,17 @@ "extruder_icon": [2.5, 2.5], "section": [0.0, 2], + "section_header": [0.0, 2.5], + "section_control": [0, 1], - "section_icon": [2, 2], + "section_icon": [1.5, 1.5], "section_icon_column": [2.5, 2.5], - "rating_star": [1.0, 1.0], - "card": [25.0, 6.0], "setting": [25.0, 1.8], "setting_control": [11.0, 2.0], "setting_control_radius": [0.15, 0.15], "setting_control_depth_margin": [1.4, 0.0], - "setting_preferences_button_margin": [4, 0.0], - "setting_control_margin": [0.0, 0.0], "setting_unit_margin": [0.5, 0.5], - "setting_text_maxwidth": [40.0, 0.0], "standard_list_lineheight": [1.5, 1.5], "standard_arrow": [1.0, 1.0], @@ -561,13 +544,11 @@ "button": [4, 4], "button_icon": [2.5, 2.5], - "button_lining": [0, 0], "action_button": [15.0, 2.5], "action_button_icon": [1.5, 1.5], "action_button_icon_small": [1.0, 1.0], "action_button_radius": [0.15, 0.15], - "dialog_primary_button_padding": [3.0, 0], "radio_button": [1.3, 1.3], @@ -577,24 +558,17 @@ "medium_button": [2.5, 2.5], "medium_button_icon": [2, 2], - "favorites_row": [2, 2], - "favorites_button": [2, 2], - "favorites_button_icon": [1.2, 1.2], + "context_menu": [20, 2], - "icon_indicator_background": [1.5, 1.5], "icon_indicator": [1, 1], "printer_status_icon": [1.0, 1.0], - "printer_sync_icon": [1.2, 1.2], "button_tooltip": [1.0, 1.3], "button_tooltip_arrow": [0.25, 0.25], - "tool_button_border": [1.0, 0], - "progressbar": [26.0, 0.75], "progressbar_radius": [0.15, 0.15], - "progressbar_control": [8.0, 0.75], "scrollbar": [0.75, 0.5], @@ -610,26 +584,25 @@ "checkbox": [1.33, 1.33], "checkbox_mark": [1, 1], - "checkbox_square": [0.83, 0.83], "checkbox_radius": [0.25, 0.25], - "checkbox_label_padding": [0.5, 0.5], + + "spinbox": [6.0, 3.0], + "combobox": [14, 2], + "combobox_wide": [22, 2], "tooltip": [20.0, 10.0], "tooltip_margins": [1.0, 1.0], "tooltip_arrow_margins": [2.0, 2.0], - "save_button_text_margin": [0.3, 0.6], "save_button_save_to_button": [0.3, 2.7], "save_button_specs_icons": [1.4, 1.4], - "job_specs_button": [2.7, 2.7], "first_run_shadow_radius": [1.2, 1.2], "monitor_preheat_temperature_control": [4.5, 2.0], "welcome_wizard_window": [46, 50], "modal_window_minimum": [60.0, 45], - "license_window_minimum": [45, 45], "wizard_progress": [10.0, 0.0], "message": [30.0, 5.0], @@ -638,34 +611,21 @@ "message_action_button": [0, 2.5], "message_image": [15.0, 10.0], "message_type_icon": [2, 2], - - "infill_button_margin": [0.5, 0.5], + "menu": [18, 2], "jobspecs_line": [2.0, 2.0], "objects_menu_size": [15, 15], - "objects_menu_size_collapsed": [20, 17], - "build_plate_selection_size": [15, 5], - "objects_menu_button": [0.3, 2.7], "notification_icon": [1.5, 1.5], "avatar_image": [6.8, 6.8], - "monitor_config_override_box": [1.0, 14.0], - "monitor_extruder_circle": [2.75, 2.75], - "monitor_text_line": [1.5, 1.5], - "monitor_text_line_large": [2.33, 2.33], - "monitor_thick_lining": [0.16, 0.16], - "monitor_corner_radius": [0.3, 0.3], "monitor_shadow_radius": [0.4, 0.4], - "monitor_shadow_offset": [0.15, 0.15], "monitor_empty_state_offset": [5.6, 5.6], "monitor_empty_state_size": [35.0, 25.0], - "monitor_external_link_icon": [1.16, 1.16], "monitor_column": [18.0, 1.0], "monitor_progress_bar": [16.5, 1.0], - "monitor_margin": [1.5, 1.5], "table_row": [2.0, 2.0], @@ -674,6 +634,8 @@ "banner_icon_size": [2.0, 2.0], - "marketplace_large_icon": [4.0, 4.0] + "marketplace_large_icon": [4.0, 4.0], + + "preferences_page_list_item": [8.0, 2.0] } } diff --git a/resources/variants/ultimaker2_extended_olsson_0.25.inst.cfg b/resources/variants/ultimaker2_extended_olsson_0.25.inst.cfg index ffbd25a630..c8fe08a93b 100644 --- a/resources/variants/ultimaker2_extended_olsson_0.25.inst.cfg +++ b/resources/variants/ultimaker2_extended_olsson_0.25.inst.cfg @@ -11,3 +11,4 @@ hardware_type = nozzle [values] machine_nozzle_size = 0.25 machine_nozzle_tip_outer_diameter = 0.8 +wall_thickness = =wall_line_width_0 + wall_line_width_x * 2
\ No newline at end of file diff --git a/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg b/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg index c934ca03c4..6a9bdfe81e 100644 --- a/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg +++ b/resources/variants/ultimaker2_extended_plus_0.25.inst.cfg @@ -16,3 +16,4 @@ coasting_min_volume = 0.17 speed_wall = =round(speed_print / 1.2, 1) speed_wall_0 = =1 if speed_wall < 5 else (speed_wall - 5) speed_topbottom = =round(speed_print / 1.5, 1) +wall_thickness = =wall_line_width_0 + wall_line_width_x * 2 diff --git a/resources/variants/ultimaker2_olsson_0.25.inst.cfg b/resources/variants/ultimaker2_olsson_0.25.inst.cfg index 2419f4c56e..07a9a9649e 100644 --- a/resources/variants/ultimaker2_olsson_0.25.inst.cfg +++ b/resources/variants/ultimaker2_olsson_0.25.inst.cfg @@ -12,3 +12,4 @@ hardware_type = nozzle machine_nozzle_size = 0.25 machine_nozzle_tip_outer_diameter = 0.8 raft_airgap = 0.25 +wall_thickness = =wall_line_width_0 + wall_line_width_x * 2
\ No newline at end of file diff --git a/resources/variants/ultimaker2_plus_0.25.inst.cfg b/resources/variants/ultimaker2_plus_0.25.inst.cfg index f48df57e8a..f4685c659a 100644 --- a/resources/variants/ultimaker2_plus_0.25.inst.cfg +++ b/resources/variants/ultimaker2_plus_0.25.inst.cfg @@ -17,3 +17,4 @@ raft_airgap = 0.25 speed_topbottom = =round(speed_print / 1.5, 1) speed_wall = =round(speed_print / 1.2, 1) speed_wall_0 = =1 if speed_wall < 5 else (speed_wall - 5) +wall_thickness = =wall_line_width_0 + wall_line_width_x * 2
\ No newline at end of file diff --git a/resources/variants/ultimaker2_plus_connect_0.25.inst.cfg b/resources/variants/ultimaker2_plus_connect_0.25.inst.cfg index 36d98a5d8f..63182db79a 100644 --- a/resources/variants/ultimaker2_plus_connect_0.25.inst.cfg +++ b/resources/variants/ultimaker2_plus_connect_0.25.inst.cfg @@ -18,3 +18,4 @@ retraction_prime_speed = =retraction_speed speed_topbottom = =round(speed_print / 1.5, 1) speed_wall = =round(speed_print / 1.2, 1) speed_wall_0 = =1 if speed_wall < 5 else (speed_wall - 5) +wall_thickness = =wall_line_width_0 + wall_line_width_x * 2
\ No newline at end of file diff --git a/resources/variants/ultimaker3_aa0.25.inst.cfg b/resources/variants/ultimaker3_aa0.25.inst.cfg index e510bac6a8..55083c0f14 100644 --- a/resources/variants/ultimaker3_aa0.25.inst.cfg +++ b/resources/variants/ultimaker3_aa0.25.inst.cfg @@ -44,5 +44,5 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = 1.2 -wall_thickness = 1.3 +wall_thickness = =wall_line_width_0 + wall_line_width_x * 2 xy_offset_layer_0 = =(-0.2 if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset diff --git a/resources/variants/ultimaker3_aa0.8.inst.cfg b/resources/variants/ultimaker3_aa0.8.inst.cfg index abe079eeb5..1f75b862d0 100644 --- a/resources/variants/ultimaker3_aa0.8.inst.cfg +++ b/resources/variants/ultimaker3_aa0.8.inst.cfg @@ -53,4 +53,3 @@ switch_extruder_prime_speed = 20 switch_extruder_retraction_amount = 16.5 top_bottom_thickness = 1.4 wall_0_inset = 0 -wall_thickness = 2 diff --git a/resources/variants/ultimaker3_aa04.inst.cfg b/resources/variants/ultimaker3_aa04.inst.cfg index 8362a52fb5..7c24475a38 100644 --- a/resources/variants/ultimaker3_aa04.inst.cfg +++ b/resources/variants/ultimaker3_aa04.inst.cfg @@ -39,5 +39,4 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = 1.2 -wall_thickness = 1.3 xy_offset_layer_0 = =(-0.2 if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset diff --git a/resources/variants/ultimaker3_bb0.8.inst.cfg b/resources/variants/ultimaker3_bb0.8.inst.cfg index af5daf9f11..43cd08faeb 100644 --- a/resources/variants/ultimaker3_bb0.8.inst.cfg +++ b/resources/variants/ultimaker3_bb0.8.inst.cfg @@ -84,4 +84,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 12 top_bottom_thickness = 1 wall_0_inset = 0 -wall_thickness = 1 diff --git a/resources/variants/ultimaker3_extended_aa0.25.inst.cfg b/resources/variants/ultimaker3_extended_aa0.25.inst.cfg index c26249a17b..602158b29b 100644 --- a/resources/variants/ultimaker3_extended_aa0.25.inst.cfg +++ b/resources/variants/ultimaker3_extended_aa0.25.inst.cfg @@ -44,5 +44,5 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = 1.2 -wall_thickness = 1.3 +wall_thickness = =wall_line_width_0 + wall_line_width_x * 2 xy_offset_layer_0 = =(-0.2 if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
\ No newline at end of file diff --git a/resources/variants/ultimaker3_extended_aa0.8.inst.cfg b/resources/variants/ultimaker3_extended_aa0.8.inst.cfg index 0f603036b8..bf8d74c344 100644 --- a/resources/variants/ultimaker3_extended_aa0.8.inst.cfg +++ b/resources/variants/ultimaker3_extended_aa0.8.inst.cfg @@ -53,4 +53,3 @@ switch_extruder_prime_speed = 20 switch_extruder_retraction_amount = 16.5 top_bottom_thickness = 1.4 wall_0_inset = 0 -wall_thickness = 2 diff --git a/resources/variants/ultimaker3_extended_aa04.inst.cfg b/resources/variants/ultimaker3_extended_aa04.inst.cfg index 2a523703b6..e875fd4263 100644 --- a/resources/variants/ultimaker3_extended_aa04.inst.cfg +++ b/resources/variants/ultimaker3_extended_aa04.inst.cfg @@ -39,5 +39,4 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = 1.2 -wall_thickness = 1.3 xy_offset_layer_0 = =(-0.2 if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset
\ No newline at end of file diff --git a/resources/variants/ultimaker3_extended_bb0.8.inst.cfg b/resources/variants/ultimaker3_extended_bb0.8.inst.cfg index b73d5c2bc7..9dbd34093d 100644 --- a/resources/variants/ultimaker3_extended_bb0.8.inst.cfg +++ b/resources/variants/ultimaker3_extended_bb0.8.inst.cfg @@ -84,4 +84,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 12 top_bottom_thickness = 1 wall_0_inset = 0 -wall_thickness = 1 diff --git a/resources/variants/ultimaker_s3_aa0.25.inst.cfg b/resources/variants/ultimaker_s3_aa0.25.inst.cfg index 9b0714b7bb..ebcd507377 100644 --- a/resources/variants/ultimaker_s3_aa0.25.inst.cfg +++ b/resources/variants/ultimaker_s3_aa0.25.inst.cfg @@ -44,4 +44,4 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = 1.2 -wall_thickness = 1.3 +wall_thickness = =wall_line_width_0 + wall_line_width_x * 2 diff --git a/resources/variants/ultimaker_s3_aa0.8.inst.cfg b/resources/variants/ultimaker_s3_aa0.8.inst.cfg index 3bc112c7fa..8284a48ce3 100644 --- a/resources/variants/ultimaker_s3_aa0.8.inst.cfg +++ b/resources/variants/ultimaker_s3_aa0.8.inst.cfg @@ -54,4 +54,3 @@ switch_extruder_prime_speed = 20 switch_extruder_retraction_amount = 16.5 top_bottom_thickness = 1.4 wall_0_inset = 0 -wall_thickness = 2 diff --git a/resources/variants/ultimaker_s3_aa04.inst.cfg b/resources/variants/ultimaker_s3_aa04.inst.cfg index 9e56a0e75e..5cbc772525 100644 --- a/resources/variants/ultimaker_s3_aa04.inst.cfg +++ b/resources/variants/ultimaker_s3_aa04.inst.cfg @@ -38,4 +38,3 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = 1.2 -wall_thickness = 1.3 diff --git a/resources/variants/ultimaker_s3_bb0.8.inst.cfg b/resources/variants/ultimaker_s3_bb0.8.inst.cfg index 5f6373338b..72d4cb3a9c 100644 --- a/resources/variants/ultimaker_s3_bb0.8.inst.cfg +++ b/resources/variants/ultimaker_s3_bb0.8.inst.cfg @@ -82,4 +82,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 12 top_bottom_thickness = 1 wall_0_inset = 0 -wall_thickness = 1 diff --git a/resources/variants/ultimaker_s3_cc04.inst.cfg b/resources/variants/ultimaker_s3_cc04.inst.cfg index 3f61f5d326..7cd5454fbf 100644 --- a/resources/variants/ultimaker_s3_cc04.inst.cfg +++ b/resources/variants/ultimaker_s3_cc04.inst.cfg @@ -43,4 +43,3 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = =layer_height * 6 -wall_thickness = =line_width * 3 diff --git a/resources/variants/ultimaker_s3_cc06.inst.cfg b/resources/variants/ultimaker_s3_cc06.inst.cfg index 9a216b8506..a01a58fef8 100644 --- a/resources/variants/ultimaker_s3_cc06.inst.cfg +++ b/resources/variants/ultimaker_s3_cc06.inst.cfg @@ -43,4 +43,3 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = =layer_height * 6 -wall_thickness = =line_width * 3 diff --git a/resources/variants/ultimaker_s5_aa0.25.inst.cfg b/resources/variants/ultimaker_s5_aa0.25.inst.cfg index 91f05ac857..23fd6a0b71 100644 --- a/resources/variants/ultimaker_s5_aa0.25.inst.cfg +++ b/resources/variants/ultimaker_s5_aa0.25.inst.cfg @@ -44,5 +44,5 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = 1.2 -wall_thickness = 1.3 +wall_thickness = =wall_line_width_0 + wall_line_width_x * 2 xy_offset_layer_0 = =(-0.2 if adhesion_type == "skirt" or adhesion_type == "none" else 0) + xy_offset diff --git a/resources/variants/ultimaker_s5_aa0.8.inst.cfg b/resources/variants/ultimaker_s5_aa0.8.inst.cfg index 75581681f9..2ec650e81d 100644 --- a/resources/variants/ultimaker_s5_aa0.8.inst.cfg +++ b/resources/variants/ultimaker_s5_aa0.8.inst.cfg @@ -54,4 +54,3 @@ switch_extruder_prime_speed = 20 switch_extruder_retraction_amount = 16.5 top_bottom_thickness = 1.4 wall_0_inset = 0 -wall_thickness = 2 diff --git a/resources/variants/ultimaker_s5_aa04.inst.cfg b/resources/variants/ultimaker_s5_aa04.inst.cfg index 923d8cadec..e5507ba661 100644 --- a/resources/variants/ultimaker_s5_aa04.inst.cfg +++ b/resources/variants/ultimaker_s5_aa04.inst.cfg @@ -38,4 +38,3 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = 1.2 -wall_thickness = 1.3 diff --git a/resources/variants/ultimaker_s5_bb0.8.inst.cfg b/resources/variants/ultimaker_s5_bb0.8.inst.cfg index 4c43f2da26..ae2b8020a4 100644 --- a/resources/variants/ultimaker_s5_bb0.8.inst.cfg +++ b/resources/variants/ultimaker_s5_bb0.8.inst.cfg @@ -82,4 +82,3 @@ switch_extruder_prime_speed = 15 switch_extruder_retraction_amount = 12 top_bottom_thickness = 1 wall_0_inset = 0 -wall_thickness = 1 diff --git a/resources/variants/ultimaker_s5_cc04.inst.cfg b/resources/variants/ultimaker_s5_cc04.inst.cfg index 6934706bcd..b745ab8a6c 100644 --- a/resources/variants/ultimaker_s5_cc04.inst.cfg +++ b/resources/variants/ultimaker_s5_cc04.inst.cfg @@ -43,4 +43,3 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = =layer_height * 6 -wall_thickness = =line_width * 3 diff --git a/resources/variants/ultimaker_s5_cc06.inst.cfg b/resources/variants/ultimaker_s5_cc06.inst.cfg index 98821ca002..0a87570372 100644 --- a/resources/variants/ultimaker_s5_cc06.inst.cfg +++ b/resources/variants/ultimaker_s5_cc06.inst.cfg @@ -43,4 +43,3 @@ support_z_distance = =layer_height * 2 switch_extruder_prime_speed = =switch_extruder_retraction_speeds switch_extruder_retraction_amount = =machine_heat_zone_length top_bottom_thickness = =layer_height * 6 -wall_thickness = =line_width * 3 diff --git a/tests/TestBuildVolume.py b/tests/TestBuildVolume.py index 7bc629962d..9a1c29da6c 100644 --- a/tests/TestBuildVolume.py +++ b/tests/TestBuildVolume.py @@ -57,6 +57,7 @@ class TestCalculateBedAdhesionSize: "machine_depth": {"value": 200}, "skirt_line_count": {"value": 0}, "skirt_gap": {"value": 0}, + "brim_gap": {"value": 0}, "raft_margin": {"value": 0}, "material_shrinkage_percentage": {"value": 100.0}, "material_shrinkage_percentage_xy": {"value": 100.0}, |