steal icon implementation from end4 the goat
This commit is contained in:
parent
7a993c044d
commit
320826cdda
@ -1,17 +1,28 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import qs
|
import qs
|
||||||
import qs.settings
|
|
||||||
|
|
||||||
Text {
|
CustomText {
|
||||||
color: Colors.onSurfaceColor
|
id: root
|
||||||
verticalAlignment: Text.AlignVCenter
|
property real iconSize: 16
|
||||||
horizontalAlignment: Text.AlignHCenter
|
property real fill: 1
|
||||||
font.family: "Material Symbols Rounded"
|
property real truncatedFill: fill.toFixed(1) // Reduce memory consumption spikes from constant font remapping
|
||||||
font.pixelSize: 18
|
renderType: Text.NativeRendering
|
||||||
font.variableAxes: ({
|
font {
|
||||||
FILL: 0,
|
hintingPreference: Font.PreferNoHinting
|
||||||
GRAD: -25,
|
family: "Material Symbols Rounded"
|
||||||
opsz: 36,
|
pixelSize: iconSize
|
||||||
wght: 400
|
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]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user