From a3892c814798ded4f26f219eb75efca209d10826 Mon Sep 17 00:00:00 2001 From: "j.delarago" Date: Fri, 18 Mar 2022 16:44:56 +0100 Subject: [PATCH 1/3] Remove reference to Cura in UM component Add isActiveModelFunction that can be overwritten in inheriting components Override isActiveModelFunction in Profiles page, this is done because quality models do not have a unique id that can be assigned to activeId CURA-9044 --- resources/qml/Preferences/ProfilesPage.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 1b18cbce4c..7358e515bb 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -48,6 +48,17 @@ UM.ManagementPage onHamburgeButtonClicked: menu.popup(content_item, content_item.width - menu.width, hamburger_button.height) + isActiveModelFunction: function(model, id) { + if (model.is_read_only) + { + return (model.name == Cura.MachineManager.activeQualityOrQualityChangesName) && (model.intent_category == Cura.MachineManager.activeIntentCategory); + } + else + { + return model.name == Cura.MachineManager.activeQualityOrQualityChangesName; + } + } + onCreateProfile: { createQualityDialog.object = Cura.ContainerManager.makeUniqueName(Cura.MachineManager.activeQualityOrQualityChangesName); From a4f1907b12cb85983b8560ccbd3f36a8bfe86281 Mon Sep 17 00:00:00 2001 From: casper Date: Mon, 21 Mar 2022 10:23:05 +0100 Subject: [PATCH 2/3] Show Yes and No buttons in abort dialog CURA-8980 --- resources/qml/MonitorButton.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/MonitorButton.qml b/resources/qml/MonitorButton.qml index 7e9219a7dc..a9ad8e811e 100644 --- a/resources/qml/MonitorButton.qml +++ b/resources/qml/MonitorButton.qml @@ -316,7 +316,7 @@ Item height: UM.Theme.getSize("save_button_save_to_button").height text: catalog.i18nc("@label", "Abort Print") - onClicked: confirmationDialog.visible = true + onClicked: confirmationDialog.open() } Cura.MessageDialog @@ -325,7 +325,7 @@ Item title: catalog.i18nc("@window:title", "Abort print") text: catalog.i18nc("@label", "Are you sure you want to abort the print?") - standardButtons: Dialog.Yes | Dialog.No + standardButtons: Cura.MessageDialog.Yes | Cura.MessageDialog.No onAccepted: activePrintJob.setState("abort") } } From 9b19eaf84f5df51c295a6077c3bc668e701027f2 Mon Sep 17 00:00:00 2001 From: casper Date: Mon, 21 Mar 2022 11:27:47 +0100 Subject: [PATCH 3/3] Add scroll bar to print monitor if content is overflowing Fixes https://github.com/Ultimaker/Cura/issues/11629 CURA-8980 --- plugins/USBPrinting/MonitorItem.qml | 5 ++++- resources/qml/PrintMonitor.qml | 28 +++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/plugins/USBPrinting/MonitorItem.qml b/plugins/USBPrinting/MonitorItem.qml index 3ca8140107..a3c7793fb1 100644 --- a/plugins/USBPrinting/MonitorItem.qml +++ b/plugins/USBPrinting/MonitorItem.qml @@ -21,7 +21,10 @@ Component Cura.PrintMonitor { - anchors.fill: parent + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: footerSeparator.top } Rectangle diff --git a/resources/qml/PrintMonitor.qml b/resources/qml/PrintMonitor.qml index 5be4bba6a4..1ea7ccc4a3 100644 --- a/resources/qml/PrintMonitor.qml +++ b/resources/qml/PrintMonitor.qml @@ -3,17 +3,33 @@ import QtQuick 2.7 import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.15 -import UM 1.2 as UM +import UM 1.5 as UM import Cura 1.0 as Cura import "PrinterOutput" - -Item +ScrollView { id: base - UM.I18nCatalog { id: catalog; name: "cura"} + width: parent.width + height: parent.height + + contentHeight: printMonitor.height + + ScrollBar.vertical: UM.ScrollBar + { + id: scrollbar + parent: base + anchors + { + right: parent.right + top: parent.top + bottom: parent.bottom + } + } + clip: true function showTooltip(item, position, text) { @@ -51,7 +67,9 @@ Item { id: printMonitor - anchors.fill: parent + UM.I18nCatalog { id: catalog; name: "cura" } + + width: parent.width - scrollbar.width property var extrudersModel: CuraApplication.getExtrudersModel()