quickshell/reusables/CustomIcon.qml
2026-02-09 19:24:56 +01:00

29 lines
797 B
QML

import QtQuick
import qs
CustomText {
id: root
property real iconSize: 16
property real fill: 1
property real truncatedFill: fill.toFixed(1) // Reduce memory consumption spikes from constant font remapping
renderType: Text.NativeRendering
font {
hintingPreference: Font.PreferNoHinting
family: "Material Symbols Outlined"
pixelSize: iconSize
weight: Font.Normal + (Font.DemiBold - Font.Normal) * truncatedFill
variableAxes: {
"FILL": truncatedFill,
"opsz": iconSize
}
}
Behavior on fill { // Leaky leaky, no good
NumberAnimation {
duration: 200
easing.type: Easing.BezierSpline
easing.bezierCurve: [0.34, 0.80, 0.34, 1.00, 1, 1]
}
}
}