mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-03 07:41:18 -07:00
Added status icon
This commit is contained in:
parent
4c7ec3920d
commit
ffccdd99c0
4 changed files with 26 additions and 10 deletions
|
|
@ -11,7 +11,8 @@ import Cura 1.0 as Cura
|
|||
import "Menus"
|
||||
|
||||
ToolButton {
|
||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||
property var isNetworkPrinter: Cura.MachineManager.activeMachineNetworkKey ? true : false
|
||||
property var printerStatus: Cura.MachineManager.printerOutputDevices.length != 0 ? "connected" : "unknown"
|
||||
text: Cura.MachineManager.activeMachineName
|
||||
|
||||
tooltip: Cura.MachineManager.activeMachineName
|
||||
|
|
@ -45,7 +46,8 @@ ToolButton {
|
|||
}
|
||||
|
||||
PrinterStatusIcon {
|
||||
visible: printerConnected
|
||||
visible: isNetworkPrinter
|
||||
status: printerStatus
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
left: parent.left
|
||||
|
|
@ -59,7 +61,7 @@ ToolButton {
|
|||
text: control.text;
|
||||
elide: Text.ElideRight;
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: printerConnected ? UM.Theme.getSize("default_margin").width * 3 : UM.Theme.getSize("default_margin").width * 2
|
||||
anchors.leftMargin: isNetworkPrinter ? UM.Theme.getSize("default_margin").width * 3 : UM.Theme.getSize("default_margin").width * 2
|
||||
anchors.right: downArrow.left;
|
||||
anchors.rightMargin: control.rightMargin;
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue