Add skeleton loading to printer cards

Contributes to CL-1157
This commit is contained in:
Ian Paschal 2019-01-08 14:27:54 +01:00
parent 4dbab88792
commit e81742d296
10 changed files with 192 additions and 84 deletions

View file

@ -16,23 +16,28 @@ Item
width: size
height: size
// Actual content
Image
Rectangle
{
id: previewImage
anchors.fill: parent
opacity:
color: printJob ? "transparent" : "#eeeeee" // TODO: Theme!
radius: 8 // TODO: Theme!
Image
{
if (printJob && (printJob.state == "error" || printJob.configurationChanges.length > 0 || !printJob.isActive))
id: previewImage
anchors.fill: parent
opacity:
{
return 0.5
if (printJob && (printJob.state == "error" || printJob.configurationChanges.length > 0 || !printJob.isActive))
{
return 0.5
}
return 1.0
}
return 1.0
source: printJob ? printJob.previewImageUrl : ""
}
source: printJob ? printJob.previewImageUrl : ""
visible: printJob
}
UM.RecolorImage
{
id: ultiBotImage