Simplify code

This commit is contained in:
ChrisTerBeke 2019-07-29 14:56:21 +02:00
parent 4b212d6c05
commit 7d69b1727d

View file

@ -1,6 +1,5 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2 import QtQuick 2.2
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import UM 1.3 as UM import UM 1.3 as UM
@ -76,6 +75,7 @@ Item
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: 18 * screenScaleFactor // TODO: Theme! height: 18 * screenScaleFactor // TODO: Theme!
width: UM.Theme.getSize("monitor_column").width width: UM.Theme.getSize("monitor_column").width
Rectangle Rectangle
{ {
color: UM.Theme.getColor("monitor_skeleton_loading") color: UM.Theme.getColor("monitor_skeleton_loading")
@ -84,6 +84,7 @@ Item
visible: !printJob visible: !printJob
radius: 2 * screenScaleFactor // TODO: Theme! radius: 2 * screenScaleFactor // TODO: Theme!
} }
Label Label
{ {
text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : "" text: printJob ? OutputDevice.formatDuration(printJob.timeTotal) : ""
@ -179,13 +180,10 @@ Item
id: printerConfiguration id: printerConfiguration
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
buildplate: catalog.i18nc("@label", "Glass") buildplate: catalog.i18nc("@label", "Glass")
configurations: configurations: base.printJob.configuration.extruderConfigurations
[
base.printJob.configuration.extruderConfigurations[0],
base.printJob.configuration.extruderConfigurations[1]
]
height: 72 * screenScaleFactor // TODO: Theme! height: 72 * screenScaleFactor // TODO: Theme!
} }
Label { Label {
text: printJob && printJob.owner ? printJob.owner : "" text: printJob && printJob.owner ? printJob.owner : ""
color: UM.Theme.getColor("monitor_text_primary") color: UM.Theme.getColor("monitor_text_primary")