mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-04 12:33:57 -06:00
Add printer pill type to cluster monitor printer tile
CL-896
This commit is contained in:
parent
8aef7216ec
commit
98d0ad6c27
2 changed files with 40 additions and 2 deletions
|
@ -233,11 +233,21 @@ Component
|
||||||
topMargin: UM.Theme.getSize("default_margin").width
|
topMargin: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
PrinterFamilyPill
|
||||||
|
{
|
||||||
|
id: printerFamilyPill
|
||||||
|
color: UM.Theme.getColor("viewport_background")
|
||||||
|
anchors.top: topSpacer.bottom
|
||||||
|
anchors.topMargin: 2 * UM.Theme.getSize("default_margin").height
|
||||||
|
text: modelData.type
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
padding: 3
|
||||||
|
}
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
id: extrudersInfo
|
id: extrudersInfo
|
||||||
anchors.top: topSpacer.bottom
|
anchors.top: printerFamilyPill.bottom
|
||||||
anchors.topMargin: 2 * UM.Theme.getSize("default_margin").height
|
anchors.topMargin: 2 * UM.Theme.getSize("default_margin").height
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 2 * UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: 2 * UM.Theme.getSize("default_margin").width
|
||||||
|
|
28
plugins/UM3NetworkPrinting/PrinterFamilyPill.qml
Normal file
28
plugins/UM3NetworkPrinting/PrinterFamilyPill.qml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
import QtQuick 2.2
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
import UM 1.2 as UM
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
property alias color: background.color
|
||||||
|
property alias text: familyNameLabel.text
|
||||||
|
property var padding: 0
|
||||||
|
implicitHeight: familyNameLabel.contentHeight + 2 * padding // Apply the padding to top and bottom.
|
||||||
|
implicitWidth: familyNameLabel.contentWidth + implicitHeight // The extra height is added to ensure the radius doesn't cut something off.
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
id: background
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width
|
||||||
|
color: parent.color
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
radius: 0.5 * height
|
||||||
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
id: familyNameLabel
|
||||||
|
anchors.centerIn: parent
|
||||||
|
text: ""
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue