mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Change ExtruderIcon to match the new design
CURA-5785
This commit is contained in:
parent
7a12cc53cc
commit
88234f7e21
3 changed files with 33 additions and 90 deletions
|
@ -13,46 +13,44 @@ Item
|
|||
implicitHeight: implicitWidth
|
||||
|
||||
property bool checked: true
|
||||
property alias material_color: materialColorCircle.color
|
||||
property alias text_color: extruderNumberText.color
|
||||
property alias materialColor: mainIcon.color
|
||||
property alias textColor: extruderNumberText.color
|
||||
|
||||
UM.RecolorImage
|
||||
{
|
||||
id: mainCircle
|
||||
id: mainIcon
|
||||
anchors.fill: parent
|
||||
|
||||
sourceSize.width: parent.width
|
||||
sourceSize.height: parent.width
|
||||
source: UM.Theme.getIcon("extruder_button")
|
||||
color: extruderNumberText.color
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: extruderNumberText
|
||||
anchors.centerIn: parent
|
||||
text: index + 1;
|
||||
font: UM.Theme.getFont("default_bold")
|
||||
}
|
||||
|
||||
// Material colour circle
|
||||
// Only draw the filling colour of the material inside the SVG border.
|
||||
Rectangle
|
||||
{
|
||||
id: materialColorCircle
|
||||
id: extruderNumberCircle
|
||||
|
||||
width: height
|
||||
height: parent.height / 2
|
||||
radius: Math.round(width / 2)
|
||||
color: "white"
|
||||
|
||||
anchors
|
||||
{
|
||||
right: parent.right
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
top: parent.top
|
||||
// The circle needs to be slightly off center (so it sits in the middle of the square bit of the icon)
|
||||
topMargin: (parent.height - height) / 2 - 0.1 * parent.height
|
||||
}
|
||||
|
||||
width: Math.round(parent.width * 0.35)
|
||||
height: Math.round(parent.height * 0.35)
|
||||
radius: Math.round(width / 2)
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: UM.Theme.getColor("extruder_button_material_border")
|
||||
|
||||
opacity: !extruderIconItem.checked ? 0.6 : 1.0
|
||||
Label
|
||||
{
|
||||
id: extruderNumberText
|
||||
anchors.centerIn: parent
|
||||
text: index + 1
|
||||
font: UM.Theme.getFont("default")
|
||||
width: contentWidth
|
||||
height: contentHeight
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue