mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 13:49:39 +08:00
Add label for printer connection text to header
Also fixed the indenting of the previous two labels to use spaces instead of tabs. I knew I was going to forget putting it back to spaces after working on a different project that uses tabs. The information is duplicated now. I'll remove the old one promptly. Contributes to issue CURA-3161.
This commit is contained in:
parent
1f0bcc1abd
commit
c7a91f07d2
@ -24,36 +24,48 @@ Column
|
|||||||
{
|
{
|
||||||
id: connectedPrinterHeader
|
id: connectedPrinterHeader
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: UM.Theme.getSize("sidebar_header").height
|
height: childrenRect.height + UM.Theme.getSize("default_margin").height * 2
|
||||||
color: UM.Theme.getColor("setting_category")
|
color: UM.Theme.getColor("setting_category")
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: connectedPrinterNameLabel
|
id: connectedPrinterNameLabel
|
||||||
text: printerConnected ? connectedPrinter.name : catalog.i18nc("@info:status", "No printer connected")
|
text: printerConnected ? connectedPrinter.name : catalog.i18nc("@info:status", "No printer connected")
|
||||||
font: UM.Theme.getFont("large")
|
font: UM.Theme.getFont("large")
|
||||||
color: UM.Theme.getColor("text")
|
color: UM.Theme.getColor("text")
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: connectedPrinterAddressLabel
|
id: connectedPrinterAddressLabel
|
||||||
text: printerConnected ? connectedPrinter.address : ""
|
text: printerConnected ? connectedPrinter.address : ""
|
||||||
font: UM.Theme.getFont("small")
|
font: UM.Theme.getFont("small")
|
||||||
color: UM.Theme.getColor("text_inactive")
|
color: UM.Theme.getColor("text_inactive")
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
horizontalAlignment: Text.AlignRight
|
horizontalAlignment: Text.AlignRight
|
||||||
}
|
}
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: printerConnected ? connectedPrinter.connectionText : catalog.i18nc("@info:status", "The printer is not connected.")
|
||||||
|
color: printerConnected && printerAcceptsCommands ? UM.Theme.getColor("setting_control_text") : UM.Theme.getColor("setting_control_disabled_text")
|
||||||
|
font: UM.Theme.getFont("default")
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||||
|
anchors.top: connectedPrinterNameLabel.bottom
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user