From ec1cf4065e7f11702b35f682f92b51fbb15f4b79 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 15 Feb 2018 11:12:19 +0100 Subject: [PATCH 1/4] Set renderType to Text.NativeRendering for qtquick controls 2 Labels Apparently, the qtquickcontrols 2 Label no longer defaults to using renderType: Text.NativeRendering This causes text to render with QtRendering which looks subtly different on Windows and succinctly broken on some OSX installations. --- resources/qml/Settings/SettingComboBox.qml | 2 ++ resources/qml/Settings/SettingExtruder.qml | 2 ++ resources/qml/Settings/SettingItem.qml | 4 +--- resources/qml/Settings/SettingOptionalExtruder.qml | 2 ++ resources/qml/Sidebar.qml | 5 ++++- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/resources/qml/Settings/SettingComboBox.qml b/resources/qml/Settings/SettingComboBox.qml index f03c7d5545..ed4a7b41c2 100644 --- a/resources/qml/Settings/SettingComboBox.qml +++ b/resources/qml/Settings/SettingComboBox.qml @@ -80,6 +80,7 @@ SettingItem anchors.right: downArrow.left text: control.currentText + renderType: Text.NativeRendering font: UM.Theme.getFont("default") color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text") elide: Text.ElideRight @@ -116,6 +117,7 @@ SettingItem contentItem: Label { text: modelData.value + renderType: Text.NativeRendering color: control.contentItem.color font: UM.Theme.getFont("default") elide: Text.ElideRight diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index 832b8a1ca9..17a0dd5eee 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -117,6 +117,7 @@ SettingItem rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width text: control.currentText + renderType: Text.NativeRendering font: UM.Theme.getFont("default") color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") @@ -171,6 +172,7 @@ SettingItem contentItem: Label { text: model.name + renderType: Text.NativeRendering color: UM.Theme.getColor("setting_control_text") font: UM.Theme.getFont("default") elide: Text.ElideRight diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index bdd02d31fa..b2535d6b41 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -112,11 +112,9 @@ Item { anchors.right: settingControls.left; anchors.verticalCenter: parent.verticalCenter - height: UM.Theme.getSize("section").height; - verticalAlignment: Text.AlignVCenter; - text: definition.label elide: Text.ElideMiddle; + renderType: Text.NativeRendering color: UM.Theme.getColor("setting_control_text"); opacity: (definition.visible) ? 1 : 0.5 diff --git a/resources/qml/Settings/SettingOptionalExtruder.qml b/resources/qml/Settings/SettingOptionalExtruder.qml index d1d08727b5..f49b7035d7 100644 --- a/resources/qml/Settings/SettingOptionalExtruder.qml +++ b/resources/qml/Settings/SettingOptionalExtruder.qml @@ -136,6 +136,7 @@ SettingItem rightPadding: swatch.width + UM.Theme.getSize("setting_unit_margin").width text: control.currentText + renderType: Text.NativeRendering font: UM.Theme.getFont("default") color: enabled ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text") @@ -190,6 +191,7 @@ SettingItem contentItem: Label { text: model.name + renderType: Text.NativeRendering color: UM.Theme.getColor("setting_control_text") font: UM.Theme.getFont("default") elide: Text.ElideRight diff --git a/resources/qml/Sidebar.qml b/resources/qml/Sidebar.qml index 37c50e4adb..f1cbfbcc60 100644 --- a/resources/qml/Sidebar.qml +++ b/resources/qml/Sidebar.qml @@ -207,12 +207,13 @@ Rectangle color: (control.checked || control.pressed) ? UM.Theme.getColor("action_button_active") : control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button") } - contentItem: Text + contentItem: Label { text: model.text font: UM.Theme.getFont("default") horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter + renderType: Text.NativeRendering elide: Text.ElideRight color: { @@ -352,6 +353,7 @@ Rectangle font: UM.Theme.getFont("large") color: UM.Theme.getColor("text_subtext") text: (!base.printDuration || !base.printDuration.valid) ? catalog.i18nc("@label Hours and minutes", "00h 00min") : base.printDuration.getDisplayString(UM.DurationFormat.Short) + renderType: Text.NativeRendering MouseArea { @@ -479,6 +481,7 @@ Rectangle anchors.left: parent.left anchors.bottom: parent.bottom font: UM.Theme.getFont("very_small") + renderType: Text.NativeRendering color: UM.Theme.getColor("text_subtext") elide: Text.ElideMiddle width: parent.width From bc47c6e623c5b05ad954e8f31104a8acb2a548bb Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Thu, 15 Feb 2018 11:20:46 +0100 Subject: [PATCH 2/4] Fix for CURA-4963 Exclude buildplate and nozzle meshes from being reloaded on F5 press. --- cura/CuraApplication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 87bc4532a8..07b3aab60c 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1294,7 +1294,7 @@ class CuraApplication(QtApplication): Logger.log("i", "Reloading all loaded mesh data.") nodes = [] for node in DepthFirstIterator(self.getController().getScene().getRoot()): - if not isinstance(node, SceneNode) or not node.getMeshData(): + if not isinstance(node, CuraSceneNode) or not node.getMeshData(): continue nodes.append(node) From 593dad7ccacb3ada7f11209daa03288ef499b4fa Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 15 Feb 2018 11:34:46 +0100 Subject: [PATCH 3/4] Fix categories too --- resources/qml/Settings/SettingCategory.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/Settings/SettingCategory.qml b/resources/qml/Settings/SettingCategory.qml index 19524e8adb..3612c4cf29 100644 --- a/resources/qml/Settings/SettingCategory.qml +++ b/resources/qml/Settings/SettingCategory.qml @@ -78,6 +78,7 @@ Button verticalCenter: parent.verticalCenter; } text: definition.label + renderType: Text.NativeRendering font: UM.Theme.getFont("setting_category") color: { From 32d677295f7968c5f05a327830c6939cbfabb9c3 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 15 Feb 2018 11:38:51 +0100 Subject: [PATCH 4/4] Set rendertype for units in SettingTextField --- resources/qml/Settings/SettingTextField.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index 1a0d63034d..4693bec50d 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -83,11 +83,12 @@ SettingItem Label { - anchors.right: parent.right; + anchors.right: parent.right anchors.rightMargin: Math.round(UM.Theme.getSize("setting_unit_margin").width) - anchors.verticalCenter: parent.verticalCenter; + anchors.verticalCenter: parent.verticalCenter - text: definition.unit; + text: definition.unit + renderType: Text.NativeRendering color: UM.Theme.getColor("setting_unit") font: UM.Theme.getFont("default") }