From 7d69b1727d246a98024079250ec66795376115cc Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Mon, 29 Jul 2019 14:56:21 +0200 Subject: [PATCH] Simplify code --- .../resources/qml/MonitorPrintJobCard.qml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml index ea6da9c25d..5aeedfd4ca 100644 --- a/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml +++ b/plugins/UM3NetworkPrinting/resources/qml/MonitorPrintJobCard.qml @@ -1,6 +1,5 @@ // Copyright (c) 2018 Ultimaker B.V. // Cura is released under the terms of the LGPLv3 or higher. - import QtQuick 2.2 import QtQuick.Controls 2.0 import UM 1.3 as UM @@ -76,6 +75,7 @@ Item anchors.verticalCenter: parent.verticalCenter height: 18 * screenScaleFactor // TODO: Theme! width: UM.Theme.getSize("monitor_column").width + Rectangle { color: UM.Theme.getColor("monitor_skeleton_loading") @@ -84,6 +84,7 @@ Item visible: !printJob radius: 2 * screenScaleFactor // TODO: Theme! } + Label { text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : "" @@ -179,13 +180,10 @@ Item id: printerConfiguration anchors.verticalCenter: parent.verticalCenter buildplate: catalog.i18nc("@label", "Glass") - configurations: - [ - base.printJob.configuration.extruderConfigurations[0], - base.printJob.configuration.extruderConfigurations[1] - ] + configurations: base.printJob.configuration.extruderConfigurations height: 72 * screenScaleFactor // TODO: Theme! } + Label { text: printJob && printJob.owner ? printJob.owner : "" color: UM.Theme.getColor("monitor_text_primary")