From f1d01e733da25cd430b647140d52ef22de2352e6 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 3 Jan 2019 16:34:05 +0100 Subject: [PATCH 1/3] Add variant to the configuration menu headerItem --- .../ConfigurationMenu/ConfigurationMenu.qml | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index 3001efac54..35b3770af9 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -61,6 +61,27 @@ Cura.ExpandablePopup width: height } + // Label that shows the name of the variant + Label + { + id: variantLabel + + visible: Cura.MachineManager.hasVariants + + text: model.variant + elide: Text.ElideRight + font: UM.Theme.getFont("medium") + color: UM.Theme.getColor("text") + renderType: Text.NativeRendering + + anchors + { + left: extruderIcon.right + leftMargin: UM.Theme.getSize("default_margin").width + verticalCenter: parent.verticalCenter + } + } + // Label for the brand of the material Label { @@ -74,7 +95,7 @@ Cura.ExpandablePopup anchors { - left: extruderIcon.right + left: variantLabel.visible ? variantLabel.right : extruderIcon.right leftMargin: UM.Theme.getSize("default_margin").width right: parent.right rightMargin: UM.Theme.getSize("default_margin").width @@ -92,7 +113,7 @@ Cura.ExpandablePopup anchors { - left: extruderIcon.right + left: variantLabel.visible ? variantLabel.right : extruderIcon.right leftMargin: UM.Theme.getSize("default_margin").width right: parent.right rightMargin: UM.Theme.getSize("default_margin").width From f057c9a7dfaa908100db71eb1b577ceca083b5fc Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 15 Jan 2019 17:15:12 +0100 Subject: [PATCH 2/3] Prevent spurious updates to 'onPreferenceChanged's if the preference doesn't match. --- plugins/SimulationView/SimulationViewMainComponent.qml | 5 +++++ plugins/SimulationView/SimulationViewMenuComponent.qml | 5 +++++ resources/qml/ActionPanel/SliceProcessWidget.qml | 5 +++++ resources/qml/Preferences/GeneralPage.qml | 5 +++++ .../qml/Preferences/Materials/MaterialsBrandSection.qml | 5 +++++ resources/qml/Preferences/Materials/MaterialsTypeSection.qml | 5 +++++ .../qml/PrintSetupSelector/PrintSetupSelectorContents.qml | 5 +++++ 7 files changed, 35 insertions(+) diff --git a/plugins/SimulationView/SimulationViewMainComponent.qml b/plugins/SimulationView/SimulationViewMainComponent.qml index 16b049c921..58901652d3 100644 --- a/plugins/SimulationView/SimulationViewMainComponent.qml +++ b/plugins/SimulationView/SimulationViewMainComponent.qml @@ -71,6 +71,11 @@ Item target: UM.Preferences onPreferenceChanged: { + if (preference !== "view/only_show_top_layers" && preference !== "view/top_layer_count" && ! preference.match("layerview/")) + { + return; + } + playButton.pauseSimulation() } } diff --git a/plugins/SimulationView/SimulationViewMenuComponent.qml b/plugins/SimulationView/SimulationViewMenuComponent.qml index 4c952d4c43..957d8170cf 100644 --- a/plugins/SimulationView/SimulationViewMenuComponent.qml +++ b/plugins/SimulationView/SimulationViewMenuComponent.qml @@ -22,6 +22,11 @@ Cura.ExpandableComponent target: UM.Preferences onPreferenceChanged: { + if (preference !== "view/only_show_top_layers" && preference !== "view/top_layer_count" && ! preference.match("layerview/")) + { + return; + } + layerTypeCombobox.currentIndex = UM.SimulationView.compatibilityMode ? 1 : UM.Preferences.getValue("layerview/layer_view_type") layerTypeCombobox.updateLegends(layerTypeCombobox.currentIndex) viewSettings.extruder_opacities = UM.Preferences.getValue("layerview/extruder_opacities").split("|") diff --git a/resources/qml/ActionPanel/SliceProcessWidget.qml b/resources/qml/ActionPanel/SliceProcessWidget.qml index 08966ce82c..21d6fac2d8 100644 --- a/resources/qml/ActionPanel/SliceProcessWidget.qml +++ b/resources/qml/ActionPanel/SliceProcessWidget.qml @@ -142,6 +142,11 @@ Column target: UM.Preferences onPreferenceChanged: { + if (preference !== "general/auto_slice") + { + return; + } + var autoSlice = UM.Preferences.getValue("general/auto_slice") if(prepareButtons.autoSlice != autoSlice) { diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index 5ff5f567ea..0dd6c6313a 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -746,6 +746,11 @@ UM.PreferencesPage target: UM.Preferences onPreferenceChanged: { + if (preference !== "info/send_slice_info") + { + return; + } + sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) } } diff --git a/resources/qml/Preferences/Materials/MaterialsBrandSection.qml b/resources/qml/Preferences/Materials/MaterialsBrandSection.qml index c976233805..8db8e99d44 100644 --- a/resources/qml/Preferences/Materials/MaterialsBrandSection.qml +++ b/resources/qml/Preferences/Materials/MaterialsBrandSection.qml @@ -139,6 +139,11 @@ Item target: UM.Preferences onPreferenceChanged: { + if (preference !== "cura/expanded_types" && preference !== "cura/expanded_brands") + { + return; + } + expanded = materialList.expandedBrands.indexOf(sectionName) > -1 } } diff --git a/resources/qml/Preferences/Materials/MaterialsTypeSection.qml b/resources/qml/Preferences/Materials/MaterialsTypeSection.qml index 8f34217cce..b5054591c0 100644 --- a/resources/qml/Preferences/Materials/MaterialsTypeSection.qml +++ b/resources/qml/Preferences/Materials/MaterialsTypeSection.qml @@ -130,6 +130,11 @@ Item target: UM.Preferences onPreferenceChanged: { + if (preference !== "cura/expanded_types" && preference !== "cura/expanded_brands") + { + return; + } + expanded = materialList.expandedTypes.indexOf(materialType.brand + "_" + materialType.name) > -1 } } diff --git a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml index 7c82a7324d..e5de8bfb7d 100644 --- a/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml +++ b/resources/qml/PrintSetupSelector/PrintSetupSelectorContents.qml @@ -77,6 +77,11 @@ Item target: UM.Preferences onPreferenceChanged: { + if (preference !== "view/settings_list_height" && preference !== "general/window_height" && preference !== "general/window_state") + { + return; + } + customPrintSetup.height = Math.min ( From 12a120f04407a1b54770c884c14d6e642984df11 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 17 Jan 2019 14:21:11 +0100 Subject: [PATCH 3/3] Slightly modify the variant label to match more with the monitor tab CURA-6100 --- .../ConfigurationMenu/ConfigurationMenu.qml | 63 +++++++------------ 1 file changed, 22 insertions(+), 41 deletions(-) diff --git a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml index 89d753463a..1e3b48b1df 100644 --- a/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml +++ b/resources/qml/Menus/ConfigurationMenu/ConfigurationMenu.qml @@ -61,6 +61,26 @@ Cura.ExpandablePopup width: height } + // Label for the brand of the material + Label + { + id: typeAndBrandNameLabel + + text: model.material_brand + " " + model.material + elide: Text.ElideRight + font: UM.Theme.getFont("default") + color: UM.Theme.getColor("text") + renderType: Text.NativeRendering + + anchors + { + top: extruderIcon.top + left: extruderIcon.right + leftMargin: UM.Theme.getSize("default_margin").width + right: parent.right + rightMargin: UM.Theme.getSize("default_margin").width + } + } // Label that shows the name of the variant Label { @@ -70,7 +90,7 @@ Cura.ExpandablePopup text: model.variant elide: Text.ElideRight - font: UM.Theme.getFont("medium") + font: UM.Theme.getFont("default_bold") color: UM.Theme.getColor("text") renderType: Text.NativeRendering @@ -78,46 +98,7 @@ Cura.ExpandablePopup { left: extruderIcon.right leftMargin: UM.Theme.getSize("default_margin").width - verticalCenter: parent.verticalCenter - } - } - - // Label for the brand of the material - Label - { - id: brandNameLabel - - text: model.material_brand - elide: Text.ElideRight - font: UM.Theme.getFont("default") - color: UM.Theme.getColor("text_inactive") - renderType: Text.NativeRendering - - anchors - { - left: variantLabel.visible ? variantLabel.right : extruderIcon.right - leftMargin: UM.Theme.getSize("default_margin").width - right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width - } - } - - // Label that shows the name of the material - Label - { - text: model.material - elide: Text.ElideRight - font: UM.Theme.getFont("medium") - color: UM.Theme.getColor("text") - renderType: Text.NativeRendering - - anchors - { - left: variantLabel.visible ? variantLabel.right : extruderIcon.right - leftMargin: UM.Theme.getSize("default_margin").width - right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width - top: brandNameLabel.bottom + top: typeAndBrandNameLabel.bottom } } }