diff options
author | casper <c.lamboo@ultimaker.com> | 2022-03-22 14:00:56 +0300 |
---|---|---|
committer | casper <c.lamboo@ultimaker.com> | 2022-03-22 14:00:56 +0300 |
commit | 1e15197d44ef71d8a23a26ee6c6922e5f9a8f089 (patch) | |
tree | 2ac18b723d8bf327e07363c3a3df29ebdd77339d | |
parent | d7cf7ee97d3163ed2bf9e0478af22e62398aef1f (diff) |
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
-rw-r--r-- | resources/qml/Preferences/Materials/MaterialsSlot.qml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/resources/qml/Preferences/Materials/MaterialsSlot.qml b/resources/qml/Preferences/Materials/MaterialsSlot.qml index 1c68d074c2..c0f796a265 100644 --- a/resources/qml/Preferences/Materials/MaterialsSlot.qml +++ b/resources/qml/Preferences/Materials/MaterialsSlot.qml @@ -16,6 +16,7 @@ Rectangle property var material: null 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 width: parent.width @@ -52,6 +53,7 @@ Rectangle { id: materialLabel text: material != null ? `${material.brand} ${material.name}` : "" + font: isActive ? UM.Theme.getFont("default_italic") : UM.Theme.getFont("default") elide: Text.ElideRight wrapMode: Text.NoWrap verticalAlignment: Text.AlignVCenter |