mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-28 07:03:18 +08:00
Fix extruder icon text scaling. I've added a new font size here since there is not any real way I can see to scale the font based on the component size. This is because we do some magic with the font numbers before passing them to the QML.
CURA-9793
This commit is contained in:
parent
93d1f05aec
commit
bec02cf312
@ -12,12 +12,14 @@ UM.ToolbarButton
|
|||||||
id: base
|
id: base
|
||||||
|
|
||||||
property var extruder
|
property var extruder
|
||||||
|
property var extrdurerNumberFont: UM.Theme.getFont("small_emphasis")
|
||||||
|
|
||||||
toolItem: ExtruderIcon
|
toolItem: ExtruderIcon
|
||||||
{
|
{
|
||||||
materialColor: extruder.color
|
materialColor: extruder.color
|
||||||
extruderEnabled: extruder.stack.isEnabled
|
extruderEnabled: extruder.stack.isEnabled
|
||||||
iconVariant: "default"
|
iconVariant: "default"
|
||||||
|
font: extruderNumberFont
|
||||||
property int index: extruder.index
|
property int index: extruder.index
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ Item
|
|||||||
property bool extruderEnabled: true
|
property bool extruderEnabled: true
|
||||||
property var iconSize: UM.Theme.getSize("extruder_icon").width
|
property var iconSize: UM.Theme.getSize("extruder_icon").width
|
||||||
property string iconVariant: "medium"
|
property string iconVariant: "medium"
|
||||||
|
property alias font: extruderNumberText.font
|
||||||
|
|
||||||
implicitWidth: iconSize
|
implicitWidth: iconSize
|
||||||
implicitHeight: iconSize
|
implicitHeight: iconSize
|
||||||
|
@ -142,6 +142,7 @@ Item
|
|||||||
text: catalog.i18ncp("@label %1 is filled in with the name of an extruder", "Print Selected Model with %1", "Print Selected Models with %1", UM.Selection.selectionCount).arg(extruder.name)
|
text: catalog.i18ncp("@label %1 is filled in with the name of an extruder", "Print Selected Model with %1", "Print Selected Models with %1", UM.Selection.selectionCount).arg(extruder.name)
|
||||||
checked: Cura.ExtruderManager.selectedObjectExtruders.indexOf(extruder.id) != -1
|
checked: Cura.ExtruderManager.selectedObjectExtruders.indexOf(extruder.id) != -1
|
||||||
enabled: UM.Selection.hasSelection && extruder.stack.isEnabled
|
enabled: UM.Selection.hasSelection && extruder.stack.isEnabled
|
||||||
|
font: UM.Theme.getFont("small_emphasis")
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
@ -61,6 +61,7 @@ Row
|
|||||||
extruder: model
|
extruder: model
|
||||||
checked: extruder.index == selectedIndex
|
checked: extruder.index == selectedIndex
|
||||||
iconScale: 0.8
|
iconScale: 0.8
|
||||||
|
font: UM.Theme.getFont("tiny_emphasis")
|
||||||
buttonSize: UM.Theme.getSize("small_button").width
|
buttonSize: UM.Theme.getSize("small_button").width
|
||||||
onClicked: extruder.enabled && onClickExtruder(extruder.index)
|
onClicked: extruder.enabled && onClickExtruder(extruder.index)
|
||||||
}
|
}
|
||||||
|
@ -172,6 +172,26 @@
|
|||||||
"size": 0.9,
|
"size": 0.9,
|
||||||
"weight": 700,
|
"weight": 700,
|
||||||
"family": "Noto Sans"
|
"family": "Noto Sans"
|
||||||
|
},
|
||||||
|
"tiny_emphasis": {
|
||||||
|
"size": 0.7,
|
||||||
|
"weight": 700,
|
||||||
|
"family": "Noto Sans"
|
||||||
|
},
|
||||||
|
"tiny_emphasis_ja_JP": {
|
||||||
|
"size": 0.7,
|
||||||
|
"weight": 700,
|
||||||
|
"family": "Noto Sans"
|
||||||
|
},
|
||||||
|
"tiny_emphasis_zh_CN": {
|
||||||
|
"size": 0.7,
|
||||||
|
"weight": 700,
|
||||||
|
"family": "Noto Sans"
|
||||||
|
},
|
||||||
|
"tiny_emphasis_zh_TW": {
|
||||||
|
"size": 0.7,
|
||||||
|
"weight": 700,
|
||||||
|
"family": "Noto Sans"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user