mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Add skeleton loading to printer cards
Contributes to CL-1157
This commit is contained in:
parent
4dbab88792
commit
e81742d296
10 changed files with 192 additions and 84 deletions
|
@ -18,7 +18,7 @@ import UM 1.3 as UM
|
|||
Item
|
||||
{
|
||||
// The buildplate name
|
||||
property alias buildplate: buildplateLabel.text
|
||||
property var buildplate: null
|
||||
|
||||
// Height is one 18px label/icon
|
||||
height: 18 * screenScaleFactor // TODO: Theme!
|
||||
|
@ -34,7 +34,16 @@ Item
|
|||
Item
|
||||
{
|
||||
height: parent.height
|
||||
width: 32 * screenScaleFactor // TODO: Theme! (Should be same as extruder icon width)
|
||||
width: 32 * screenScaleFactor // Ensure the icon is centered under the extruder icon (same width)
|
||||
|
||||
Rectangle
|
||||
{
|
||||
anchors.centerIn: parent
|
||||
height: parent.height
|
||||
width: height
|
||||
color: buildplateIcon.visible > 0 ? "transparent" : "#eeeeee" // TODO: Theme!
|
||||
radius: Math.floor(height / 2)
|
||||
}
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
|
@ -44,6 +53,7 @@ Item
|
|||
height: parent.height
|
||||
source: "../svg/icons/buildplate.svg"
|
||||
width: height
|
||||
visible: buildplate
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +63,8 @@ Item
|
|||
color: "#191919" // TODO: Theme!
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("default") // 12pt, regular
|
||||
text: ""
|
||||
text: buildplate ? buildplate : ""
|
||||
visible: text !== ""
|
||||
|
||||
// FIXED-LINE-HEIGHT:
|
||||
height: 18 * screenScaleFactor // TODO: Theme!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue