mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 03:09:04 +08:00
Show active material in italics
behaviour is not perfect; only one (of the possible multiple if you have multiple materials) active material is shown in italics. However, this behavior is similar as the behavior in cura v4.13 see https://github.com/Ultimaker/Cura/pull/11668/files#diff-ba2e4797d4d21e847be25e2c272d6a7a45e3bab97def420bed7643d762be8cfaL54 CURA-9044
This commit is contained in:
parent
d7cf7ee97d
commit
1e15197d44
@ -16,6 +16,7 @@ Rectangle
|
|||||||
|
|
||||||
property var material: null
|
property var material: null
|
||||||
property bool hovered: false
|
property bool hovered: false
|
||||||
|
property bool isActive: material !== null && Cura.MachineManager.currentRootMaterialId[Cura.ExtruderManager.activeExtruderIndex] == material.root_material_id
|
||||||
|
|
||||||
height: UM.Theme.getSize("preferences_page_list_item").height
|
height: UM.Theme.getSize("preferences_page_list_item").height
|
||||||
width: parent.width
|
width: parent.width
|
||||||
@ -52,6 +53,7 @@ Rectangle
|
|||||||
{
|
{
|
||||||
id: materialLabel
|
id: materialLabel
|
||||||
text: material != null ? `${material.brand} ${material.name}` : ""
|
text: material != null ? `${material.brand} ${material.name}` : ""
|
||||||
|
font: isActive ? UM.Theme.getFont("default_italic") : UM.Theme.getFont("default")
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
wrapMode: Text.NoWrap
|
wrapMode: Text.NoWrap
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user