23 lines
895 B
QML
23 lines
895 B
QML
// MaterialSymbol.qml taken from end-4 https://github.com/end-4/dots-hyprland/blob/main/.config/quickshell/ii/modules/common/widgets/MaterialSymbol.qml
|
|
import qs.common
|
|
import QtQuick
|
|
|
|
Text {
|
|
id: root
|
|
property real iconSize: Appearance?.font.pixelSize.small ?? 16
|
|
property real fill: 0
|
|
property real truncatedFill: Math.round(fill * 100) / 100 // Reduce memory consumption spikes from constant font remapping
|
|
renderType: Text.NativeRendering
|
|
font {
|
|
hintingPreference: Font.PreferFullHinting
|
|
family: Appearance?.font.family.iconMaterial ?? "Material Symbols Rounded"
|
|
pixelSize: iconSize
|
|
weight: Font.Normal + (Font.DemiBold - Font.Normal) * fill
|
|
variableAxes: {
|
|
"FILL": truncatedFill,
|
|
"opsz": iconSize,
|
|
}
|
|
}
|
|
verticalAlignment: Text.AlignVCenter
|
|
color: Appearance.m3colors.m3onBackground
|
|
} |