diff --git a/plugins/LayerView/LayerView.py b/plugins/LayerView/LayerView.py old mode 100644 new mode 100755 diff --git a/plugins/LayerView/LayerView.qml b/plugins/LayerView/LayerView.qml index 0cc1678f06..bbb9b4c80e 100755 --- a/plugins/LayerView/LayerView.qml +++ b/plugins/LayerView/LayerView.qml @@ -10,10 +10,16 @@ import UM 1.0 as UM Item { - width: UM.Theme.getSize("layerview_menu_size").width + width: { + if (UM.LayerView.compatibilityMode) { + return UM.Theme.getSize("layerview_menu_size_compatibility").width; + } else { + return UM.Theme.getSize("layerview_menu_size").width; + } + } height: { if (UM.LayerView.compatibilityMode) { - return UM.Theme.getSize("layerview_menu_size").height + return UM.Theme.getSize("layerview_menu_size_compatibility").height; } else { return UM.Theme.getSize("layerview_menu_size").height + UM.LayerView.extruderCount * (UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("layerview_row_spacing").height) } @@ -31,10 +37,6 @@ Item ColumnLayout { id: view_settings - property bool extruder0_checked: UM.Preferences.getValue("layerview/extruder0_opacity") > 0.5 - property bool extruder1_checked: UM.Preferences.getValue("layerview/extruder1_opacity") > 0.5 - property bool extruder2_checked: UM.Preferences.getValue("layerview/extruder2_opacity") > 0.5 - property bool extruder3_checked: UM.Preferences.getValue("layerview/extruder3_opacity") > 0.5 property var extruder_opacities: UM.Preferences.getValue("layerview/extruder_opacities").split("|") property bool show_travel_moves: UM.Preferences.getValue("layerview/show_travel_moves") property bool show_helpers: UM.Preferences.getValue("layerview/show_helpers") @@ -42,7 +44,7 @@ Item property bool show_infill: UM.Preferences.getValue("layerview/show_infill") property bool show_legend: UM.LayerView.compatibilityMode || UM.Preferences.getValue("layerview/layer_view_type") == 1 property bool only_show_top_layers: UM.Preferences.getValue("view/only_show_top_layers") - property int top_layer_count: UM.Preferences.getValue("view/only_show_top_layers") + property int top_layer_count: UM.Preferences.getValue("view/top_layer_count") anchors.top: parent.top anchors.topMargin: UM.Theme.getSize("default_margin").height @@ -260,6 +262,22 @@ Item Layout.preferredHeight: UM.Theme.getSize("layerview_row").height Layout.preferredWidth: UM.Theme.getSize("layerview_row").width } + CheckBox { + checked: view_settings.only_show_top_layers + onClicked: { + UM.Preferences.setValue("view/only_show_top_layers", checked ? 1.0 : 0.0); + } + text: catalog.i18nc("@label", "Only Show Top Layers") + visible: UM.LayerView.compatibilityMode + } + CheckBox { + checked: view_settings.top_layer_count == 5 + onClicked: { + UM.Preferences.setValue("view/top_layer_count", checked ? 5 : 1); + } + text: catalog.i18nc("@label", "Show 5 Detailed Layers On Top") + visible: UM.LayerView.compatibilityMode + } Label { @@ -420,22 +438,6 @@ Item visible: UM.LayerView.busy; } } - CheckBox { - checked: view_settings.only_show_top_layers - onClicked: { - UM.Preferences.setValue("view/only_show_top_layers", checked ? 1.0 : 0.0); - } - text: catalog.i18nc("@label", "Only Show Top Layers") - visible: UM.LayerView.compatibilityMode - } - CheckBox { - checked: view_settings.top_layer_count == 5 - onClicked: { - UM.Preferences.setValue("view/top_layer_count", checked ? 5 : 1); - } - text: catalog.i18nc("@label", "Show 5 Detailed Layers On Top") - visible: UM.LayerView.compatibilityMode - } } } } diff --git a/plugins/LayerView/LayerViewProxy.py b/plugins/LayerView/LayerViewProxy.py old mode 100644 new mode 100755 index 0c3998a334..bc372aeaf8 --- a/plugins/LayerView/LayerViewProxy.py +++ b/plugins/LayerView/LayerViewProxy.py @@ -129,7 +129,7 @@ class LayerViewProxy(QObject): def _onLayerChanged(self): self.currentLayerChanged.emit() self._layerActivityChanged() - + def _onMaxLayersChanged(self): self.maxLayersChanged.emit() diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index 92597cfcf6..bd3fbb6dc6 100755 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -295,6 +295,7 @@ "slider_layerview_margin": [3.0, 1.0], "layerview_menu_size": [16.5, 21.0], + "layerview_menu_size_compatibility": [22, 23.0], "layerview_legend_size": [1.0, 1.0], "layerview_row": [11.0, 1.5], "layerview_row_spacing": [0.0, 0.5],