From ae9a80c1f012686c1f65fce7ce76fdd1b77b0b71 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 23 Sep 2026 21:08:35 +0200 Subject: ... --- .../shell/quickshell/MaterialDesignIcon.qml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 accounts/gkleen@skadhi/shell/quickshell/MaterialDesignIcon.qml (limited to 'accounts/gkleen@skadhi/shell/quickshell/MaterialDesignIcon.qml') diff --git a/accounts/gkleen@skadhi/shell/quickshell/MaterialDesignIcon.qml b/accounts/gkleen@skadhi/shell/quickshell/MaterialDesignIcon.qml new file mode 100644 index 00000000..155a009e --- /dev/null +++ b/accounts/gkleen@skadhi/shell/quickshell/MaterialDesignIcon.qml @@ -0,0 +1,35 @@ +import QtQuick +import QtQuick.Effects + +Item { + id: root + + required property string icon + property color color: "white" + + property real implicitSize: 0 + + readonly property real actualSize: Math.min(root.width, root.height) + + implicitWidth: root.implicitSize + implicitHeight: root.implicitSize + + Image { + id: sourceImage + source: "file://" + @mdi@ + "/svg/" + root.icon + ".svg" + anchors.fill: parent + fillMode: Image.PreserveAspectFit + + sourceSize.width: root.actualSize + sourceSize.height: root.actualSize + + layer.enabled: true + layer.effect: MultiEffect { + id: effect + + brightness: 1 + colorization: 1 + colorizationColor: root.color + } + } +} -- cgit v1.2.3