Add a "show all" toggle to the select per object setting window

This way the user can add a setting that is not made visible in the sidebar. Adding a specific setting no longer needs a detour through the setting visibility preference page.

CURA-1799
This commit is contained in:
fieldOfView 2016-08-08 15:10:26 +02:00
parent 36abe075cf
commit ca2daae6ab

View File

@ -257,7 +257,7 @@ Item {
height: UM.Theme.getSize("setting").height;
visible: parseInt(UM.Preferences.getValue("cura/active_mode")) == 1
text: catalog.i18nc("@action:button", "Add Setting");
text: catalog.i18nc("@action:button", "Select settings");
style: ButtonStyle
{
@ -297,16 +297,19 @@ Item {
UM.Dialog {
id: settingPickDialog
title: catalog.i18nc("@title:window", "Pick a Setting to Customize")
title: catalog.i18nc("@title:window", "Select Settings to Customize for this object")
width: screenScaleFactor * 360;
property string labelFilter: ""
TextField {
id: filter;
id: filter
anchors {
top: parent.top;
left: parent.left;
right: parent.right;
top: parent.top
left: parent.left
right: toggleShowAll.left
rightMargin: UM.Theme.getSize("default_margin").width
}
placeholderText: catalog.i18nc("@label:textbox", "Filter...");
@ -324,6 +327,23 @@ Item {
}
}
CheckBox
{
id: toggleShowAll
anchors {
top: parent.top
right: parent.right
}
text: catalog.i18nc("@label:checkbox", "Show all")
checked: listview.model.showAll
onClicked:
{
listview.model.showAll = checked;
}
}
ScrollView
{
id: scrollView