Merge branch 'CURA-7480_Remove_flicabkle_config_panel'

This commit is contained in:
Ghostkeeper 2020-06-08 14:26:21 +02:00
commit d9c768e0d3
No known key found for this signature in database
GPG Key ID: D2A8871EE34EC59A

View File

@ -4,6 +4,7 @@
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Controls.Styles 1.4 import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.3
import UM 1.2 as UM import UM 1.2 as UM
import Cura 1.0 as Cura import Cura 1.0 as Cura
@ -37,70 +38,68 @@ Cura.ExpandablePopup
headerItem: Item headerItem: Item
{ {
// Horizontal list that shows the extruders and their materials // Horizontal list that shows the extruders and their materials
ListView RowLayout
{ {
id: extrudersList
orientation: ListView.Horizontal
anchors.fill: parent anchors.fill: parent
model: extrudersModel Repeater
visible: Cura.MachineManager.activeMachine.hasMaterials
delegate: Item
{ {
height: parent.height model: extrudersModel
width: Math.round(ListView.view.width / extrudersModel.count) delegate: Item
// Extruder icon. Shows extruder index and has the same color as the active material.
Cura.ExtruderIcon
{ {
id: extruderIcon Layout.fillWidth: true
materialColor: model.color Layout.fillHeight: true
extruderEnabled: model.enabled
height: parent.height
width: height
}
// Label for the brand of the material // Extruder icon. Shows extruder index and has the same color as the active material.
Label Cura.ExtruderIcon
{
id: typeAndBrandNameLabel
text: model.material_brand + " " + model.material
elide: Text.ElideRight
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
anchors
{ {
top: extruderIcon.top id: extruderIcon
left: extruderIcon.right materialColor: model.color
leftMargin: UM.Theme.getSize("default_margin").width extruderEnabled: model.enabled
right: parent.right height: parent.height
rightMargin: UM.Theme.getSize("default_margin").width width: height
} }
}
// Label that shows the name of the variant
Label
{
id: variantLabel
visible: Cura.MachineManager.activeMachine.hasVariants // Label for the brand of the material
Label
text: model.variant
elide: Text.ElideRight
font: UM.Theme.getFont("default_bold")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
anchors
{ {
left: extruderIcon.right id: typeAndBrandNameLabel
leftMargin: UM.Theme.getSize("default_margin").width
top: typeAndBrandNameLabel.bottom text: model.material_brand + " " + model.material
right: parent.right elide: Text.ElideRight
rightMargin: UM.Theme.getSize("default_margin").width font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
anchors
{
top: extruderIcon.top
left: extruderIcon.right
leftMargin: UM.Theme.getSize("default_margin").width
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
}
}
// Label that shows the name of the variant
Label
{
id: variantLabel
visible: Cura.MachineManager.activeMachine.hasVariants
text: model.variant
elide: Text.ElideRight
font: UM.Theme.getFont("default_bold")
color: UM.Theme.getColor("text")
renderType: Text.NativeRendering
anchors
{
left: extruderIcon.right
leftMargin: UM.Theme.getSize("default_margin").width
top: typeAndBrandNameLabel.bottom
right: parent.right
rightMargin: UM.Theme.getSize("default_margin").width
}
} }
} }
} }