mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Add empty state for print job queue
Contributes to CL-1154
This commit is contained in:
parent
3d92bd0133
commit
f6b69f05a9
3 changed files with 90 additions and 2 deletions
|
@ -39,6 +39,7 @@ Item
|
||||||
color: base.enabled && headerMouseArea.containsMouse ? headerHoverColor : headerBackgroundColor
|
color: base.enabled && headerMouseArea.containsMouse ? headerHoverColor : headerBackgroundColor
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
radius: 2 * screenScaleFactor // TODO: Theme!
|
||||||
Behavior on color
|
Behavior on color
|
||||||
{
|
{
|
||||||
ColorAnimation
|
ColorAnimation
|
||||||
|
@ -77,6 +78,7 @@ Item
|
||||||
color: headerBackgroundColor
|
color: headerBackgroundColor
|
||||||
height: base.expanded ? childrenRect.height : 0
|
height: base.expanded ? childrenRect.height : 0
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
radius: 2 * screenScaleFactor // TODO: Theme!
|
||||||
Behavior on height
|
Behavior on height
|
||||||
{
|
{
|
||||||
NumberAnimation
|
NumberAnimation
|
||||||
|
|
|
@ -58,6 +58,7 @@ Item
|
||||||
width: Math.round(parent.width / 2)
|
width: Math.round(parent.width / 2)
|
||||||
height: parent.height
|
height: parent.height
|
||||||
visible: !printJob
|
visible: !printJob
|
||||||
|
radius: 2 * screenScaleFactor // TODO: Theme!
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
@ -84,6 +85,7 @@ Item
|
||||||
width: Math.round(parent.width / 3)
|
width: Math.round(parent.width / 3)
|
||||||
height: parent.height
|
height: parent.height
|
||||||
visible: !printJob
|
visible: !printJob
|
||||||
|
radius: 2 * screenScaleFactor // TODO: Theme!
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
@ -111,6 +113,7 @@ Item
|
||||||
width: 72 * screenScaleFactor // TODO: Theme!
|
width: 72 * screenScaleFactor // TODO: Theme!
|
||||||
height: parent.height
|
height: parent.height
|
||||||
visible: !printJob
|
visible: !printJob
|
||||||
|
radius: 2 * screenScaleFactor // TODO: Theme!
|
||||||
}
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
|
|
@ -57,9 +57,9 @@ Item
|
||||||
verticalCenter: externalLinkIcon.verticalCenter
|
verticalCenter: externalLinkIcon.verticalCenter
|
||||||
}
|
}
|
||||||
color: UM.Theme.getColor("monitor_text_link")
|
color: UM.Theme.getColor("monitor_text_link")
|
||||||
font: UM.Theme.getFont("default") // 12pt, regular
|
font: UM.Theme.getFont("medium") // 14pt, regular
|
||||||
linkColor: UM.Theme.getColor("monitor_text_link")
|
linkColor: UM.Theme.getColor("monitor_text_link")
|
||||||
text: catalog.i18nc("@label link to connect manager", "Manage queue in Cura Connect")
|
text: catalog.i18nc("@label link to connect manager", "Go to Cura Connect")
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -174,4 +174,87 @@ Item
|
||||||
spacing: 6 // TODO: Theme!
|
spacing: 6 // TODO: Theme!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
top: printJobQueueHeadings.bottom
|
||||||
|
topMargin: 12 * screenScaleFactor // TODO: Theme!
|
||||||
|
}
|
||||||
|
height: 48 * screenScaleFactor // TODO: Theme!
|
||||||
|
width: parent.width
|
||||||
|
color: UM.Theme.getColor("monitor_card_background")
|
||||||
|
border.color: UM.Theme.getColor("monitor_card_border")
|
||||||
|
radius: 2 * screenScaleFactor // TODO: Theme!
|
||||||
|
|
||||||
|
visible: printJobList.model.length == 0
|
||||||
|
|
||||||
|
Row
|
||||||
|
{
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: parent.left
|
||||||
|
leftMargin: 18 * screenScaleFactor // TODO: Theme!
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
spacing: 18 * screenScaleFactor // TODO: Theme!
|
||||||
|
height: 18 * screenScaleFactor // TODO: Theme!
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: "All jobs are printed."
|
||||||
|
color: UM.Theme.getColor("monitor_text_primary")
|
||||||
|
font: UM.Theme.getFont("medium") // 14pt, regular
|
||||||
|
}
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: viewPrintHistoryLabel
|
||||||
|
|
||||||
|
height: 18 * screenScaleFactor // TODO: Theme!
|
||||||
|
width: childrenRect.width
|
||||||
|
|
||||||
|
UM.RecolorImage
|
||||||
|
{
|
||||||
|
id: printHistoryIcon
|
||||||
|
anchors.verticalCenter: manageQueueLabel.verticalCenter
|
||||||
|
color: UM.Theme.getColor("monitor_text_link")
|
||||||
|
source: UM.Theme.getIcon("external_link")
|
||||||
|
width: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
|
||||||
|
height: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: viewPrintHistoryText
|
||||||
|
anchors
|
||||||
|
{
|
||||||
|
left: printHistoryIcon.right
|
||||||
|
leftMargin: 6 * screenScaleFactor // TODO: Theme!
|
||||||
|
verticalCenter: printHistoryIcon.verticalCenter
|
||||||
|
}
|
||||||
|
color: UM.Theme.getColor("monitor_text_link")
|
||||||
|
font: UM.Theme.getFont("medium") // 14pt, regular
|
||||||
|
linkColor: UM.Theme.getColor("monitor_text_link")
|
||||||
|
text: catalog.i18nc("@label link to connect manager", "View print history")
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
}
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: Cura.MachineManager.printerOutputDevices[0].openPrintJobControlPanel()
|
||||||
|
onEntered:
|
||||||
|
{
|
||||||
|
viewPrintHistoryText.font.underline = true
|
||||||
|
}
|
||||||
|
onExited:
|
||||||
|
{
|
||||||
|
viewPrintHistoryText.font.underline = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue