Add a component to show when no configurations are available because lack of connection.

Contributes to CURA-5876.
This commit is contained in:
Diego Prado Gesto 2018-12-12 17:04:17 +01:00
parent 1d3da3244f
commit 17173aba06
7 changed files with 56 additions and 50 deletions

View file

@ -24,49 +24,24 @@ Cura.ExpandablePopup
name: "cura"
}
headerItem: Item
headerItem: Cura.IconWithText
{
implicitHeight: icon.height
UM.RecolorImage
text: isNetworkPrinter ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName
source:
{
id: icon
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
source:
if (isNetworkPrinter)
{
if (isNetworkPrinter)
if (machineSelector.outputDevice != null && machineSelector.outputDevice.clusterSize > 1)
{
if (machineSelector.outputDevice != null && machineSelector.outputDevice.clusterSize > 1)
{
return UM.Theme.getIcon("printer_group")
}
return UM.Theme.getIcon("printer_single")
return UM.Theme.getIcon("printer_group")
}
return ""
return UM.Theme.getIcon("printer_single")
}
width: UM.Theme.getSize("machine_selector_icon").width
height: width
color: UM.Theme.getColor("machine_selector_printer_icon")
visible: source != ""
}
Label
{
id: label
anchors.left: icon.visible ? icon.right : parent.left
anchors.right: parent.right
anchors.leftMargin: UM.Theme.getSize("thin_margin").width
anchors.verticalCenter: icon.verticalCenter
text: isNetworkPrinter ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName
elide: Text.ElideRight
color: UM.Theme.getColor("text")
font: UM.Theme.getFont("medium")
renderType: Text.NativeRendering
return ""
}
font: UM.Theme.getFont("medium")
iconColor: UM.Theme.getColor("machine_selector_printer_icon")
iconSize: UM.Theme.getSize("machine_selector_icon").width
UM.RecolorImage
{