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

@ -19,7 +19,7 @@ Item
property alias buildplate: buildplateConfig.buildplate
// Array of extracted extruder configurations
property var configurations: null
property var configurations: [null,null]
// Default size, but should be stretched to fill parent
height: 72 * parent.height
@ -37,10 +37,10 @@ Item
MonitorExtruderConfiguration
{
color: modelData.activeMaterial ? modelData.activeMaterial.color : "#eeeeee" // TODO: Theme!
material: modelData.activeMaterial ? modelData.activeMaterial.name : ""
position: modelData.position
printCore: modelData.hotendID
color: modelData && modelData.activeMaterial ? modelData.activeMaterial.color : "#eeeeee" // TODO: Theme!
material: modelData && modelData.activeMaterial ? modelData.activeMaterial.name : ""
position: modelData && modelData.position ? modelData.position : -1 // Use negative one to create empty extruder number
printCore: modelData ? modelData.hotendID : ""
// Keep things responsive!
width: Math.floor((base.width - (configurations.length - 1) * extruderConfigurationRow.spacing) / configurations.length)
@ -53,6 +53,6 @@ Item
{
id: buildplateConfig
anchors.bottom: parent.bottom
buildplate: "Glass" // 'Glass' as a default
buildplate: null
}
}