diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-12 18:15:32 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-12 18:15:32 +0800 |
| commit | 299bf0bae8be6ab505f97d6aba4f82e4e6f96f62 (patch) | |
| tree | e1a72a68b5c2fae7fab097a80462233878a3231c /utils/Icons.qml | |
| parent | ce5f49a9324bceccab821c1d2ebf3f72bdfc09ea (diff) | |
lot of minor improvement added utils and working networkusage
Diffstat (limited to 'utils/Icons.qml')
| -rw-r--r-- | utils/Icons.qml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/utils/Icons.qml b/utils/Icons.qml new file mode 100644 index 0000000..4b3915c --- /dev/null +++ b/utils/Icons.qml @@ -0,0 +1,34 @@ +import QtQuick +import QtQuick.Layouts + +import qs.config + +Text { + 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 + font { + hintingPreference: Font.PreferFullHinting + 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 + // color: Style.m3colors.m3onBackground + + // Behavior on fill { + // NumberAnimation { + // duration: Appearance?.animation.elementMoveFast.duration ?? 200 + // easing.type: Appearance?.animation.elementMoveFast.type ?? Easing.BezierSpline + // easing.bezierCurve: Appearance?.animation.elementMoveFast.bezierCurve ?? [0.34, 0.80, 0.34, 1.00, 1, 1] + // } + // } +} |
