Merge branch 'master' into CURA-6435_new_style_add_machine

This commit is contained in:
Remco Burema 2019-04-17 14:00:45 +02:00
commit d72911df84
4 changed files with 52 additions and 6 deletions

View file

@ -68,6 +68,10 @@ Item
anchors.fill: parent
model: CuraApplication.getDiscoveredPrintersModel().discoveredPrinters
section.property: "modelData.sectionName"
section.criteria: ViewSection.FullString
section.delegate: sectionHeading
Component.onCompleted:
{
// Select the first one that's not "unknown" by default.
@ -81,6 +85,23 @@ Item
}
}
Component
{
id: sectionHeading
Label
{
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("setting_control").height
text: section
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("small_button_text")
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
}
delegate: Cura.MachineSelectorButton
{
text: modelData.device.name
@ -88,7 +109,7 @@ Item
width: networkPrinterListView.width
outputDevice: modelData.device
enabled: !modelData.isUnknownMachineType
enabled: !modelData.isUnknownMachineType && modelData.isHostOfGroup
printerTypeLabelAutoFit: true