mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Align extruder labels in monitor page with the extruder icon
CURA-8202
This commit is contained in:
parent
196e5ba397
commit
1f612f3e1a
2 changed files with 7 additions and 24 deletions
|
@ -37,6 +37,7 @@ Item
|
||||||
{
|
{
|
||||||
id: extruderIcon
|
id: extruderIcon
|
||||||
color: UM.Theme.getColor("monitor_skeleton_loading")
|
color: UM.Theme.getColor("monitor_skeleton_loading")
|
||||||
|
size: UM.Theme.getSize("button_icon").width
|
||||||
position: 0
|
position: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,16 +47,18 @@ Item
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
left: extruderIcon.right
|
left: extruderIcon.right
|
||||||
leftMargin: 12 * screenScaleFactor // TODO: Theme!
|
leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
verticalCenter: extruderIcon.verticalCenter
|
||||||
}
|
}
|
||||||
color: materialLabel.visible > 0 ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading")
|
color: materialLabel.visible > 0 ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading")
|
||||||
height: 18 * screenScaleFactor // TODO: Theme!
|
height: childrenRect.height
|
||||||
width: Math.max(materialLabel.contentWidth, 60 * screenScaleFactor) // TODO: Theme!
|
width: Math.max(materialLabel.contentWidth, 60 * screenScaleFactor) // TODO: Theme!
|
||||||
radius: 2 * screenScaleFactor // TODO: Theme!
|
radius: 2 * screenScaleFactor // TODO: Theme!
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: materialLabel
|
id: materialLabel
|
||||||
|
anchors.top: parent.top
|
||||||
|
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
@ -63,29 +66,13 @@ Item
|
||||||
text: ""
|
text: ""
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
|
|
||||||
// FIXED-LINE-HEIGHT:
|
|
||||||
height: parent.height
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle
|
|
||||||
{
|
|
||||||
id: printCoreLabelWrapper
|
|
||||||
anchors
|
|
||||||
{
|
|
||||||
left: materialLabelWrapper.left
|
|
||||||
bottom: parent.bottom
|
|
||||||
}
|
|
||||||
color: printCoreLabel.visible > 0 ? "transparent" : UM.Theme.getColor("monitor_skeleton_loading")
|
|
||||||
height: 18 * screenScaleFactor // TODO: Theme!
|
|
||||||
width: Math.max(printCoreLabel.contentWidth, 36 * screenScaleFactor) // TODO: Theme!
|
|
||||||
radius: 2 * screenScaleFactor // TODO: Theme!
|
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: printCoreLabel
|
id: printCoreLabel
|
||||||
|
anchors.top: materialLabel.bottom
|
||||||
|
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
@ -93,9 +80,6 @@ Item
|
||||||
text: ""
|
text: ""
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
|
|
||||||
// FIXED-LINE-HEIGHT:
|
|
||||||
height: parent.height
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ Item
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: positionLabel
|
id: positionLabel
|
||||||
|
anchors.centerIn: icon
|
||||||
font: UM.Theme.getFont("small")
|
font: UM.Theme.getFont("small")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
height: Math.round(size / 2)
|
height: Math.round(size / 2)
|
||||||
|
@ -45,8 +46,6 @@ Item
|
||||||
text: position + 1
|
text: position + 1
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
width: Math.round(size / 2)
|
width: Math.round(size / 2)
|
||||||
x: Math.round(size * 0.25)
|
|
||||||
y: Math.round(size * 0.15625)
|
|
||||||
visible: position >= 0
|
visible: position >= 0
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue