Remove redundant rows from POS QML

CuRA-6683
This commit is contained in:
Nino van Hooff 2019-09-13 11:06:11 +02:00
parent 184a72f7ab
commit 90fefac37f

View File

@ -124,84 +124,67 @@ Item
} }
Row // Selected mesh type label Label
{ {
spacing: UM.Theme.getSize("default_margin").width id: meshTypeLabel
font: UM.Theme.getFont("default")
Label color: UM.Theme.getColor("text")
{ height: UM.Theme.getSize("setting").height
id: meshTypeLabel verticalAlignment: Text.AlignVCenter
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
height: UM.Theme.getSize("setting").height
verticalAlignment: Text.AlignVCenter
}
} }
Row // Infill-only checkbox (visible for overhang mesh button) CheckBox
{ {
spacing: UM.Theme.getSize("default_margin").width id: infillOnlyCheckbox
text: catalog.i18nc("@action:checkbox","Infill only");
CheckBox style: UM.Theme.styles.checkbox;
{
id: infillOnlyCheckbox
text: catalog.i18nc("@action:checkbox","Infill only"); checked: current_mesh_type === infill_mesh_type
visible: current_mesh_type === infill_mesh_type || current_mesh_type === cutting_mesh_type
style: UM.Theme.styles.checkbox; onClicked: setOverhangsMeshType()
checked: current_mesh_type === infill_mesh_type
visible: current_mesh_type === infill_mesh_type || current_mesh_type === cutting_mesh_type
onClicked: setOverhangsMeshType()
}
} }
Row Button
{ {
spacing: UM.Theme.getSize("default_margin").width id: customiseSettingsButton;
height: UM.Theme.getSize("setting_control").height;
visible: currentSettings.visible
Button text: catalog.i18nc("@action:button", "Select settings");
style: ButtonStyle
{ {
id: customiseSettingsButton; background: Rectangle
height: UM.Theme.getSize("setting_control").height;
visible: currentSettings.visible
text: catalog.i18nc("@action:button", "Select settings");
style: ButtonStyle
{ {
background: Rectangle width: control.width;
{ height: control.height;
width: control.width; border.width: UM.Theme.getSize("default_lining").width;
height: control.height; border.color: control.pressed ? UM.Theme.getColor("action_button_active_border") :
border.width: UM.Theme.getSize("default_lining").width; control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border")
border.color: control.pressed ? UM.Theme.getColor("action_button_active_border") : color: control.pressed ? UM.Theme.getColor("action_button_active") :
control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border") control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
color: control.pressed ? UM.Theme.getColor("action_button_active") :
control.hovered ? UM.Theme.getColor("action_button_hovered") : UM.Theme.getColor("action_button")
}
label: Label
{
text: control.text;
color: UM.Theme.getColor("setting_control_text");
font: UM.Theme.getFont("default")
anchors.centerIn: parent
}
} }
label: Label
onClicked:
{ {
settingPickDialog.visible = true; text: control.text;
if (meshTypeSelection.model.get(meshTypeSelection.currentIndex).type == "support_mesh") color: UM.Theme.getColor("setting_control_text");
{ font: UM.Theme.getFont("default")
settingPickDialog.additional_excluded_settings = base.all_categories_except_support; anchors.centerIn: parent
} }
else }
{
settingPickDialog.additional_excluded_settings = [] onClicked:
} {
settingPickDialog.visible = true;
if (meshTypeSelection.model.get(meshTypeSelection.currentIndex).type == "support_mesh")
{
settingPickDialog.additional_excluded_settings = base.all_categories_except_support;
}
else
{
settingPickDialog.additional_excluded_settings = []
} }
} }
} }