mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
CL-470 Add icons to the printer state box on the monitor tab.
Subtask of CL-457 Cura plugin: primary visual improvements
This commit is contained in:
parent
5865d52000
commit
3abf25937b
4 changed files with 54 additions and 1 deletions
|
@ -223,6 +223,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
|
||||
{
|
||||
|
@ -283,6 +286,7 @@ Rectangle
|
|||
|
||||
font: UM.Theme.getFont("small")
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: progressText
|
||||
|
@ -292,10 +296,42 @@ 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: 16 * screenScaleFactor
|
||||
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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle
|
||||
{
|
||||
//TODO: This will become a progress bar in the future
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue