mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 12:15:53 +08:00
Center extruder icon in recommended settings
CURA-9793
This commit is contained in:
parent
564fefa1c7
commit
83603ec8fa
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2021 Ultimaker B.V.
|
// Copyright (c) 2022 UltiMaker
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.11
|
import QtQuick 2.11
|
||||||
@ -12,7 +12,7 @@ Item
|
|||||||
property color materialColor
|
property color materialColor
|
||||||
property alias textColor: extruderNumberText.color
|
property alias textColor: extruderNumberText.color
|
||||||
property bool extruderEnabled: true
|
property bool extruderEnabled: true
|
||||||
property var iconSize: UM.Theme.getSize("extruder_icon").width
|
property int iconSize: UM.Theme.getSize("extruder_icon").width
|
||||||
property string iconVariant: "medium"
|
property string iconVariant: "medium"
|
||||||
property alias font: extruderNumberText.font
|
property alias font: extruderNumberText.font
|
||||||
|
|
||||||
@ -36,7 +36,6 @@ Item
|
|||||||
}
|
}
|
||||||
UM.ColorImage
|
UM.ColorImage
|
||||||
{
|
{
|
||||||
id: mainIcon
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
width: iconSize
|
width: iconSize
|
||||||
height: iconSize
|
height: iconSize
|
||||||
@ -48,12 +47,14 @@ Item
|
|||||||
UM.Label
|
UM.Label
|
||||||
{
|
{
|
||||||
id: extruderNumberText
|
id: extruderNumberText
|
||||||
anchors.centerIn: parent
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
text: index + 1
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: (index + 1).toString()
|
||||||
font: UM.Theme.getFont("small_emphasis")
|
font: UM.Theme.getFont("small_emphasis")
|
||||||
width: contentWidth
|
width: contentWidth
|
||||||
height: contentHeight
|
height: contentHeight
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user