Merge branch '4.0' of github.com:Ultimaker/Cura

This commit is contained in:
Jaime van Kessel 2019-01-16 17:39:43 +01:00
commit 24fbb1007d
60 changed files with 2681 additions and 249 deletions

View file

@ -11,9 +11,9 @@ Cura.ExpandablePopup
{
id: machineSelector
property bool isNetworkPrinter: Cura.MachineManager.activeMachineHasRemoteConnection
property bool isPrinterConnected: Cura.MachineManager.printerConnected
property var outputDevice: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
property bool isNetworkPrinter: Cura.MachineManager.activeMachineHasActiveNetworkConnection
property bool isCloudPrinter: Cura.MachineManager.activeMachineHasActiveCloudConnection
property bool isGroup: Cura.MachineManager.activeMachineIsGroup
contentPadding: UM.Theme.getSize("default_lining").width
contentAlignment: Cura.ExpandablePopup.ContentAlignment.AlignLeft
@ -36,15 +36,18 @@ Cura.ExpandablePopup
}
source:
{
if (isNetworkPrinter)
if (isGroup)
{
return UM.Theme.getIcon("printer_group")
}
else if (isNetworkPrinter || isCloudPrinter)
{
if (machineSelector.outputDevice != null && machineSelector.outputDevice.clusterSize > 1)
{
return UM.Theme.getIcon("printer_group")
}
return UM.Theme.getIcon("printer_single")
}
return ""
else
{
return ""
}
}
font: UM.Theme.getFont("medium")
iconColor: UM.Theme.getColor("machine_selector_printer_icon")
@ -59,12 +62,27 @@ Cura.ExpandablePopup
leftMargin: UM.Theme.getSize("thick_margin").width
}
source: UM.Theme.getIcon("printer_connected")
source:
{
if (isNetworkPrinter)
{
return UM.Theme.getIcon("printer_connected")
}
else if (isCloudPrinter)
{
return UM.Theme.getIcon("printer_cloud_connected")
}
else
{
return ""
}
}
width: UM.Theme.getSize("printer_status_icon").width
height: UM.Theme.getSize("printer_status_icon").height
color: UM.Theme.getColor("primary")
visible: isNetworkPrinter && isPrinterConnected
visible: isNetworkPrinter || isCloudPrinter
// Make a themable circle in the background so we can change it in other themes
Rectangle

View file

@ -43,4 +43,4 @@ ListView
return result
}
}
}
}