blob: 3f708075df9c9f14f7cf6961d1e3cc20e9033ec2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import QtQuick
import QtQuick.Layouts
import qs.config
IText {
id: root
property real iconSize: General.iconSize
property real fill: 0
property real truncatedFill: Math.round(fill * 100) / 100 // Reduce memory consumption spikes from constant font remapping
renderType: Text.NativeRendering
color: Colors.foreground2
font {
// hintingPreference: Font.PreferFullHinting
hintingPreference: Font.PreferNoHinting // so the icons dont just offset away
family: Style.font.family.symbols ?? "Symbols Nerd Font"
pixelSize: iconSize
weight: Font.Normal + (Font.DemiBold - Font.Normal) * fill
variableAxes: {
"FILL": truncatedFill,
// "wght": font.weight,
// "GRAD": 0,
"opsz": iconSize
}
}
verticalAlignment: Text.AlignVCenter
}
|