mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
OutputDevice header now shows name of active printer
CL-541
This commit is contained in:
parent
6cf6d51fea
commit
b6ebb804ba
1 changed files with 3 additions and 2 deletions
|
|
@ -13,11 +13,12 @@ Item
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
implicitHeight: Math.floor(childrenRect.height + UM.Theme.getSize("default_margin").height * 2)
|
implicitHeight: Math.floor(childrenRect.height + UM.Theme.getSize("default_margin").height * 2)
|
||||||
property var outputDevice: null
|
property var outputDevice: null
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: UM.Theme.getColor("setting_category")
|
color: UM.Theme.getColor("setting_category")
|
||||||
|
property var activePrinter: outputDevice != null ? outputDevice.activePrinter : null
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: outputDeviceNameLabel
|
id: outputDeviceNameLabel
|
||||||
|
|
@ -26,7 +27,7 @@ Item
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
text: outputDevice != null ? outputDevice.name : catalog.i18nc("@info:status", "No printer connected")
|
text: outputDevice != null ? activePrinter.name : ""
|
||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue