From ec9441df99e6f4a7d4af848efeaa07e2e3320052 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Mon, 18 Sep 2017 07:54:43 +0100 Subject: [PATCH 01/23] Added infill_offset_x and infill_offset_y settings. --- resources/definitions/fdmprinter.def.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index d0e77a15fe..539efe383c 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1405,6 +1405,28 @@ "limit_to_extruder": "infill_extruder_nr", "settable_per_mesh": true }, + "infill_offset_x": + { + "label": "Infill X Offset", + "description": "The infill pattern is offset this distance along the X axis.", + "unit": "mm", + "type": "float", + "default_value": 0, + "enabled": "infill_pattern == 'grid' or infill_pattern == 'lines' or infill_pattern == 'triangles' or infill_pattern == 'cubic' or infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' or infill_pattern == 'zigzag'", + "limit_to_extruder": "infill_extruder_nr", + "settable_per_mesh": true + }, + "infill_offset_y": + { + "label": "Infill Y Offset", + "description": "The infill pattern is offset this distance along the Y axis.", + "unit": "mm", + "type": "float", + "default_value": 0, + "enabled": "infill_pattern == 'grid' or infill_pattern == 'lines' or infill_pattern == 'triangles' or infill_pattern == 'cubic' or infill_pattern == 'tetrahedral' or infill_pattern == 'quarter_cubic' or infill_pattern == 'zigzag'", + "limit_to_extruder": "infill_extruder_nr", + "settable_per_mesh": true + }, "sub_div_rad_add": { "label": "Cubic Subdivision Shell", From 6641415a38ff1c6a30f9db4afd22399cb7a3159f Mon Sep 17 00:00:00 2001 From: krisrok Date: Mon, 25 Sep 2017 23:43:45 +0200 Subject: [PATCH 02/23] refine abort sequence homing the head with "G28" does not work on my printer for some reason. "G28 X" and "G28 Y" however do. this fix should not break behaviour on other printers as "G28" is just a shortcut. --- plugins/USBPrinting/USBPrinterOutputDevice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 4d3b8446a3..428caebd4b 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -119,7 +119,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice): self._sendCommand("G0 Y%s F%s" % (z, speed)) def _homeHead(self): - self._sendCommand("G28") + self._sendCommand("G28 X") + self._sendCommand("G28 Y") def _homeBed(self): self._sendCommand("G28 Z") From 68b4dfd3c328babfa8724da2e5dae3317cddea15 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 27 Sep 2017 17:29:30 +0200 Subject: [PATCH 03/23] Fix spelling mistake Contributes to issue CURA-4341. --- plugins/3MFReader/WorkspaceDialog.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index 2363f16b9d..32bb139648 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -362,7 +362,7 @@ UM.Dialog Label { id: warningLabel - text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the buildplate") + text: catalog.i18nc("@action:warning", "Loading a project will clear all models on the build plate.") wrapMode: Text.Wrap } } From 94846d0faf3498e74054c057eb4111f948c39ffe Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 27 Sep 2017 17:30:29 +0200 Subject: [PATCH 04/23] Add missing word I'm guessing it was 'This'. That must've accidentally gotten selected when working with it. Contributes to issue CURA-4341. --- plugins/PluginBrowser/PluginBrowser.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PluginBrowser/PluginBrowser.qml b/plugins/PluginBrowser/PluginBrowser.qml index cbb60aed70..71e88c652b 100644 --- a/plugins/PluginBrowser/PluginBrowser.qml +++ b/plugins/PluginBrowser/PluginBrowser.qml @@ -217,7 +217,7 @@ UM.Dialog anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right - text: licenseDialog.pluginName + catalog.i18nc("@label", " plugin contains a license.\nYou need to accept this license to install this plugin.\nDo you agree with the terms below?") + text: licenseDialog.pluginName + catalog.i18nc("@label", "This plugin contains a license.\nYou need to accept this license to install this plugin.\nDo you agree with the terms below?") wrapMode: Text.Wrap } From 2715ef604dccc72027d1572649474d733a039807 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 27 Sep 2017 17:31:26 +0200 Subject: [PATCH 05/23] Use lower case text for translation, then transform to upper case The formatting is done in QML, regardless of how the data looks. Contributes to issue CURA-4341. --- plugins/UM3NetworkPrinting/ClusterControlItem.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/ClusterControlItem.qml index 6558720943..be86e04185 100644 --- a/plugins/UM3NetworkPrinting/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/ClusterControlItem.qml @@ -33,7 +33,7 @@ Component { id: printerGroupLabel anchors.top: activePrintersLabel.bottom - text: catalog.i18nc("@label", "PRINTER GROUP") + text: catalog.i18nc("@label", "Printer Group").toUpperCase() anchors.horizontalCenter: parent.horizontalCenter font: UM.Theme.getFont("very_small") opacity: 0.65 From df14ea2b1a32dceefc26848e246b70a240334ee8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 27 Sep 2017 17:32:24 +0200 Subject: [PATCH 06/23] Proper capitalisation of 'OK' This is consistent with the rest. Contributes to issue CURA-4341. --- plugins/UM3NetworkPrinting/DiscoverUM3Action.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml b/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml index 5ea7d77d8a..11ebdd818b 100644 --- a/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml +++ b/plugins/UM3NetworkPrinting/DiscoverUM3Action.qml @@ -378,7 +378,7 @@ Cura.MachineAction }, Button { id: btnOk - text: catalog.i18nc("@action:button", "Ok") + text: catalog.i18nc("@action:button", "OK") onClicked: { manualPrinterDialog.accept() From d999d1c7f26b81bb476eaa619c12637b668974af Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 27 Sep 2017 17:32:47 +0200 Subject: [PATCH 07/23] Remove extra space Just a typo. Contributes to issue CURA-4341. --- plugins/UM3NetworkPrinting/OpenPanelButton.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/OpenPanelButton.qml b/plugins/UM3NetworkPrinting/OpenPanelButton.qml index 3915c1f9eb..2a59d0fa83 100644 --- a/plugins/UM3NetworkPrinting/OpenPanelButton.qml +++ b/plugins/UM3NetworkPrinting/OpenPanelButton.qml @@ -11,7 +11,7 @@ Button { UM.I18nCatalog { id: catalog; name: "cura"; } height: UM.Theme.getSize("save_button_save_to_button").height - tooltip: catalog.i18nc("@info:tooltip", "Opens the print jobs page with your default web browser.") + tooltip: catalog.i18nc("@info:tooltip", "Opens the print jobs page with your default web browser.") text: catalog.i18nc("@action:button", "View print jobs") style: UM.Theme.styles.sidebar_action_button From e56a6214d2c5b4d9832cc66fc0bdf54b92179d71 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 27 Sep 2017 17:33:17 +0200 Subject: [PATCH 08/23] Fix grammar mistake These are two sentences. Contributes to issue CURA-4341. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 06bc04b1fe..26a8be6318 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3986,7 +3986,7 @@ "skirt_gap": { "label": "Skirt Distance", - "description": "The horizontal distance between the skirt and the first layer of the print.\nThis is the minimum distance, multiple skirt lines will extend outwards from this distance.", + "description": "The horizontal distance between the skirt and the first layer of the print.\nThis is the minimum distance. Multiple skirt lines will extend outwards from this distance.", "unit": "mm", "type": "float", "default_value": 3, From c4fc4a7198eb564b061d2c398506e8a87cdc7cb4 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 27 Sep 2017 17:34:12 +0200 Subject: [PATCH 09/23] Add better descriptions for abbreviated units This should help the translators next time to find better translations. Contributes to issue CURA-4341. --- resources/qml/Sidebar.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index cdfe5e7a81..b0971ba15f 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -324,7 +324,7 @@ Rectangle anchors.bottom: timeSpecDescription.top font: UM.Theme.getFont("large") color: UM.Theme.getColor("text_subtext") - text: (!base.printDuration || !base.printDuration.valid) ? catalog.i18nc("@label", "00h 00min") : base.printDuration.getDisplayString(UM.DurationFormat.Short) + text: (!base.printDuration || !base.printDuration.valid) ? catalog.i18nc("@label Hours and minutes", "00h 00min") : base.printDuration.getDisplayString(UM.DurationFormat.Short) MouseArea { @@ -407,12 +407,12 @@ Rectangle } if(someCostsKnown) { - return catalog.i18nc("@label", "%1m / ~ %2g / ~ %4 %3").arg(lengths.join(" + ")) + return catalog.i18nc("@label Print estimates: m for meters, g for grams, %4 is currency and %3 is print cost", "%1m / ~ %2g / ~ %4 %3").arg(lengths.join(" + ")) .arg(weights.join(" + ")).arg(costs.join(" + ")).arg(UM.Preferences.getValue("cura/currency")); } else { - return catalog.i18nc("@label", "%1m / ~ %2g").arg(lengths.join(" + ")).arg(weights.join(" + ")); + return catalog.i18nc("@label Print estimates: m for meters, g for grams", "%1m / ~ %2g").arg(lengths.join(" + ")).arg(weights.join(" + ")); } } } From 729d61082af679dd5fab7aac090c9a44e53575ee Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 28 Sep 2017 12:58:03 +0200 Subject: [PATCH 10/23] add CuraEngine to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 616d325ffb..5a077bd6b2 100644 --- a/.gitignore +++ b/.gitignore @@ -57,4 +57,6 @@ cmake_install.cmake #Debug *.gcode run.sh +.scannerwork/ +CuraEngine From fd8ca6958197f4d4e9fcdfc1edcc5bbdccd8fd36 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 28 Sep 2017 15:32:02 +0200 Subject: [PATCH 11/23] Comment out visibility of flow temperature graph Apparently it's not allowed to be in there. By being commented out I hope that a future developer won't make the same mistake and add it there to be editable in the interface. --- cura/Settings/MaterialSettingsVisibilityHandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/Settings/MaterialSettingsVisibilityHandler.py b/cura/Settings/MaterialSettingsVisibilityHandler.py index 44569ea0c3..5b6050d2c0 100644 --- a/cura/Settings/MaterialSettingsVisibilityHandler.py +++ b/cura/Settings/MaterialSettingsVisibilityHandler.py @@ -1,5 +1,5 @@ # Copyright (c) 2017 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. +# Cura is released under the terms of the LGPLv3 or higher. import UM.Settings.Models.SettingVisibilityHandler @@ -11,7 +11,7 @@ class MaterialSettingsVisibilityHandler(UM.Settings.Models.SettingVisibilityHand "default_material_print_temperature", "material_bed_temperature", "material_standby_temperature", - "material_flow_temp_graph", + #"material_flow_temp_graph", "cool_fan_speed", "retraction_amount", "retraction_speed", From 1715f0578d85b3d837c1b80938e1dcba62d53385 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 28 Sep 2017 15:38:29 +0200 Subject: [PATCH 12/23] Apply screenScaleFactor to Cura Connect UI Any pixel size specified in QML should not either use UM.Theme.getSize(), or use screenScaleFactor to make sure the pixel size is as intended on OSX, Windows and Linux regardless of display DPI. Contributes to CURA-4376 --- plugins/UM3NetworkPrinting/ClusterControlItem.qml | 2 +- plugins/UM3NetworkPrinting/ClusterMonitorItem.qml | 8 ++++---- plugins/UM3NetworkPrinting/PrintWindow.qml | 10 +++++----- plugins/UM3NetworkPrinting/PrinterInfoBlock.qml | 8 ++++---- plugins/UM3NetworkPrinting/PrinterTile.qml | 10 +++++----- plugins/UM3NetworkPrinting/PrinterVideoStream.qml | 8 ++++---- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/plugins/UM3NetworkPrinting/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/ClusterControlItem.qml index be86e04185..bcb5b0bd57 100644 --- a/plugins/UM3NetworkPrinting/ClusterControlItem.qml +++ b/plugins/UM3NetworkPrinting/ClusterControlItem.qml @@ -12,7 +12,7 @@ Component property var manager: Cura.MachineManager.printerOutputDevices[0] anchors.fill: parent property var lineColor: "#DCDCDC" // TODO: Should be linked to theme. - property var cornerRadius: 4 // TODO: Should be linked to theme. + property var cornerRadius: 4 * screenScaleFactor // TODO: Should be linked to theme. visible: manager != null diff --git a/plugins/UM3NetworkPrinting/ClusterMonitorItem.qml b/plugins/UM3NetworkPrinting/ClusterMonitorItem.qml index d39cdab81e..48fb0a33fc 100644 --- a/plugins/UM3NetworkPrinting/ClusterMonitorItem.qml +++ b/plugins/UM3NetworkPrinting/ClusterMonitorItem.qml @@ -15,7 +15,7 @@ Component property var emphasisColor: "#44c0ff" //TODO: should be linked to theme. property var lineColor: "#DCDCDC" // TODO: Should be linked to theme. - property var cornerRadius: 4 // TODO: Should be linked to theme. + property var cornerRadius: 4 * screenScaleFactor // TODO: Should be linked to theme. UM.I18nCatalog { id: catalog @@ -50,7 +50,7 @@ Component anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter - width: Math.min(800, maximumWidth) + width: Math.min(800 * screenScaleFactor, maximumWidth) height: children.height visible: OutputDevice.connectedPrinters.length != 0 @@ -90,8 +90,8 @@ Component delegate: PrinterInfoBlock { printer: modelData - width: Math.min(800, maximumWidth) - height: 125 + width: Math.min(800 * screenScaleFactor, maximumWidth) + height: 125 * screenScaleFactor // Add a 1 pix margin, as the border is sometimes cut off otherwise. anchors.horizontalCenter: parent.horizontalCenter diff --git a/plugins/UM3NetworkPrinting/PrintWindow.qml b/plugins/UM3NetworkPrinting/PrintWindow.qml index 940993556f..7afe174da2 100644 --- a/plugins/UM3NetworkPrinting/PrintWindow.qml +++ b/plugins/UM3NetworkPrinting/PrintWindow.qml @@ -11,8 +11,8 @@ UM.Dialog { id: base; - minimumWidth: 500 - minimumHeight: 140 + minimumWidth: 500 * screenScaleFactor + minimumHeight: 140 * screenScaleFactor maximumWidth: minimumWidth maximumHeight: minimumHeight width: minimumWidth @@ -31,7 +31,7 @@ UM.Dialog anchors.topMargin: UM.Theme.getSize("default_margin").height anchors.leftMargin: UM.Theme.getSize("default_margin").width anchors.rightMargin: UM.Theme.getSize("default_margin").width - height: 50 + height: 50 * screenScaleFactor Label { @@ -44,7 +44,7 @@ UM.Dialog } text: "Printer selection" wrapMode: Text.Wrap - height: 20 + height: 20 * screenScaleFactor } ComboBox @@ -54,7 +54,7 @@ UM.Dialog textRole: "friendly_name" width: parent.width - height: 40 + height: 40 * screenScaleFactor Behavior on height { NumberAnimation { duration: 100 } } onActivated: diff --git a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml index bab7db41d4..f0736bca80 100644 --- a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml @@ -137,7 +137,7 @@ Rectangle Rectangle // Camera icon { id: showCameraIcon - width: 40 + width: 40 * screenScaleFactor height: width radius: width anchors.right: printProgressArea.left @@ -161,7 +161,7 @@ Rectangle width: parent.width / 2 - UM.Theme.getSize("default_margin").width height: childrenRect.height - spacing: 10 + spacing: 10 * screenScaleFactor PrintCoreConfiguration { @@ -173,7 +173,7 @@ Rectangle Rectangle { id: extruderSeperator - width: 1 + width: 1 * screenScaleFactor height: parent.height color: lineColor } @@ -215,7 +215,7 @@ Rectangle width: parent.width //border.width: UM.Theme.getSize("default_lining").width //border.color: lineColor - height: 40 + height: 40 * screenScaleFactor anchors.left: parent.left Label diff --git a/plugins/UM3NetworkPrinting/PrinterTile.qml b/plugins/UM3NetworkPrinting/PrinterTile.qml index f240f3034f..3d03e93688 100644 --- a/plugins/UM3NetworkPrinting/PrinterTile.qml +++ b/plugins/UM3NetworkPrinting/PrinterTile.qml @@ -8,8 +8,8 @@ import Cura 1.0 as Cura Rectangle { id: base - width: 250 - height: 250 + width: 250 * screenScaleFactor + height: 250 * screenScaleFactor signal clicked() MouseArea { @@ -19,8 +19,8 @@ Rectangle Rectangle { // TODO: Actually add UM icon / picture - width: 100 - height: 100 + width: 100 * screenScaleFactor + height: 100 * screenScaleFactor border.width: UM.Theme.getSize("default_lining").width anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top @@ -47,7 +47,7 @@ Rectangle anchors.bottom: parent.bottom anchors.bottomMargin: UM.Theme.getSize("default_margin").height font: UM.Theme.getFont("default") - height:10 + height:10 * screenScaleFactor anchors.horizontalCenter: parent.horizontalCenter } } diff --git a/plugins/UM3NetworkPrinting/PrinterVideoStream.qml b/plugins/UM3NetworkPrinting/PrinterVideoStream.qml index 4f138ee8d1..fe60d30dd4 100644 --- a/plugins/UM3NetworkPrinting/PrinterVideoStream.qml +++ b/plugins/UM3NetworkPrinting/PrinterVideoStream.qml @@ -29,8 +29,8 @@ Item anchors.right: cameraImage.right // TODO: Harcoded sizes - width: 20 - height: 20 + width: 20 * screenScaleFactor + height: 20 * screenScaleFactor onClicked: OutputDevice.selectAutomaticPrinter() @@ -56,8 +56,8 @@ Item Image { id: cameraImage - width: Math.min(sourceSize.width === 0 ? 800 : sourceSize.width, maximumWidth) - height: (sourceSize.height === 0 ? 600 : sourceSize.height) * width / sourceSize.width + width: Math.min(sourceSize.width === 0 ? 800 * screenScaleFactor : sourceSize.width, maximumWidth) + height: (sourceSize.height === 0 ? 600 * screenScaleFactor : sourceSize.height) * width / sourceSize.width anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter z: 1 From 0dba424617f1c692a2cd7838dd586dcf95e387a7 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 29 Sep 2017 10:49:38 +0200 Subject: [PATCH 13/23] Revert string changes that can easily be reverted These strings can be re-used from other places. Contributes to issue CL-506. --- plugins/UM3NetworkPrinting/PrinterInfoBlock.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml index 161fdca36e..dc91fff016 100644 --- a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml @@ -248,7 +248,7 @@ Rectangle } else if (printJob.status == "pre_print" || printJob.status == "sent_to_printer") { - return catalog.i18nc("@label:status", "Preparing to print") + return catalog.i18nc("@label", "Preparing to print") } else if (printJob.configuration_changes_required != undefined && printJob.status == "queued") { @@ -327,13 +327,13 @@ Rectangle return catalog.i18nc("@label", "Clear build plate") case "sent_to_printer": case "pre_print": - return catalog.i18nc("@label", "Leveling and heating") + return catalog.i18nc("@label", "Preparing to print") case "wait_for_configuration": return catalog.i18nc("@label", "Not accepting print jobs") case "queued": if (printJob.configuration_changes_required != undefined) { - return catalog.i18nc("@label", "Configuration change"); + return catalog.i18nc("@label", "Waiting for configuration change"); } default: return ""; From 7f6de3aed5f2b241ae1e7cc0a3b4d3bbe85563fb Mon Sep 17 00:00:00 2001 From: daid Date: Thu, 28 Sep 2017 10:14:34 +0200 Subject: [PATCH 14/23] CL-462, time sync to the printer if a printer has no valid system datetime. As any datetime is better then no datetime at all. --- .../NetworkPrinterOutputDevice.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py index d489402d8e..15cd2bb1b3 100755 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py @@ -27,6 +27,7 @@ import zlib from time import time from time import sleep +from time import gmtime i18n_catalog = i18nCatalog("cura") @@ -1114,6 +1115,11 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): else: Logger.log("w", "Unable to save authentication for id %s and key %s", self._authentication_id, self._getSafeAuthKey()) + # Request 'system' printer data once, when we know we have authentication, so we know we can set the system time. + url = QUrl("http://" + self._address + self._api_prefix + "system") + system_data_request = QNetworkRequest(url) + self._manager.get(system_data_request) + else: # Got a response that we didn't expect, so something went wrong. Logger.log("e", "While trying to authenticate, we got an unexpected response: %s", reply.attribute(QNetworkRequest.HttpStatusCodeAttribute)) self.setAuthenticationState(AuthState.NotAuthenticated) @@ -1133,6 +1139,27 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): else: pass + elif self._api_prefix + "system" in reply_url: + # Check if the printer has time, and if this has a valid system time. + try: + data = json.loads(bytes(reply.readAll()).decode("utf-8")) + except json.decoder.JSONDecodeError: + Logger.log("w", "Received an invalid authentication request reply from printer: Not valid JSON.") + return + if "time" in data and "utc" in data["time"]: + try: + printer_time = gmtime(float(data["time"]["utc"])) + Logger.log("i", "Printer has system time of: %s", str(printer_time)) + except ValueError: + printer_time = None + if printer_time is not None and printer_time.tm_year < 1990: + # The system time is not valid, sync our current system time to it, so we at least have some reasonable time in the printer. + Logger.log("w", "Printer system time invalid, setting system time") + url = QUrl("http://" + self._address + self._api_prefix + "system/time/utc") + put_request = QNetworkRequest(url) + put_request.setHeader(QNetworkRequest.ContentTypeHeader, "application/json") + self._manager.put(put_request, str(time()).encode()) + elif reply.operation() == QNetworkAccessManager.PostOperation: if "/auth/request" in reply_url: # We got a response to requesting authentication. From 10fab716d59c7734a4f9799cffb66751e4a86b28 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Fri, 29 Sep 2017 13:14:14 +0200 Subject: [PATCH 15/23] CL-460 do not downgrade Cura Connect printer to legacy --- .../NetworkClusterPrinterOutputDevice.py | 2 +- .../UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py index 55f9d1247b..d5248c7ad4 100644 --- a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py @@ -144,7 +144,7 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte name = self._selected_printer.get("friendly_name") if name != self._automatic_printer.get("friendly_name"): return name - # Return name of cluster master. + # Return name of cluster master. return self._properties.get(b"name", b"").decode("utf-8") def connect(self): diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py index 39e5faf938..7b2aae894e 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py @@ -31,6 +31,7 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin): self._zero_conf = None self._browser = None self._printers = {} + self._printers_seen = {} # do not forget a printer when we have seen one, also do not 'downgrade' to legacy printer from Connect self._api_version = "1" self._api_prefix = "/api/v" + self._api_version + "/" @@ -218,12 +219,16 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin): ## Because the model needs to be created in the same thread as the QMLEngine, we use a signal. def addPrinter(self, name, address, properties, force_cluster=False): cluster_size = int(properties.get(b"cluster_size", -1)) - if force_cluster or cluster_size >= 0: + was_cluster_before = isinstance(self._printers_seen.get(name, None), NetworkClusterPrinterOutputDevice.NetworkClusterPrinterOutputDevice) + if was_cluster_before: + Logger.log("d", "Printer [%s] had Cura Connect before, so assume it's still equipped with Cura Connect.", name) + if force_cluster or cluster_size >= 0 or was_cluster_before: printer = NetworkClusterPrinterOutputDevice.NetworkClusterPrinterOutputDevice( name, address, properties, self._api_prefix, self._plugin_path) else: printer = NetworkPrinterOutputDevice.NetworkPrinterOutputDevice(name, address, properties, self._api_prefix) self._printers[printer.getKey()] = printer + self._printers_seen[printer.getKey()] = printer # Printers that are temporary unreachable or is rebooted are stored here global_container_stack = Application.getInstance().getGlobalContainerStack() if global_container_stack and printer.getKey() == global_container_stack.getMetaDataEntry("um_network_key"): if printer.getKey() not in self._old_printers: # Was the printer already connected, but a re-scan forced? From 67d730c8516a3fac3607f9145a0115dc31d1a89a Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Fri, 29 Sep 2017 13:58:14 +0200 Subject: [PATCH 16/23] CL-460 use name instead of object to cluster_printers_seen --- .../UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py index 7b2aae894e..baca433b16 100644 --- a/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py +++ b/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevicePlugin.py @@ -31,7 +31,7 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin): self._zero_conf = None self._browser = None self._printers = {} - self._printers_seen = {} # do not forget a printer when we have seen one, also do not 'downgrade' to legacy printer from Connect + self._cluster_printers_seen = {} # do not forget a cluster printer when we have seen one, to not 'downgrade' from Connect to legacy printer self._api_version = "1" self._api_prefix = "/api/v" + self._api_version + "/" @@ -219,7 +219,7 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin): ## Because the model needs to be created in the same thread as the QMLEngine, we use a signal. def addPrinter(self, name, address, properties, force_cluster=False): cluster_size = int(properties.get(b"cluster_size", -1)) - was_cluster_before = isinstance(self._printers_seen.get(name, None), NetworkClusterPrinterOutputDevice.NetworkClusterPrinterOutputDevice) + was_cluster_before = name in self._cluster_printers_seen if was_cluster_before: Logger.log("d", "Printer [%s] had Cura Connect before, so assume it's still equipped with Cura Connect.", name) if force_cluster or cluster_size >= 0 or was_cluster_before: @@ -228,7 +228,7 @@ class NetworkPrinterOutputDevicePlugin(QObject, OutputDevicePlugin): else: printer = NetworkPrinterOutputDevice.NetworkPrinterOutputDevice(name, address, properties, self._api_prefix) self._printers[printer.getKey()] = printer - self._printers_seen[printer.getKey()] = printer # Printers that are temporary unreachable or is rebooted are stored here + self._cluster_printers_seen[printer.getKey()] = name # Cluster printers that may be temporary unreachable or is rebooted keep being stored here global_container_stack = Application.getInstance().getGlobalContainerStack() if global_container_stack and printer.getKey() == global_container_stack.getMetaDataEntry("um_network_key"): if printer.getKey() not in self._old_printers: # Was the printer already connected, but a re-scan forced? From 812873af15f8d896b58fbfce6d37906fba9fb67d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 2 Oct 2017 09:49:43 +0200 Subject: [PATCH 17/23] Don't expand convex hull if offset < 0 We can only do Minkowski sums now, no subtractions. So if there needs to be a subtraction, don't do anything for now. Previously it would expand with abs(hull_offset), so a negative value would cause expansion rather than contraction. Contributes to issue #2042. --- cura/ConvexHullDecorator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index 8726ecb6e6..bfeb690192 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -266,7 +266,7 @@ class ConvexHullDecorator(SceneNodeDecorator): if self._getSettingProperty("mold_enabled", "value"): mold_width = self._getSettingProperty("mold_width", "value") hull_offset = horizontal_expansion + mold_width - if hull_offset != 0: + if hull_offset > 0: #TODO: Implement Minkowski subtraction for if the offset < 0. expansion_polygon = Polygon(numpy.array([ [-hull_offset, -hull_offset], [-hull_offset, hull_offset], From 6eb7932517c72c894125b10cce941bc570a1c5d7 Mon Sep 17 00:00:00 2001 From: Jerooney Date: Mon, 2 Oct 2017 13:00:53 +0200 Subject: [PATCH 18/23] Update camera color This will apply to all UMO+, UM2, UM2+ and UM3 with old firmware users, which look at the camera view. The background changed from blue > grey. --- resources/themes/cura-light/theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 62e22e4f0d..96ccd469b6 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -59,7 +59,7 @@ "colors": { "sidebar": [255, 255, 255, 255], "lining": [192, 193, 194, 255], - "viewport_overlay": [24, 41, 77, 192], + "viewport_overlay": [0, 0, 0, 192], "primary": [12, 169, 227, 255], "primary_hover": [48, 182, 231, 255], From 50f596cc2a28a7780fb814486eda6bd65439947a Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 2 Oct 2017 14:49:29 +0200 Subject: [PATCH 19/23] Fix width of the layerview layer box Fixes #2396 --- plugins/LayerView/LayerView.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index 7b2b7ac2c2..5939102e65 100755 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -1,7 +1,7 @@ // Copyright (c) 2017 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick 2.4 import QtQuick.Controls 1.2 import QtQuick.Layouts 1.1 import QtQuick.Controls.Styles 1.1 @@ -602,7 +602,7 @@ Item anchors.leftMargin: UM.Theme.getSize("default_margin").width / 2; anchors.verticalCenter: parent.verticalCenter; - width: Math.max(UM.Theme.getSize("line").width * maxValue.length + 2 * screenScaleFactor, 20 * screenScaleFactor); + width: fontMetrics.averageCharacterWidth * (maxValue.length) + UM.Theme.getSize("default_margin").width; style: TextFieldStyle { textColor: UM.Theme.getColor("setting_control_text"); @@ -630,4 +630,9 @@ Item } } } + + FontMetrics { + id: fontMetrics + font: UM.Theme.getFont("default") + } } From e91409112c561bb826810ce0676417def4e45aa0 Mon Sep 17 00:00:00 2001 From: Robin den Hertog Date: Mon, 2 Oct 2017 16:20:02 +0200 Subject: [PATCH 20/23] Made sure printers are present before printjobs to avoid referring to unknown printers CL-523 Signed-off-by: Robin den Hertog --- .../NetworkClusterPrinterOutputDevice.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py index 94bd6bc9a3..af0b0814ca 100644 --- a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py @@ -173,18 +173,19 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte def _requestClusterStatus(self): # TODO: Handle timeout. We probably want to know if the cluster is still reachable or not. - url = QUrl(self._api_base_uri + "print_jobs/") - print_jobs_request = QNetworkRequest(url) - self._addUserAgentHeader(print_jobs_request) - self._manager.get(print_jobs_request) - # See _finishedPrintJobsRequest() - url = QUrl(self._api_base_uri + "printers/") printers_request = QNetworkRequest(url) self._addUserAgentHeader(printers_request) self._manager.get(printers_request) # See _finishedPrintersRequest() + if self._printers: # if printers is not empty + url = QUrl(self._api_base_uri + "print_jobs/") + print_jobs_request = QNetworkRequest(url) + self._addUserAgentHeader(print_jobs_request) + self._manager.get(print_jobs_request) + # See _finishedPrintJobsRequest() + def _finishedPrintJobsRequest(self, reply): try: json_data = json.loads(bytes(reply.readAll()).decode("utf-8")) @@ -489,7 +490,8 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte printer_name = self.__getPrinterNameFromUuid(print_job["assigned_to"]) if printer_name is None: - printer_name = i18n_catalog.i18nc("@info:status", "Unknown printer") + # don't report on yet unknown printers + continue message_text = (i18n_catalog.i18n("{printer_name} is reserved to print '{job_name}'. Please change the printer's configuration to match the job, for it to start printing.") .format(printer_name=printer_name, job_name=print_job["name"])) From 6772d849f37595b3e1affa65b2c83b340b9aaa26 Mon Sep 17 00:00:00 2001 From: jack Date: Mon, 2 Oct 2017 16:36:58 +0200 Subject: [PATCH 21/23] =?UTF-8?q?Revert=20"CL-523:=20Made=20sure=20printer?= =?UTF-8?q?s=20are=20present=20before=20printjobs=20to=20avoid=20referring?= =?UTF-8?q?=20to=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NetworkClusterPrinterOutputDevice.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py index af0b0814ca..94bd6bc9a3 100644 --- a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py @@ -173,19 +173,18 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte def _requestClusterStatus(self): # TODO: Handle timeout. We probably want to know if the cluster is still reachable or not. + url = QUrl(self._api_base_uri + "print_jobs/") + print_jobs_request = QNetworkRequest(url) + self._addUserAgentHeader(print_jobs_request) + self._manager.get(print_jobs_request) + # See _finishedPrintJobsRequest() + url = QUrl(self._api_base_uri + "printers/") printers_request = QNetworkRequest(url) self._addUserAgentHeader(printers_request) self._manager.get(printers_request) # See _finishedPrintersRequest() - if self._printers: # if printers is not empty - url = QUrl(self._api_base_uri + "print_jobs/") - print_jobs_request = QNetworkRequest(url) - self._addUserAgentHeader(print_jobs_request) - self._manager.get(print_jobs_request) - # See _finishedPrintJobsRequest() - def _finishedPrintJobsRequest(self, reply): try: json_data = json.loads(bytes(reply.readAll()).decode("utf-8")) @@ -490,8 +489,7 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte printer_name = self.__getPrinterNameFromUuid(print_job["assigned_to"]) if printer_name is None: - # don't report on yet unknown printers - continue + printer_name = i18n_catalog.i18nc("@info:status", "Unknown printer") message_text = (i18n_catalog.i18n("{printer_name} is reserved to print '{job_name}'. Please change the printer's configuration to match the job, for it to start printing.") .format(printer_name=printer_name, job_name=print_job["name"])) From dcb630a24ede945b45675c6faab9783deda92229 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 3 Oct 2017 14:02:07 +0200 Subject: [PATCH 22/23] Move text back to label and remove unused font --- resources/qml/SaveButton.qml | 2 +- resources/qml/Sidebar.qml | 2 +- resources/qml/SidebarHeader.qml | 2 +- resources/qml/SidebarSimple.qml | 4 ++-- resources/qml/SidebarTooltip.qml | 2 +- resources/themes/cura-light/theme.json | 4 ---- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index b613b1217e..7423fc2368 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -43,7 +43,7 @@ Item { } } - Text { + Label { id: statusLabel width: parent.width - 2 * UM.Theme.getSize("sidebar_margin").width anchors.top: parent.top diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 4fdeac752f..99948fc4fc 100755 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -114,7 +114,7 @@ Rectangle } } - Text { + Label { id: settingsModeLabel text: !hideSettings ? catalog.i18nc("@label:listbox", "Print Setup") : catalog.i18nc("@label:listbox","Print Setup disabled\nG-code files cannot be modified"); anchors.left: parent.left diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index d20feca8d6..9269984a2a 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -363,7 +363,7 @@ Column visible: !Cura.MachineManager.isCurrentSetupSupported } - Text { + Label { id: materialInfoLabel wrapMode: Text.WordWrap text: catalog.i18nc("@label", "Check material compatibility") diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index f8c3173c11..d1521b74d3 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -385,7 +385,7 @@ Item anchors.top: infillCellLeft.top anchors.topMargin: UM.Theme.getSize("sidebar_margin").height - Text { + Label { id: selectedInfillRateText //anchors.top: parent.top @@ -563,7 +563,7 @@ Item } } - Text { + Label { id: gradualInfillLabel anchors.left: enableGradualInfillCheckBox.right anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width / 2 diff --git a/resources/qml/SidebarTooltip.qml b/resources/qml/SidebarTooltip.qml index 057bd63203..60d01dd6f6 100644 --- a/resources/qml/SidebarTooltip.qml +++ b/resources/qml/SidebarTooltip.qml @@ -43,7 +43,7 @@ UM.PointingRectangle { base.opacity = 0; } - Text { + Label { id: label; anchors { top: parent.top; diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 96ccd469b6..b41ea96846 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -17,10 +17,6 @@ "size": 1.15, "family": "Open Sans" }, - "default_little_big": { - "size": 1.17, - "family": "Open Sans" - }, "default_bold": { "size": 1.15, "bold": true, From 3f1ec174ba01756f1db99ac396c5e2d5523d8e16 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Wed, 4 Oct 2017 13:34:24 +0200 Subject: [PATCH 23/23] CURA-4414 replace all Text elements for Label, make sure no half pixel anchors exist --- resources/qml/SidebarSimple.qml | 36 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index d1521b74d3..03d3e2cd10 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -154,7 +154,7 @@ Item } } - Text + Label { id: qualityRowTitle text: catalog.i18nc("@label", "Layer Height") @@ -171,11 +171,11 @@ Item { model: qualityModel - Text + Label { anchors.verticalCenter: parent.verticalCenter anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height / 2 + anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height / 2) color: (Cura.MachineManager.activeMachine != null && Cura.ProfilesModel.getItem(index).available) ? UM.Theme.getColor("quality_slider_available") : UM.Theme.getColor("quality_slider_unavailable") text: { @@ -194,13 +194,13 @@ Item // Make sure the text aligns correctly with each tick if (qualityModel.totalTicks == 0) { // If there is only one tick, align it centrally - return ((base.width * 0.55) - width) / 2 + return parseInt(((base.width * 0.55) - width) / 2) } else if (index == 0) { return (base.width * 0.55 / qualityModel.totalTicks) * index } else if (index == qualityModel.totalTicks) { return (base.width * 0.55 / qualityModel.totalTicks) * index - width } else { - return (base.width * 0.55 / qualityModel.totalTicks) * index - (width / 2) + return parseInt((base.width * 0.55 / qualityModel.totalTicks) * index - (width / 2)) } } } @@ -310,7 +310,7 @@ Item } } - Text + Label { id: speedLabel anchors.top: speedSlider.bottom @@ -322,7 +322,7 @@ Item color: UM.Theme.getColor("text") } - Text + Label { anchors.bottom: speedLabel.bottom anchors.left: speedSlider.left @@ -333,7 +333,7 @@ Item horizontalAlignment: Text.AlignLeft } - Text + Label { anchors.bottom: speedLabel.bottom anchors.right: speedSlider.right @@ -360,7 +360,7 @@ Item width: UM.Theme.getSize("sidebar").width * .45 - UM.Theme.getSize("sidebar_margin").width - Text + Label { id: infillLabel text: catalog.i18nc("@label", "Infill") @@ -482,7 +482,7 @@ Item anchors.right: parent.right anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height / 2 + anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height / 2) // we loop over all density icons and only show the one that has the current density and steps Repeater @@ -533,7 +533,7 @@ Item property alias _hovered: enableGradualInfillMouseArea.containsMouse anchors.top: infillSlider.bottom - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height / 2 // closer to slider since it belongs to the same category + anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height / 2) // closer to slider since it belongs to the same category anchors.left: infillCellRight.left style: UM.Theme.styles.checkbox @@ -566,7 +566,7 @@ Item Label { id: gradualInfillLabel anchors.left: enableGradualInfillCheckBox.right - anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width / 2 + anchors.leftMargin: parseInt(UM.Theme.getSize("sidebar_margin").width / 2) text: catalog.i18nc("@label", "Enable gradual") font: UM.Theme.getFont("default") color: UM.Theme.getColor("text") @@ -621,13 +621,13 @@ Item // // Enable support // - Text + Label { id: enableSupportLabel visible: enableSupportCheckBox.visible anchors.top: infillCellRight.bottom - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 1.5 + anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height * 1.5) anchors.left: parent.left anchors.leftMargin: UM.Theme.getSize("sidebar_margin").width anchors.verticalCenter: enableSupportCheckBox.verticalCenter @@ -674,7 +674,7 @@ Item } } - Text + Label { id: supportExtruderLabel visible: supportExtruderCombobox.visible @@ -750,7 +750,7 @@ Item } - Text + Label { id: adhesionHelperLabel visible: adhesionCheckBox.visible @@ -836,12 +836,12 @@ Item { id: tipsCell anchors.top: adhesionCheckBox.visible ? adhesionCheckBox.bottom : (enableSupportCheckBox.visible ? supportExtruderCombobox.bottom : infillCellRight.bottom) - anchors.topMargin: UM.Theme.getSize("sidebar_margin").height * 2 + anchors.topMargin: parseInt(UM.Theme.getSize("sidebar_margin").height * 2) anchors.left: parent.left width: parent.width height: tipsText.contentHeight * tipsText.lineCount - Text + Label { id: tipsText anchors.left: parent.left