Fix Settings lines positioning for Per Object Settings

CURA-6683
This commit is contained in:
Nino van Hooff 2019-09-13 13:24:17 +02:00
parent 667e5f8e18
commit 44fbcaeb3a

View file

@ -41,10 +41,12 @@ Item
} }
function setMeshType(type){ function setMeshType(type){
print("setting mesh type to " + type)
UM.ActiveTool.setProperty("MeshType", type) UM.ActiveTool.setProperty("MeshType", type)
} }
function updateView(type) { function updateView(type) {
print("updating view for type " + type)
// set checked state of mesh type buttons // set checked state of mesh type buttons
normalButton.checked = type === normal_mesh_type normalButton.checked = type === normal_mesh_type
@ -149,51 +151,6 @@ Item
onClicked: setOverhangsMeshType() onClicked: setOverhangsMeshType()
} }
Button
{
id: customiseSettingsButton;
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;
border.width: UM.Theme.getSize("default_lining").width;
border.color: control.pressed ? UM.Theme.getColor("action_button_active_border") :
control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border")
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
}
}
onClicked:
{
settingPickDialog.visible = true;
if (current_mesh_type == "support_mesh")
{
settingPickDialog.additional_excluded_settings = base.all_categories_except_support;
}
else
{
settingPickDialog.additional_excluded_settings = []
}
}
}
}
Column // Settings Dialog Column // Settings Dialog
{ {
// This is to ensure that the panel is first increasing in size up to 200 and then shows a scrollbar. // This is to ensure that the panel is first increasing in size up to 200 and then shows a scrollbar.
@ -394,6 +351,51 @@ Item
} }
} }
Button
{
id: customiseSettingsButton;
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;
border.width: UM.Theme.getSize("default_lining").width;
border.color: control.pressed ? UM.Theme.getColor("action_button_active_border") :
control.hovered ? UM.Theme.getColor("action_button_hovered_border") : UM.Theme.getColor("action_button_border")
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
}
}
onClicked:
{
settingPickDialog.visible = true;
if (current_mesh_type == "support_mesh")
{
settingPickDialog.additional_excluded_settings = base.all_categories_except_support;
}
else
{
settingPickDialog.additional_excluded_settings = []
}
}
}
}
UM.Dialog UM.Dialog
{ {
id: settingPickDialog id: settingPickDialog