From 2435b97ef797b021e7e87b85ba18a4aad7527c92 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Tue, 15 Jan 2019 12:12:47 +0100 Subject: [PATCH 1/5] Change the style of the resize bar at the bottom of the print setup panel Make it wider and more visible to the user. Change icon. Keep margins according to the other panels. --- .../PrintSetupSelectorContents.qml | 31 +++++++++++++------ .../themes/cura-light/icons/grip_lines.svg | 4 --- resources/themes/cura-light/icons/resize.svg | 15 +++++++++ resources/themes/cura-light/theme.json | 1 + 4 files changed, 38 insertions(+), 13 deletions(-) delete mode 100644 resources/themes/cura-light/icons/grip_lines.svg create mode 100644 resources/themes/cura-light/icons/resize.svg diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml index 7c82a7324d..83cc59838b 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml @@ -104,7 +104,7 @@ Item { id: buttonRow property real padding: UM.Theme.getSize("default_margin").width - height: childrenRect.height + 2 * padding + height: recommendedButton.height + 2 * padding anchors { @@ -149,9 +149,8 @@ Item left: parent.left right: parent.right bottom: parent.bottom - top: recommendedButton.bottom - topMargin: UM.Theme.getSize("default_lining").height } + height: childrenRect.height cursorShape: Qt.SplitVCursor visible: currentModeIndex == PrintSetupSelectorContents.Mode.Custom drag @@ -182,15 +181,29 @@ Item } } - UM.RecolorImage + Rectangle { - width: parent.width * 0.05 - height: parent.height * 0.3 + width: parent.width + height: UM.Theme.getSize("narrow_margin").height + color: UM.Theme.getColor("secondary") - anchors.centerIn: parent + Rectangle + { + anchors.bottom: parent.top + width: parent.width + height: UM.Theme.getSize("default_lining").height + color: UM.Theme.getColor("lining") + } - source: UM.Theme.getIcon("grip_lines") - color: UM.Theme.getColor("lining") + UM.RecolorImage + { + width: UM.Theme.getSize("drag_icon").width + height: UM.Theme.getSize("drag_icon").height + anchors.centerIn: parent + + source: UM.Theme.getIcon("resize") + color: UM.Theme.getColor("small_button_text") + } } } } diff --git a/resources/themes/cura-light/icons/grip_lines.svg b/resources/themes/cura-light/icons/grip_lines.svg deleted file mode 100644 index 253d1fb486..0000000000 --- a/resources/themes/cura-light/icons/grip_lines.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/resources/themes/cura-light/icons/resize.svg b/resources/themes/cura-light/icons/resize.svg new file mode 100644 index 0000000000..d6a16649e1 --- /dev/null +++ b/resources/themes/cura-light/icons/resize.svg @@ -0,0 +1,15 @@ + + + + Group + Created with Sketch. + + + + + + + + + + \ No newline at end of file diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index ea1c64e2ac..cd27d16cc6 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -442,6 +442,7 @@ "print_setup_slider_tickmarks": [0.32, 0.32], "print_setup_big_item": [28, 2.5], "print_setup_icon": [1.2, 1.2], + "drag_icon": [1.416, 0.25], "expandable_component_content_header": [0.0, 3.0], From 86b0ac320b486830a2a3fd8d9323a7766d1c3df2 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Wed, 16 Jan 2019 08:47:01 +0100 Subject: [PATCH 2/5] Increase the padding with the button Add more padding when the draggable area is visible --- .../qml/PrintSetupSelector/PrintSetupSelectorContents.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml index 83cc59838b..bf139b219f 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml @@ -104,7 +104,7 @@ Item { id: buttonRow property real padding: UM.Theme.getSize("default_margin").width - height: recommendedButton.height + 2 * padding + height: recommendedButton.height + 2 * padding + (draggableArea.visible ? draggableArea.height : 0) anchors { @@ -144,6 +144,7 @@ Item //Invisible area at the bottom with which you can resize the panel. MouseArea { + id: draggableArea anchors { left: parent.left From 4cb7ee5fc765922340fef77230cd083a22644cc5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 17 Jan 2019 17:23:07 +0100 Subject: [PATCH 3/5] Give tabs a height It is used in the profile assistant. I don't know if it should be used, but it is. Contributes to issue CURA-6086. --- 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 cd27d16cc6..2b42778df4 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -447,7 +447,7 @@ "expandable_component_content_header": [0.0, 3.0], "configuration_selector": [35.0, 4.0], - "configuration_selector_mode_tabs": [0.0, 3.0], + "configuration_selector_mode_tabs": [1.0, 3.0], "action_panel_widget": [26.0, 0.0], "action_panel_information_widget": [20.0, 0.0], From c602c1cf15c274555456cf4ea9612ea64b418455 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 17 Jan 2019 13:50:42 +0100 Subject: [PATCH 4/5] Use MachineManager.activeMachine instead of Application.globalstack CURA-6117 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index ef0898bb04..d5531a2773 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -151,7 +151,7 @@ class CuraEngineBackend(QObject, Backend): if self._multi_build_plate_model: self._multi_build_plate_model.activeBuildPlateChanged.connect(self._onActiveViewChanged) - self._application.globalContainerStackChanged.connect(self._onGlobalStackChanged) + self._application.getMachineManager().globalContainerChanged.connect(self._onGlobalStackChanged) self._onGlobalStackChanged() # extruder enable / disable. Actually wanted to use machine manager here, but the initialization order causes it to crash @@ -821,7 +821,7 @@ class CuraEngineBackend(QObject, Backend): extruder.propertyChanged.disconnect(self._onSettingChanged) extruder.containersChanged.disconnect(self._onChanged) - self._global_container_stack = self._application.getGlobalContainerStack() + self._global_container_stack = self._application.getMachineManager().activeMachine if self._global_container_stack: self._global_container_stack.propertyChanged.connect(self._onSettingChanged) # Note: Only starts slicing when the value changed. From 1369c98ea62dad113fe940b73f4f5cdffb46328f Mon Sep 17 00:00:00 2001 From: Ian Paschal Date: Fri, 18 Jan 2019 16:02:23 +0100 Subject: [PATCH 5/5] Center extruder numbers on Ubuntu This one is for you @christerbeke --- .../resources/qml/MonitorIconExtruder.qml | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml index 93dbebc8c6..f7d123ada7 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorIconExtruder.qml @@ -19,7 +19,7 @@ Item property int position: 0 // The extruder icon size; NOTE: This shouldn't need to be changed - property int size: 32 // TODO: Theme! + property int size: 32 * screenScaleFactor // TODO: Theme! // THe extruder icon source; NOTE: This shouldn't need to be changed property string iconSource: "../svg/icons/extruder.svg" @@ -35,27 +35,17 @@ Item width: size } - /* - * The label uses some "fancy" math to ensure that if you change the overall - * icon size, the number scales with it. That is to say, the font properties - * are linked to the icon size, NOT the theme. And that's intentional. - */ Label { id: positionLabel - font - { - pointSize: Math.round(size * 0.3125) - weight: Font.Bold - } - height: Math.round(size / 2) * screenScaleFactor + font: UM.Theme.getFont("small") + height: Math.round(size / 2) horizontalAlignment: Text.AlignHCenter text: position + 1 verticalAlignment: Text.AlignVCenter - width: Math.round(size / 2) * screenScaleFactor - x: Math.round(size * 0.25) * screenScaleFactor - y: Math.round(size * 0.15625) * screenScaleFactor - // TODO: Once 'size' is themed, screenScaleFactor won't be needed + width: Math.round(size / 2) + x: Math.round(size * 0.25) + y: Math.round(size * 0.15625) visible: position >= 0 } } \ No newline at end of file