From 2548fd8014c98d1d99c8f2da77df11965defc09b Mon Sep 17 00:00:00 2001 From: jelle Spijker Date: Mon, 30 Aug 2021 13:39:12 +0200 Subject: [PATCH 1/3] Fix greyed out cluster printers The PrintWindow still used an old style combobox. This resulted in a Mac user not being able to specify which clustered printer he wanted to send a slice to. Using the new QtQuick.Controls and specifically setting the currentIndex fixed it for Mac. --- plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml index 6d9f375788..441766a8e7 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml @@ -2,7 +2,8 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 import QtQuick.Window 2.2 -import QtQuick.Controls 1.2 +import QtQuick.Controls 2.15 + import UM 1.1 as UM UM.Dialog { @@ -84,6 +85,7 @@ UM.Dialog { ComboBox { id: printerComboBox; + currentIndex: 0; Behavior on height { NumberAnimation { duration: 100 } } height: 40 * screenScaleFactor; model: ListModel { From f730959f780ef6d69733dc69d2f9a1dfbe802af3 Mon Sep 17 00:00:00 2001 From: jelle Spijker Date: Mon, 30 Aug 2021 16:15:02 +0200 Subject: [PATCH 2/3] fixed discard or keep combobox on Mac Use the new controls ComboBox --- resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml index 2ddacb6d79..0a9d317d2d 100644 --- a/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml +++ b/resources/qml/Dialogs/DiscardOrKeepProfileChangesDialog.qml @@ -3,6 +3,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.1 +import QtQuick.Controls 2.15 as NewControls import QtQuick.Dialogs 1.2 import QtQuick.Window 2.1 @@ -145,10 +146,11 @@ UM.Dialog anchors.margins: UM.Theme.getSize("default_margin").width height: childrenRect.height - ComboBox + NewControls.ComboBox { id: discardOrKeepProfileChangesDropDownButton width: 300 + textRole: "text" model: ListModel { @@ -217,4 +219,4 @@ UM.Dialog } } } -} \ No newline at end of file +} From d97c4e2c9494e2fd5fdcebf65a0570b4f91fcaeb Mon Sep 17 00:00:00 2001 From: jelle Spijker Date: Tue, 31 Aug 2021 09:34:23 +0200 Subject: [PATCH 3/3] Don't use new controls for the buttons --- plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml b/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml index 441766a8e7..dcfed2f7b4 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/PrintWindow.qml @@ -2,7 +2,8 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick 2.2 import QtQuick.Window 2.2 -import QtQuick.Controls 2.15 +import QtQuick.Controls 1.1 +import QtQuick.Controls 2.15 as NewControls import UM 1.1 as UM @@ -83,7 +84,7 @@ UM.Dialog { renderType: Text.NativeRendering; } - ComboBox { + NewControls.ComboBox { id: printerComboBox; currentIndex: 0; Behavior on height { NumberAnimation { duration: 100 } }