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

@ -5853,7 +5853,7 @@
"description": "The minimum size of a line segment after slicing. If you increase this, the mesh will have a lower resolution. This may allow the printer to keep up with the speed it has to process g-code and will increase slice speed by removing details of the mesh that it can't process anyway.",
"type": "float",
"unit": "mm",
"default_value": 0.25,
"default_value": 0.20,
"minimum_value": "0.001",
"minimum_value_warning": "0.02",
"maximum_value_warning": "2",

View file

@ -53,7 +53,7 @@ Button
verticalCenter: parent.verticalCenter
}
text: machineSelectorButton.text
color: UM.Theme.getColor("text")
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("small_button_text")
font: UM.Theme.getFont("medium")
visible: text != ""
renderType: Text.NativeRendering

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