mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
parent
4bffa6d90f
commit
a1c252d3a2
73 changed files with 3047 additions and 1216 deletions
|
@ -5,87 +5,50 @@ import QtQuick 2.7
|
|||
import QtQuick.Controls 2.0
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
|
||||
Column
|
||||
Row
|
||||
{
|
||||
id: extruderInfo
|
||||
property var printCoreConfiguration
|
||||
property var mainColor: "black"
|
||||
spacing: Math.round(UM.Theme.getSize("default_margin").height / 2)
|
||||
|
||||
height: childrenRect.height
|
||||
height: information.height
|
||||
spacing: UM.Theme.getSize("default_margin").width
|
||||
|
||||
Item
|
||||
//Extruder icon.
|
||||
Cura.ExtruderIcon
|
||||
{
|
||||
id: extruder
|
||||
width: parent.width
|
||||
height: childrenRect.height
|
||||
materialColor: printCoreConfiguration.material.color
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
extruderEnabled: printCoreConfiguration.material.name !== "" && printCoreConfiguration.hotendID !== ""
|
||||
}
|
||||
|
||||
Column
|
||||
{
|
||||
id: information
|
||||
Label
|
||||
{
|
||||
id: extruderLabel
|
||||
text: catalog.i18nc("@label:extruder label", "Extruder")
|
||||
text: printCoreConfiguration.material.brand ? printCoreConfiguration.material.brand : " " //Use space so that the height is still correct.
|
||||
renderType: Text.NativeRendering
|
||||
elide: Text.ElideRight
|
||||
anchors.left: parent.left
|
||||
font: UM.Theme.getFont("default")
|
||||
color: mainColor
|
||||
color: UM.Theme.getColor("text_inactive")
|
||||
}
|
||||
|
||||
// Rounded item to show the extruder number
|
||||
Item
|
||||
Label
|
||||
{
|
||||
id: extruderIconItem
|
||||
anchors.verticalCenter: extruderLabel.verticalCenter
|
||||
anchors.left: extruderLabel.right
|
||||
anchors.leftMargin: Math.round(UM.Theme.getSize("default_margin").width / 2)
|
||||
|
||||
width: UM.Theme.getSize("section_icon").width
|
||||
height: UM.Theme.getSize("section_icon").height
|
||||
|
||||
UM.RecolorImage {
|
||||
id: mainCircle
|
||||
anchors.fill: parent
|
||||
|
||||
anchors.centerIn: parent
|
||||
sourceSize.width: parent.width
|
||||
sourceSize.height: parent.height
|
||||
source: UM.Theme.getIcon("extruder_button")
|
||||
color: mainColor
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: extruderNumberText
|
||||
anchors.centerIn: parent
|
||||
text: printCoreConfiguration.position + 1
|
||||
renderType: Text.NativeRendering
|
||||
font: UM.Theme.getFont("default")
|
||||
color: mainColor
|
||||
}
|
||||
text: printCoreConfiguration.material.name ? printCoreConfiguration.material.name : " " //Use space so that the height is still correct.
|
||||
renderType: Text.NativeRendering
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text")
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: printCoreConfiguration.hotendID ? printCoreConfiguration.hotendID : " " //Use space so that the height is still correct.
|
||||
renderType: Text.NativeRendering
|
||||
elide: Text.ElideRight
|
||||
font: UM.Theme.getFont("default")
|
||||
color: UM.Theme.getColor("text_inactive")
|
||||
}
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: materialLabel
|
||||
text: printCoreConfiguration.material == null ? "" : printCoreConfiguration.material.name
|
||||
renderType: Text.NativeRendering
|
||||
elide: Text.ElideRight
|
||||
width: parent.width
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
color: mainColor
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: printCoreTypeLabel
|
||||
text: printCoreConfiguration.hotendID
|
||||
renderType: Text.NativeRendering
|
||||
elide: Text.ElideRight
|
||||
width: parent.width
|
||||
font: UM.Theme.getFont("default")
|
||||
color: mainColor
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue