diff options
| author | Nippy <nippy@rp1.hu> | 2026-05-08 19:50:49 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-05-08 19:50:49 +0200 |
| commit | 3462bcc46ecf74f576ea4397f16492c16bd75b10 (patch) | |
| tree | c5ab7aef4498647e057bda8d49c11e5f9dda74c9 /raveos-hyprland-theme/theme-data/dms/Widgets/DankIcon.qml | |
| parent | 56616f693b4f263cbf0d47da43b67424efa6022d (diff) | |
| download | RaveOS-PKGBUILD-3462bcc46ecf74f576ea4397f16492c16bd75b10.tar.gz RaveOS-PKGBUILD-3462bcc46ecf74f576ea4397f16492c16bd75b10.zip | |
raveos update
Diffstat (limited to 'raveos-hyprland-theme/theme-data/dms/Widgets/DankIcon.qml')
| -rw-r--r-- | raveos-hyprland-theme/theme-data/dms/Widgets/DankIcon.qml | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/raveos-hyprland-theme/theme-data/dms/Widgets/DankIcon.qml b/raveos-hyprland-theme/theme-data/dms/Widgets/DankIcon.qml new file mode 100644 index 0000000..e80b93a --- /dev/null +++ b/raveos-hyprland-theme/theme-data/dms/Widgets/DankIcon.qml @@ -0,0 +1,77 @@ +import QtQuick +import qs.Common + +Item { + id: root + + property alias name: icon.text + property alias size: icon.font.pixelSize + property alias color: icon.color + property bool filled: false + property real fill: filled ? 1.0 : 0.0 + property int grade: Theme.isLightMode ? 0 : -25 + property int weight: filled ? 500 : 400 + + implicitWidth: Math.round(size) + implicitHeight: Math.round(size) + + signal rotationCompleted + + FontLoader { + id: materialSymbolsFont + source: Qt.resolvedUrl("../assets/fonts/material-design-icons/variablefont/MaterialSymbolsRounded[FILL,GRAD,opsz,wght].ttf") + } + + StyledText { + id: icon + + anchors.fill: parent + + font.family: materialSymbolsFont.name + font.pixelSize: Theme.fontSizeMedium + font.weight: root.weight + color: Theme.surfaceText + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + antialiasing: true + + Behavior on color { + enabled: Theme.currentAnimationSpeed !== SettingsData.AnimationSpeed.None + DankColorAnim { + duration: Theme.shorterDuration + easing.bezierCurve: Theme.expressiveCurves.standard + } + } + font.variableAxes: { + "FILL": root.fill.toFixed(1), + "GRAD": root.grade, + "opsz": 24, + "wght": root.weight + } + + Behavior on font.weight { + NumberAnimation { + duration: Theme.shortDuration + easing.type: Theme.standardEasing + } + } + } + + Behavior on fill { + NumberAnimation { + duration: Theme.shortDuration + easing.type: Theme.standardEasing + } + } + + Timer { + id: rotationTimer + interval: 16 + repeat: false + onTriggered: root.rotationCompleted() + } + + onRotationChanged: { + rotationTimer.restart(); + } +} |