From 9604674c8bf624ff287d95c4d95bfdead2d2abbd Mon Sep 17 00:00:00 2001 From: Saumya Jain Date: Thu, 14 Mar 2024 11:45:15 +0100 Subject: [PATCH 1/5] Added Cura.MachineSelector in place of combobox combobox seemed to be tampering with the mouse area of machineselector CURA-11700 --- plugins/3MFReader/WorkspaceDialog.qml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index a8cdad92bd..e617764700 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -103,12 +103,17 @@ UM.Dialog comboboxTitle: catalog.i18nc("@action:label", "Open With") comboboxTooltipText: catalog.i18nc("@info:tooltip", "Printer settings will be updated to match the settings saved with the project.") comboboxVisible: workspaceDialog.visible && manager.updatableMachinesModel.count > 1 - combobox: Cura.MachineSelector + Cura.MachineSelector { id: machineSelector + visible: comboboxVisible headerCornerSide: Cura.RoundedRectangle.Direction.All - width: parent.width - height: parent.height + anchors.top: parent.top + anchors.topMargin: UM.Theme.getSize("default_margin").width * 3 + anchors.right: parent.right + anchors.rightMargin: UM.Theme.getSize("default_margin").width + width: UM.Theme.getSize("machine_selector_widget").width + height: UM.Theme.getSize("machine_selector_widget").height machineListModel: manager.updatableMachinesModel machineName: manager.machineName From b5940a54f4e9951433660570d1fdd903d5a36d6c Mon Sep 17 00:00:00 2001 From: Saumya Jain Date: Thu, 14 Mar 2024 16:17:24 +0100 Subject: [PATCH 2/5] fixing size of drop down CURA-11700 --- plugins/3MFReader/WorkspaceDialog.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index e617764700..acc4ced404 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -112,8 +112,8 @@ UM.Dialog anchors.topMargin: UM.Theme.getSize("default_margin").width * 3 anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width - width: UM.Theme.getSize("machine_selector_widget").width - height: UM.Theme.getSize("machine_selector_widget").height + width: Math.round(parent.width / 2.5) + height: UM.Theme.getSize("button").height machineListModel: manager.updatableMachinesModel machineName: manager.machineName From 5eeee37f0ec2a2e3c0c716b96426fb9cc7b9c8d0 Mon Sep 17 00:00:00 2001 From: Saumya Jain Date: Mon, 18 Mar 2024 12:32:20 +0100 Subject: [PATCH 3/5] Update visibility condition in WorkspaceDialog CURA-11700 --- 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 19ed31a149..ac72f92187 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -119,7 +119,7 @@ UM.Dialog Cura.MachineSelector { id: machineSelector - visible: comboboxVisible + visible: workspaceDialog.visible && manager.updatableMachinesModel.count > 1 headerCornerSide: Cura.RoundedRectangle.Direction.All anchors.top: parent.top anchors.topMargin: UM.Theme.getSize("default_margin").width * 3 From 37dc9e5dcb7b37c9959eb91af6945cfc644511f9 Mon Sep 17 00:00:00 2001 From: Saumya Jain Date: Mon, 18 Mar 2024 14:47:24 +0100 Subject: [PATCH 4/5] Update UI layering and MachineSelector properties in 3MFReader The z-index property of combobox and Loader elements in WorkspaceSection.qml was adjusted to ensure proper layering. CURA-11700 --- plugins/3MFReader/WorkspaceDialog.qml | 11 +++-------- plugins/3MFReader/WorkspaceSection.qml | 8 ++++++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index ac72f92187..878b80db17 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -116,17 +116,12 @@ UM.Dialog comboboxTitle: catalog.i18nc("@action:label", "Open With") comboboxTooltipText: catalog.i18nc("@info:tooltip", "Printer settings will be updated to match the settings saved with the project.") comboboxVisible: workspaceDialog.visible && manager.updatableMachinesModel.count > 1 - Cura.MachineSelector + combobox: Cura.MachineSelector { id: machineSelector - visible: workspaceDialog.visible && manager.updatableMachinesModel.count > 1 headerCornerSide: Cura.RoundedRectangle.Direction.All - anchors.top: parent.top - anchors.topMargin: UM.Theme.getSize("default_margin").width * 3 - anchors.right: parent.right - anchors.rightMargin: UM.Theme.getSize("default_margin").width - width: Math.round(parent.width / 2.5) - height: UM.Theme.getSize("button").height + width: parent.width + height: parent.height machineListModel: manager.updatableMachinesModel machineName: manager.machineName diff --git a/plugins/3MFReader/WorkspaceSection.qml b/plugins/3MFReader/WorkspaceSection.qml index 7c8b01be7a..83c96fa94a 100644 --- a/plugins/3MFReader/WorkspaceSection.qml +++ b/plugins/3MFReader/WorkspaceSection.qml @@ -15,7 +15,11 @@ Item property Component content: Item { visible: false } property alias comboboxTitle: comboboxLabel.text - property Component combobox: Item { visible: false } + property Component combobox: Item + { + z: -1 + visible: false + } property string comboboxTooltipText: "" property bool comboboxVisible: false @@ -91,11 +95,11 @@ Item } } - Loader { width: parent.width height: content.height + z: -1 anchors.top: sectionTitleRow.bottom sourceComponent: content } From eac2d3b173e0819bddd8fd68e132932e9ad5617e Mon Sep 17 00:00:00 2001 From: Saumya Jain Date: Mon, 18 Mar 2024 14:51:55 +0100 Subject: [PATCH 5/5] removes the unnecessary 'z' attribute CURA-11700 --- plugins/3MFReader/WorkspaceSection.qml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/3MFReader/WorkspaceSection.qml b/plugins/3MFReader/WorkspaceSection.qml index 83c96fa94a..b72fed47ef 100644 --- a/plugins/3MFReader/WorkspaceSection.qml +++ b/plugins/3MFReader/WorkspaceSection.qml @@ -15,11 +15,7 @@ Item property Component content: Item { visible: false } property alias comboboxTitle: comboboxLabel.text - property Component combobox: Item - { - z: -1 - visible: false - } + property Component combobox: Item { visible: false } property string comboboxTooltipText: "" property bool comboboxVisible: false