mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 21:45:59 +08:00
Handle idle, unavailable, and unreachable states
Contributes to CL-1153
This commit is contained in:
parent
c9ed044205
commit
cced42a55b
@ -169,6 +169,30 @@ Item
|
|||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
spacing: 18 * screenScaleFactor // TODO: Theme!
|
spacing: 18 * screenScaleFactor // TODO: Theme!
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: printerStatus
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
color: "#414054" // TODO: Theme!
|
||||||
|
font: UM.Theme.getFont("large") // 16pt, bold
|
||||||
|
text: {
|
||||||
|
if (printer && printer.state == "disabled"){
|
||||||
|
return catalog.i18nc("@label:status", "Unavailable")
|
||||||
|
}
|
||||||
|
if (printer && printer.state == "unreachable"){
|
||||||
|
return catalog.i18nc("@label:status", "Unavailable")
|
||||||
|
}
|
||||||
|
if (printer && !printer.activePrintJob)
|
||||||
|
{
|
||||||
|
return catalog.i18nc("@label:status", "Idle")
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
anchors
|
anchors
|
||||||
|
Loading…
x
Reference in New Issue
Block a user