mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-19 09:10:47 +08:00
Layout Layer View menu, removed item, changed size. CURA-3321
This commit is contained in:
parent
bb1fa3ae04
commit
b1d95f3464
@ -60,7 +60,7 @@ class LayerView(View):
|
|||||||
self._controller.getScene().getRoot().childrenChanged.connect(self._onSceneChanged)
|
self._controller.getScene().getRoot().childrenChanged.connect(self._onSceneChanged)
|
||||||
|
|
||||||
self._layer_view_type = 0 # 0 is material color, 1 is color by linetype, 2 is speed
|
self._layer_view_type = 0 # 0 is material color, 1 is color by linetype, 2 is speed
|
||||||
self._only_color_active_extruder = True
|
self._only_color_active_extruder = False
|
||||||
self._extruder_opacity = [1.0, 1.0, 1.0, 1.0]
|
self._extruder_opacity = [1.0, 1.0, 1.0, 1.0]
|
||||||
self._show_travel_moves = 0
|
self._show_travel_moves = 0
|
||||||
self._show_support = 1
|
self._show_support = 1
|
||||||
|
@ -148,16 +148,26 @@ Item
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.left: parent.right
|
anchors.left: parent.right
|
||||||
//anchors.verticalCenter: parent.verticalCenter
|
//anchors.verticalCenter: parent.verticalCenter
|
||||||
//anchors.top: toolbar.top
|
//anchors.top: sidebar.top
|
||||||
anchors.bottom: slider_background.top
|
anchors.bottom: slider_background.top
|
||||||
//anchors.topMargin: UM.Theme.getSize("default_margin").height
|
//anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
width: UM.Theme.getSize("slider_layerview_background").width * 4
|
width: UM.Theme.getSize("layerview_menu_size").width
|
||||||
height: slider.height + UM.Theme.getSize("default_margin").height * 10
|
height: UM.Theme.getSize("layerview_menu_size").height
|
||||||
color: UM.Theme.getColor("tool_panel_background");
|
color: UM.Theme.getColor("tool_panel_background");
|
||||||
border.width: UM.Theme.getSize("default_lining").width
|
border.width: UM.Theme.getSize("default_lining").width
|
||||||
border.color: UM.Theme.getColor("lining")
|
border.color: UM.Theme.getColor("lining")
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: layerViewTypesLabel
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
text: catalog.i18nc("@label","Color scheme")
|
||||||
|
}
|
||||||
|
|
||||||
ListModel
|
ListModel
|
||||||
{
|
{
|
||||||
id: layerViewTypes
|
id: layerViewTypes
|
||||||
@ -173,12 +183,57 @@ Item
|
|||||||
|
|
||||||
ComboBox
|
ComboBox
|
||||||
{
|
{
|
||||||
id: layer_type_combobox
|
id: layerTypeCombobox
|
||||||
anchors.top: parent.top
|
anchors.top: layerViewTypesLabel.bottom
|
||||||
|
anchors.topMargin: UM.Theme.getSize("margin_small").height
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
model: layerViewTypes
|
||||||
|
visible: !UM.LayerView.compatibilityMode
|
||||||
|
onActivated: {
|
||||||
|
UM.LayerView.setLayerViewType(layerViewTypes.get(index).type_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: layerRangeTypeLabel
|
||||||
|
anchors.top: layerTypeCombobox.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
model: layerViewTypes
|
text: catalog.i18nc("@label","Layer range")
|
||||||
|
}
|
||||||
|
|
||||||
|
ListModel
|
||||||
|
{
|
||||||
|
id: layerRangeTypes
|
||||||
|
ListElement {
|
||||||
|
text: "All layers"
|
||||||
|
range_type_id: 0
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
text: "Layer range"
|
||||||
|
range_type_id: 1
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
text: "Single layer"
|
||||||
|
range_type_id: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ComboBox
|
||||||
|
{
|
||||||
|
id: layerRangeTypeCombobox
|
||||||
|
anchors.top: layerRangeTypeLabel.bottom
|
||||||
|
anchors.topMargin: UM.Theme.getSize("margin_small").height
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
model: layerRangeTypes
|
||||||
visible: !UM.LayerView.compatibilityMode
|
visible: !UM.LayerView.compatibilityMode
|
||||||
onActivated: {
|
onActivated: {
|
||||||
UM.LayerView.setLayerViewType(layerViewTypes.get(index).type_id);
|
UM.LayerView.setLayerViewType(layerViewTypes.get(index).type_id);
|
||||||
@ -195,7 +250,7 @@ Item
|
|||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: view_settings
|
id: view_settings
|
||||||
anchors.top: layer_type_combobox.bottom
|
anchors.top: layerRangeTypeCombobox.bottom
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
x: UM.Theme.getSize("default_margin").width
|
x: UM.Theme.getSize("default_margin").width
|
||||||
|
|
||||||
@ -249,13 +304,6 @@ Item
|
|||||||
}
|
}
|
||||||
text: "Show infill"
|
text: "Show infill"
|
||||||
}
|
}
|
||||||
CheckBox {
|
|
||||||
checked: true
|
|
||||||
onClicked: {
|
|
||||||
UM.LayerView.setOnlyColorActiveExtruder(checked);
|
|
||||||
}
|
|
||||||
text: "Only color active extruder"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,6 +239,7 @@
|
|||||||
"default_lining": [0.08, 0.08],
|
"default_lining": [0.08, 0.08],
|
||||||
"default_arrow": [0.8, 0.8],
|
"default_arrow": [0.8, 0.8],
|
||||||
"logo": [9.5, 2.0],
|
"logo": [9.5, 2.0],
|
||||||
|
"margin_small": [0.5, 0.5],
|
||||||
|
|
||||||
"sidebar": [35.0, 10.0],
|
"sidebar": [35.0, 10.0],
|
||||||
"sidebar_header": [0.0, 4.0],
|
"sidebar_header": [0.0, 4.0],
|
||||||
@ -287,6 +288,8 @@
|
|||||||
"slider_layerview_background": [4.0, 0.0],
|
"slider_layerview_background": [4.0, 0.0],
|
||||||
"slider_layerview_margin": [3.0, 3.0],
|
"slider_layerview_margin": [3.0, 3.0],
|
||||||
|
|
||||||
|
"layerview_menu_size": [16.0, 25.0],
|
||||||
|
|
||||||
"checkbox": [2.0, 2.0],
|
"checkbox": [2.0, 2.0],
|
||||||
|
|
||||||
"tooltip": [20.0, 10.0],
|
"tooltip": [20.0, 10.0],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user