mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 16:25:55 +08:00
Use ExtruderIcon component to display extruder icon
Since we already have that component pre-designed, let's use it. Contributes to issue CURA-5876.
This commit is contained in:
parent
c489f911fb
commit
e05566865a
@ -5,7 +5,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
@ -33,37 +33,13 @@ Column
|
|||||||
color: mainColor
|
color: mainColor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rounded item to show the extruder number
|
Cura.ExtruderIcon
|
||||||
Item
|
|
||||||
{
|
{
|
||||||
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
|
width: UM.Theme.getSize("section_icon").width
|
||||||
height: UM.Theme.getSize("section_icon").height
|
height: UM.Theme.getSize("section_icon").height
|
||||||
|
materialColor: mainColor
|
||||||
UM.RecolorImage {
|
anchors.left: extruderLabel.right
|
||||||
id: mainCircle
|
anchors.leftMargin: UM.Theme.getSize("narrow_margin").width
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user