Fix size of the extruder icon

Now it should look the same in all places.
This commit is contained in:
Diego Prado Gesto 2018-11-27 14:49:01 +01:00
parent e863c34f68
commit 077b34b433
3 changed files with 10 additions and 8 deletions

View File

@ -19,12 +19,16 @@ Button
enabled: UM.Selection.hasSelection && extruder.stack.isEnabled
background: Item {}
contentItem: ExtruderIcon
contentItem: Item
{
width: UM.Theme.getSize("button_icon").width
materialColor: model.color
extruderEnabled: extruder.stack.isEnabled
property int index: extruder.index
// For some reason if the extruder icon is not enclosed to the item, the size changes to fill the size of the button
ExtruderIcon
{
anchors.centerIn: parent
materialColor: model.color
extruderEnabled: extruder.stack.isEnabled
property int index: extruder.index
}
}
onClicked:

View File

@ -51,8 +51,6 @@ Item
anchors.centerIn: parent
text: index + 1
font: UM.Theme.getFont("extruder_icon")
width: contentWidth
height: contentHeight
visible: extruderEnabled
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignHCenter

View File

@ -402,7 +402,7 @@
"thin_margin": [0.71, 0.71],
"narrow_margin": [0.5, 0.5],
"extruder_icon": [1.8, 1.8],
"extruder_icon": [2.33, 2.33],
"section": [0.0, 2.2],
"section_icon": [1.6, 1.6],