From 1e15197d44ef71d8a23a26ee6c6922e5f9a8f089 Mon Sep 17 00:00:00 2001 From: casper Date: Tue, 22 Mar 2022 12:00:56 +0100 Subject: [PATCH] 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 --- resources/qml/Preferences/Materials/MaterialsSlot.qml | 2 ++ 1 file changed, 2 insertions(+) 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