From ca2daae6abf4b6d40d4c5a9af034aa65eaea78b9 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Mon, 8 Aug 2016 15:10:26 +0200 Subject: [PATCH] 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 --- .../PerObjectSettingsPanel.qml | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 569b17364f..4d29506099 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -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