mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 08:17:49 -06:00
Handle idle, unavailable, and unreachable states
Contributes to CL-1153
This commit is contained in:
parent
c9ed044205
commit
cced42a55b
1 changed files with 24 additions and 0 deletions
|
@ -169,6 +169,30 @@ Item
|
|||
height: childrenRect.height
|
||||
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
|
||||
{
|
||||
anchors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue