diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py
index 82edebec60..520f95e293 100755
--- a/cura/Settings/MachineManager.py
+++ b/cura/Settings/MachineManager.py
@@ -354,11 +354,14 @@ class MachineManager(QObject):
if containers:
Application.getInstance().setGlobalContainerStack(containers[0])
+ self.__onInstanceContainersChanged()
+
@pyqtSlot(str, str)
def addMachine(self, name: str, definition_id: str) -> None:
new_stack = CuraStackBuilder.createMachine(name, definition_id)
if new_stack:
- Application.getInstance().setGlobalContainerStack(new_stack)
+ # Instead of setting the global container stack here, we set the active machine and so the signals are emitted
+ self.setActiveMachine(new_stack.getId())
else:
Logger.log("w", "Failed creating a new machine!")
diff --git a/plugins/UM3NetworkPrinting/ClusterControlItem.qml b/plugins/UM3NetworkPrinting/ClusterControlItem.qml
index f2e2b601f2..194337cca0 100644
--- a/plugins/UM3NetworkPrinting/ClusterControlItem.qml
+++ b/plugins/UM3NetworkPrinting/ClusterControlItem.qml
@@ -6,11 +6,13 @@ import Cura 1.0 as Cura
Component
{
- Item
+ Rectangle
{
id: base
property var manager: Cura.MachineManager.printerOutputDevices[0]
anchors.fill: parent
+ color: UM.Theme.getColor("viewport_background")
+
property var lineColor: "#DCDCDC" // TODO: Should be linked to theme.
property var cornerRadius: 4 * screenScaleFactor // TODO: Should be linked to theme.
@@ -27,24 +29,17 @@ Component
id: activePrintersLabel
font: UM.Theme.getFont("large")
anchors.horizontalCenter: parent.horizontalCenter
+ anchors.topMargin: UM.Theme.getSize("default_margin").height
+ anchors.top: parent.top
text: Cura.MachineManager.printerOutputDevices[0].name
}
- Label
- {
- id: printerGroupLabel
- anchors.top: activePrintersLabel.bottom
- text: catalog.i18nc("@label", "PRINTER GROUP")
- anchors.horizontalCenter: parent.horizontalCenter
- font: UM.Theme.getFont("very_small")
- opacity: 0.65
- }
Rectangle
{
id: printJobArea
border.width: UM.Theme.getSize("default_lining").width
border.color: lineColor
- anchors.top: printerGroupLabel.bottom
+ anchors.top: activePrintersLabel.bottom
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width
@@ -240,4 +235,4 @@ Component
}
}
}
-}
\ No newline at end of file
+}
diff --git a/plugins/UM3NetworkPrinting/ClusterMonitorItem.qml b/plugins/UM3NetworkPrinting/ClusterMonitorItem.qml
index 48fb0a33fc..c1d852072f 100644
--- a/plugins/UM3NetworkPrinting/ClusterMonitorItem.qml
+++ b/plugins/UM3NetworkPrinting/ClusterMonitorItem.qml
@@ -11,7 +11,7 @@ Component
{
width: maximumWidth
height: maximumHeight
- color: "#FFFFFF" // TODO; Should not be hardcoded.
+ color: UM.Theme.getColor("viewport_background")
property var emphasisColor: "#44c0ff" //TODO: should be linked to theme.
property var lineColor: "#DCDCDC" // TODO: Should be linked to theme.
@@ -49,7 +49,7 @@ Component
anchors.topMargin: UM.Theme.getSize("default_margin").height
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
-
+
width: Math.min(800 * screenScaleFactor, maximumWidth)
height: children.height
visible: OutputDevice.connectedPrinters.length != 0
diff --git a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
index b3cc42b110..999bc15223 100644
--- a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
+++ b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py
@@ -17,6 +17,7 @@ from UM.Logger import Logger
from UM.Message import Message
from UM.OutputDevice import OutputDeviceError
from UM.i18n import i18nCatalog
+from UM.Qt.Duration import Duration, DurationFormat
from . import NetworkPrinterOutputDevice
@@ -700,3 +701,7 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte
self._reply.abort()
self._reply = None
Application.getInstance().showPrintMonitor.emit(False)
+
+ @pyqtSlot(int, result=str)
+ def formatDuration(self, seconds):
+ return Duration(seconds).getDisplayString(DurationFormat.Format.Short)
diff --git a/plugins/UM3NetworkPrinting/OpenPanelButton.qml b/plugins/UM3NetworkPrinting/OpenPanelButton.qml
index 3915c1f9eb..a06a97f8f9 100644
--- a/plugins/UM3NetworkPrinting/OpenPanelButton.qml
+++ b/plugins/UM3NetworkPrinting/OpenPanelButton.qml
@@ -14,5 +14,58 @@ Button {
tooltip: catalog.i18nc("@info:tooltip", "Opens the print jobs page with your default web browser.")
text: catalog.i18nc("@action:button", "View print jobs")
- style: UM.Theme.styles.sidebar_action_button
+ // FIXME: This button style is copied and duplicated from SaveButton.qml
+ style: ButtonStyle {
+ background: Rectangle
+ {
+ border.width: UM.Theme.getSize("default_lining").width
+ border.color:
+ {
+ if(!control.enabled)
+ return UM.Theme.getColor("action_button_disabled_border");
+ else if(control.pressed)
+ return UM.Theme.getColor("print_button_ready_pressed_border");
+ else if(control.hovered)
+ return UM.Theme.getColor("print_button_ready_hovered_border");
+ else
+ return UM.Theme.getColor("print_button_ready_border");
+ }
+ color:
+ {
+ if(!control.enabled)
+ return UM.Theme.getColor("action_button_disabled");
+ else if(control.pressed)
+ return UM.Theme.getColor("print_button_ready_pressed");
+ else if(control.hovered)
+ return UM.Theme.getColor("print_button_ready_hovered");
+ else
+ return UM.Theme.getColor("print_button_ready");
+ }
+
+ Behavior on color { ColorAnimation { duration: 50; } }
+
+ implicitWidth: actualLabel.contentWidth + (UM.Theme.getSize("sidebar_margin").width * 2)
+
+ Label {
+ id: actualLabel
+ anchors.centerIn: parent
+ color:
+ {
+ if(!control.enabled)
+ return UM.Theme.getColor("action_button_disabled_text");
+ else if(control.pressed)
+ return UM.Theme.getColor("print_button_ready_text");
+ else if(control.hovered)
+ return UM.Theme.getColor("print_button_ready_text");
+ else
+ return UM.Theme.getColor("print_button_ready_text");
+ }
+ font: UM.Theme.getFont("action_button")
+ text: control.text;
+ }
+ }
+ label: Item { }
+ }
+
+
}
diff --git a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
index e2f7c2b5df..2b55cd9152 100644
--- a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+++ b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
@@ -14,14 +14,7 @@ Rectangle
function getPrettyTime(time)
{
- var hours = Math.floor(time / 3600)
- time -= hours * 3600
- var minutes = Math.floor(time / 60);
- time -= minutes * 60
- var seconds = Math.floor(time);
-
- var finalTime = strPadLeft(hours, "0", 2) + ':' + strPadLeft(minutes,'0',2)+ ':' + strPadLeft(seconds,'0',2);
- return finalTime;
+ return OutputDevice.formatDuration(time)
}
function formatPrintJobPercent(printJob)
@@ -160,14 +153,14 @@ Rectangle
anchors.right: printProgressArea.left
anchors.rightMargin: UM.Theme.getSize("default_margin").width
color: emphasisColor
- UM.RecolorImage
+
+ Image
{
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
+ width: 40 * screenScaleFactor
+ height: width
+ anchors.right: parent.right
+ anchors.rightMargin: parent.rightMargin
source: "camera-icon.svg"
- width: sourceSize.width
- height: sourceSize.height * width / sourceSize.width
- color: "white"
}
}
@@ -234,6 +227,9 @@ Rectangle
//border.color: lineColor
height: 40 * screenScaleFactor
anchors.left: parent.left
+ property var showPercent: {
+ return printJob != null && (["printing", "post_print", "pre_print", "sent_to_printer"].indexOf(printJob.status) !== -1);
+ }
Label
{
@@ -290,6 +286,7 @@ Rectangle
font: UM.Theme.getFont("small")
}
+
Label
{
id: progressText
@@ -299,10 +296,44 @@ Rectangle
anchors.top: statusText.top
text: formatPrintJobPercent(printJob)
- visible: printJob != null && (["printing", "post_print", "pre_print", "sent_to_printer"].indexOf(printJob.status) !== -1)
+ visible: printProgressTitleBar.showPercent
opacity: 0.65
font: UM.Theme.getFont("very_small")
}
+
+ Image
+ {
+ width: statusText.height
+ height: width
+ anchors.right: parent.right
+ anchors.rightMargin: UM.Theme.getSize("default_margin").width
+ anchors.top: statusText.top
+
+ visible: ! printProgressTitleBar.showPercent
+
+ source: {
+ if ( ! printer.enabled)
+ {
+ return "blocked-icon.svg";
+ }
+ if (printJob != null)
+ {
+ if(printJob.status === "queued")
+ {
+ if (printJob.configuration_changes_required != null && printJob.configuration_changes_required.length !== 0)
+ {
+ return "action-required-icon.svg";
+ }
+ }
+ else if (printJob.status === "wait_cleanup")
+ {
+ return "checkmark-icon.svg";
+ }
+ }
+ return ""; // We're not going to show it, so it will not be resolved as a url.
+ }
+ }
+
Rectangle
{
//TODO: This will become a progress bar in the future
@@ -325,7 +356,7 @@ Rectangle
width: parent.width - 2 * UM.Theme.getSize("default_margin").width
- visible: showExtended
+ visible: printProgressArea.showExtended
Label // Status detail
{
diff --git a/plugins/UM3NetworkPrinting/action-required-icon.svg b/plugins/UM3NetworkPrinting/action-required-icon.svg
new file mode 100644
index 0000000000..e7768849c6
--- /dev/null
+++ b/plugins/UM3NetworkPrinting/action-required-icon.svg
@@ -0,0 +1,10 @@
+
diff --git a/plugins/UM3NetworkPrinting/blocked-icon.svg b/plugins/UM3NetworkPrinting/blocked-icon.svg
new file mode 100644
index 0000000000..03bbe24e16
--- /dev/null
+++ b/plugins/UM3NetworkPrinting/blocked-icon.svg
@@ -0,0 +1,3 @@
+
diff --git a/plugins/UM3NetworkPrinting/camera-icon.svg b/plugins/UM3NetworkPrinting/camera-icon.svg
index 2aafc4b6f4..29adfa5875 100644
--- a/plugins/UM3NetworkPrinting/camera-icon.svg
+++ b/plugins/UM3NetworkPrinting/camera-icon.svg
@@ -1,3 +1,6 @@
-
+
\ No newline at end of file
diff --git a/plugins/UM3NetworkPrinting/checkmark-icon.svg b/plugins/UM3NetworkPrinting/checkmark-icon.svg
new file mode 100644
index 0000000000..9d4507e551
--- /dev/null
+++ b/plugins/UM3NetworkPrinting/checkmark-icon.svg
@@ -0,0 +1,3 @@
+
diff --git a/resources/definitions/ultimaker2.def.json b/resources/definitions/ultimaker2.def.json
index 0a9a7bf7ce..6974e61938 100644
--- a/resources/definitions/ultimaker2.def.json
+++ b/resources/definitions/ultimaker2.def.json
@@ -14,6 +14,7 @@
"platform_texture": "Ultimaker2backplate.png",
"platform_offset": [9, 0, 0],
"has_materials": false,
+ "has_machine_quality": true,
"first_start_actions": ["UM2UpgradeSelection"],
"supported_actions":["UM2UpgradeSelection", "UpgradeFirmware"]
},
diff --git a/resources/i18n/cura.pot b/resources/i18n/cura.pot
index 809ecded80..409fd77c7b 100644
--- a/resources/i18n/cura.pot
+++ b/resources/i18n/cura.pot
@@ -18,12 +18,25 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-
#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
msgctxt "@label:status"
msgid "Print aborted"
msgstr ""
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Blocked"
+msgstr ""
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Action required"
+msgstr ""
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Can't start print"
+msgstr ""
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
msgctxt "@action"
diff --git a/resources/i18n/de_DE/cura.po b/resources/i18n/de_DE/cura.po
index 5e16a60617..1323070dbe 100644
--- a/resources/i18n/de_DE/cura.po
+++ b/resources/i18n/de_DE/cura.po
@@ -21,6 +21,21 @@ msgctxt "@label:status"
msgid "Print aborted"
msgstr "Drucken wurde abgebrochen"
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Blocked"
+msgstr "Blockiert"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Action required"
+msgstr "Handlung erforderlich"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Can't start print"
+msgstr "Druck startet nicht"
+
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
msgctxt "@action"
msgid "Machine Settings"
diff --git a/resources/i18n/es_ES/cura.po b/resources/i18n/es_ES/cura.po
index f7d3d33a2e..1f4ade8a4f 100644
--- a/resources/i18n/es_ES/cura.po
+++ b/resources/i18n/es_ES/cura.po
@@ -21,6 +21,21 @@ msgctxt "@label:status"
msgid "Print aborted"
msgstr "Impresión cancelada"
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Blocked"
+msgstr "Deshabilitada"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Action required"
+msgstr "Acción requerida"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Can't start print"
+msgstr "No se puede imprimir"
+
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
msgctxt "@action"
msgid "Machine Settings"
diff --git a/resources/i18n/fi_FI/cura.po b/resources/i18n/fi_FI/cura.po
index a072a73faa..6c86ed1575 100644
--- a/resources/i18n/fi_FI/cura.po
+++ b/resources/i18n/fi_FI/cura.po
@@ -21,6 +21,21 @@ msgctxt "@label:status"
msgid "Print aborted"
msgstr "Tulostus keskeytetty"
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Blocked"
+msgstr "Tukossa"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Action required"
+msgstr "Vaatii toimenpiteitä"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Can't start print"
+msgstr "Tulostus ei käynnisty"
+
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
msgctxt "@action"
msgid "Machine Settings"
diff --git a/resources/i18n/fr_FR/cura.po b/resources/i18n/fr_FR/cura.po
index 6d20ae0695..b018bdade6 100644
--- a/resources/i18n/fr_FR/cura.po
+++ b/resources/i18n/fr_FR/cura.po
@@ -21,6 +21,21 @@ msgctxt "@label:status"
msgid "Print aborted"
msgstr "Abandon de l'impression"
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Blocked"
+msgstr "Bloqué"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Action required"
+msgstr "Action requise"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Can't start print"
+msgstr "Ne peux pas imprimer"
+
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
msgctxt "@action"
msgid "Machine Settings"
diff --git a/resources/i18n/it_IT/cura.po b/resources/i18n/it_IT/cura.po
index 3bb1cfa633..21a804d1e3 100644
--- a/resources/i18n/it_IT/cura.po
+++ b/resources/i18n/it_IT/cura.po
@@ -21,6 +21,21 @@ msgctxt "@label:status"
msgid "Print aborted"
msgstr "Stampa interrotta"
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Blocked"
+msgstr "Ostacolato"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Action required"
+msgstr "Richiede un'azione"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Can't start print"
+msgstr "Impossibile avviare la stampa"
+
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
msgctxt "@action"
msgid "Machine Settings"
diff --git a/resources/i18n/nl_NL/cura.po b/resources/i18n/nl_NL/cura.po
index 5a547385da..ecbe70e8c3 100644
--- a/resources/i18n/nl_NL/cura.po
+++ b/resources/i18n/nl_NL/cura.po
@@ -21,6 +21,21 @@ msgctxt "@label:status"
msgid "Print aborted"
msgstr "Print afgebroken"
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Blocked"
+msgstr "Geblokkeerd"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Action required"
+msgstr "Handeling nodig"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Can't start print"
+msgstr "Print start niet"
+
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
msgctxt "@action"
msgid "Machine Settings"
diff --git a/resources/i18n/ru_RU/cura.po b/resources/i18n/ru_RU/cura.po
index a444d61996..d578dbb819 100755
--- a/resources/i18n/ru_RU/cura.po
+++ b/resources/i18n/ru_RU/cura.po
@@ -23,6 +23,21 @@ msgctxt "@label:status"
msgid "Print aborted"
msgstr "Печать прервана"
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Blocked"
+msgstr "блокированный"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Action required"
+msgstr "Необходимое действие"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Can't start print"
+msgstr "Не удается начать печать"
+
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
msgctxt "@action"
msgid "Machine Settings"
diff --git a/resources/i18n/tr_TR/cura.po b/resources/i18n/tr_TR/cura.po
index 49827ba45b..b4eceee25f 100644
--- a/resources/i18n/tr_TR/cura.po
+++ b/resources/i18n/tr_TR/cura.po
@@ -21,6 +21,21 @@ msgctxt "@label:status"
msgid "Print aborted"
msgstr "Yazdırma durduruldu"
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Blocked"
+msgstr "Tıkalı"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Action required"
+msgstr "Eylem gerekli"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Can't start print"
+msgstr "Baskı başlatılamıyor"
+
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
msgctxt "@action"
msgid "Machine Settings"
diff --git a/resources/i18n/zh_CN/cura.po b/resources/i18n/zh_CN/cura.po
index 5e03ff0e31..ff29b9e52e 100644
--- a/resources/i18n/zh_CN/cura.po
+++ b/resources/i18n/zh_CN/cura.po
@@ -23,6 +23,21 @@ msgctxt "@label:status"
msgid "Print aborted"
msgstr "打印已中止"
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Blocked"
+msgstr "冻结操作"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Action required"
+msgstr "需要采取行动"
+
+#: Manually added for plugins/UM3NetworkPrinting/PrinterInfoBlock.qml
+msgctxt "@label:status"
+msgid "Can't start print"
+msgstr "不能开始打印"
+
#: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.py:29
msgctxt "@action"
msgid "Machine Settings"
diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml
index 2399fb4395..9fecf23ca9 100755
--- a/resources/qml/Cura.qml
+++ b/resources/qml/Cura.qml
@@ -386,8 +386,6 @@ UM.MainWindow
visible: opacity > 0
opacity: base.showPrintMonitor ? 1 : 0
- Behavior on opacity { NumberAnimation { duration: 100; } }
-
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.AllButtons
@@ -818,7 +816,7 @@ UM.MainWindow
Connections
{
- target: Printer
+ target: CuraApplication
onShowDiscardOrKeepProfileChanges:
{
discardOrKeepProfileChangesDialog.show()
diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml
index 0a80ae9339..f8c3173c11 100644
--- a/resources/qml/SidebarSimple.qml
+++ b/resources/qml/SidebarSimple.qml
@@ -67,6 +67,7 @@ Item
target: Cura.MachineManager
onActiveQualityChanged: qualityModel.update()
onActiveMaterialChanged: qualityModel.update()
+ onActiveVariantChanged: qualityModel.update()
}
ListModel
@@ -75,7 +76,7 @@ Item
property var totalTicks: 0
property var availableTotalTicks: 0
- property var activeQualityId: 0
+ property var activeQualityIndex: 0
property var qualitySliderStepWidth: 0
property var qualitySliderAvailableMin : 0
@@ -96,7 +97,7 @@ Item
// Set selected value
if (Cura.MachineManager.activeQualityId == qualityItem.id) {
- qualityModel.activeQualityId = i
+ qualityModel.activeQualityIndex = i
}
// Set min available
@@ -143,9 +144,13 @@ Item
// check, the ticks count cannot be less than zero
if(Cura.ProfilesModel.rowCount() != 0)
+ {
qualityModel.totalTicks = Cura.ProfilesModel.rowCount() - 1 // minus one, because slider starts from 0
+ }
else
+ {
qualityModel.totalTicks = 0
+ }
}
}
@@ -263,7 +268,7 @@ Item
maximumValue: qualityModel.qualitySliderAvailableMax >= 0 ? qualityModel.qualitySliderAvailableMax : 0
stepSize: 1
- value: qualityModel.activeQualityId
+ value: qualityModel.activeQualityIndex
width: qualityModel.qualitySliderStepWidth * qualityModel.availableTotalTicks
@@ -291,10 +296,11 @@ Item
}
onValueChanged: {
- if(Cura.MachineManager.activeMachine != null)
+ // Only change if an active machine is set and the slider is visible at all.
+ if(Cura.MachineManager.activeMachine != null && visible)
{
//Prevent updating during view initializing. Trigger only if the value changed by user
- if(qualitySlider.value != qualityModel.activeQualityId)
+ if(qualitySlider.value != qualityModel.activeQualityIndex)
{
//start updating with short delay
qualitySliderChangeTimer.start();
diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json
index 187896aa28..f39fe96c37 100644
--- a/resources/themes/cura-dark/theme.json
+++ b/resources/themes/cura-dark/theme.json
@@ -16,7 +16,7 @@
"secondary": [241, 242, 242, 255],
"topbar_background_color": [0, 0, 0, 0],
- "topbar_background_color_monitoring": [39, 44, 48, 255],
+ "topbar_background_color_monitoring": [0, 0, 0, 0],
"topbar_button_text_active": [255, 255, 255, 255],
"topbar_button_text_inactive": [128, 128, 128, 255],
diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json
index 62e22e4f0d..5d50618eea 100644
--- a/resources/themes/cura-light/theme.json
+++ b/resources/themes/cura-light/theme.json
@@ -59,7 +59,7 @@
"colors": {
"sidebar": [255, 255, 255, 255],
"lining": [192, 193, 194, 255],
- "viewport_overlay": [24, 41, 77, 192],
+ "viewport_overlay": [0, 0, 0, 192],
"primary": [12, 169, 227, 255],
"primary_hover": [48, 182, 231, 255],
@@ -68,7 +68,7 @@
"secondary": [245, 245, 245, 255],
"topbar_background_color": [255, 255, 255, 0],
- "topbar_background_color_monitoring": [255, 255, 255, 255],
+ "topbar_background_color_monitoring": [255, 255, 255, 0],
"topbar_button_text_active": [0, 0, 0, 255],
"topbar_button_text_inactive": [128, 128, 128, 255],