From 0f662da2c39d4675dd739d01d957b2ff6cccd6e2 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 28 Feb 2020 22:29:20 +0100 Subject: [PATCH] Show the number of active postprocessing scripts --- .../PostProcessingPlugin.qml | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml index cd8303d1d3..61b172c6bc 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.qml +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.qml @@ -484,15 +484,36 @@ UM.Dialog onClicked: dialog.accept() } - Cura.SecondaryButton + Item { objectName: "postProcessingSaveAreaButton" visible: activeScriptsList.count > 0 height: UM.Theme.getSize("action_button").height width: height - tooltip: catalog.i18nc("@info:tooltip", "Change active post-processing scripts") - onClicked: dialog.show() - iconSource: "postprocessing.svg" - fixedWidthMode: true + + Cura.SecondaryButton + { + height: UM.Theme.getSize("action_button").height + tooltip: catalog.i18nc("@info:tooltip", "Change active post-processing scripts") + toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignLeft + onClicked: dialog.show() + iconSource: "postprocessing.svg" + fixedWidthMode: false + } + + Cura.NotificationIcon + { + id: activeScriptCountIcon + visible: activeScriptsList.count > 0 + anchors + { + top: parent.top + right: parent.right + rightMargin: (-0.5 * width) | 0 + topMargin: (-0.5 * height) | 0 + } + + labelText: activeScriptsList.count + } } } \ No newline at end of file