diff options
| author | Nippy <nippy@rp1.hu> | 2026-05-09 13:33:09 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-05-09 13:33:09 +0200 |
| commit | a2b924d7e9492b978ad6dc33b6c1ffcb304b4bc5 (patch) | |
| tree | 1a8769217f84bfe9d6216fafaadaf8cdd876d457 /raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Widgets/AppIconRenderer.qml | |
| parent | 34b9c34f982b2596cfa9e368a2d7f74e9a17477c (diff) | |
| download | RaveOS-PKGBUILD-a2b924d7e9492b978ad6dc33b6c1ffcb304b4bc5.tar.gz RaveOS-PKGBUILD-a2b924d7e9492b978ad6dc33b6c1ffcb304b4bc5.zip | |
raveos update
Diffstat (limited to 'raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Widgets/AppIconRenderer.qml')
| -rw-r--r-- | raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Widgets/AppIconRenderer.qml | 130 |
1 files changed, 0 insertions, 130 deletions
diff --git a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Widgets/AppIconRenderer.qml b/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Widgets/AppIconRenderer.qml deleted file mode 100644 index 9cdb71b..0000000 --- a/raveos-hyprland-theme/theme-data/DankMaterialShell/quickshell/Widgets/AppIconRenderer.qml +++ /dev/null @@ -1,130 +0,0 @@ -import QtQuick -import Quickshell -import Quickshell.Widgets -import qs.Common -import qs.Services - -Item { - id: root - - required property string iconValue - required property int iconSize - property string fallbackText: "A" - property color iconColor: Theme.surfaceText - property color colorOverride: "transparent" - property real brightnessOverride: 0.0 - property real contrastOverride: 0.0 - property real saturationOverride: 0.0 - property color fallbackBackgroundColor: Theme.surfaceLight - property color fallbackTextColor: Theme.primary - property real materialIconSizeAdjustment: Theme.spacingM - property real unicodeIconScale: 0.7 - property real fallbackTextScale: 0.4 - property real iconMargins: 0 - property real fallbackLeftMargin: 0 - property real fallbackRightMargin: 0 - property real fallbackTopMargin: 0 - property real fallbackBottomMargin: 0 - - readonly property bool isMaterial: iconValue && iconValue.startsWith("material:") - readonly property bool isUnicode: iconValue && iconValue.startsWith("unicode:") - readonly property bool isSvgCorner: iconValue && iconValue.startsWith("svg+corner:") - readonly property bool isSvg: iconValue && !isSvgCorner && iconValue.startsWith("svg:") - readonly property bool isImage: iconValue && iconValue.startsWith("image:") - readonly property bool hasColorOverride: colorOverride.a > 0 - readonly property string materialName: isMaterial ? iconValue.substring(9) : "" - readonly property string unicodeChar: isUnicode ? iconValue.substring(8) : "" - readonly property string imagePath: isImage ? iconValue.substring(6) : "" - readonly property string svgSource: { - if (isSvgCorner) { - const parts = iconValue.substring(11).split("|"); - return parts[0] || ""; - } - if (isSvg) - return iconValue.substring(4); - return ""; - } - readonly property string svgCornerIcon: isSvgCorner ? (iconValue.substring(11).split("|")[1] || "") : "" - readonly property bool hasSpecialPrefix: isMaterial || isUnicode || isSvg || isSvgCorner || isImage - readonly property string iconPath: { - if (hasSpecialPrefix || !iconValue) - return ""; - return Paths.resolveIconPath(iconValue); - } - - visible: iconValue !== undefined && iconValue !== "" - - DankIcon { - anchors.centerIn: parent - name: root.materialName - size: root.iconSize - root.materialIconSizeAdjustment - color: root.hasColorOverride ? root.colorOverride : root.iconColor - visible: root.isMaterial - } - - StyledText { - anchors.centerIn: parent - text: root.unicodeChar - font.pixelSize: root.iconSize * root.unicodeIconScale - color: root.hasColorOverride ? root.colorOverride : root.iconColor - visible: root.isUnicode - } - - DankSVGIcon { - anchors.centerIn: parent - source: root.svgSource - size: root.iconSize - cornerIcon: root.svgCornerIcon - colorOverride: root.colorOverride - brightnessOverride: root.brightnessOverride - contrastOverride: root.contrastOverride - saturationOverride: root.saturationOverride - visible: root.isSvg || root.isSvgCorner - } - - CachingImage { - id: cachingImg - anchors.fill: parent - imagePath: root.imagePath - maxCacheSize: root.iconSize * 2 - visible: root.isImage && status === Image.Ready - } - - Loader { - id: iconImgLoader - anchors.fill: parent - anchors.margins: root.iconMargins - active: !root.hasSpecialPrefix && root.iconPath !== "" - sourceComponent: IconImage { - anchors.fill: parent - source: root.iconPath - backer.sourceSize: Qt.size(root.iconSize * 2, root.iconSize * 2) - mipmap: true - asynchronous: true - visible: status === Image.Ready - } - } - - Rectangle { - id: fallbackRect - - anchors.fill: parent - anchors.leftMargin: root.fallbackLeftMargin - anchors.rightMargin: root.fallbackRightMargin - anchors.topMargin: root.fallbackTopMargin - anchors.bottomMargin: root.fallbackBottomMargin - visible: !root.hasSpecialPrefix && (root.iconPath === "" || !iconImgLoader.item || iconImgLoader.item.status !== Image.Ready) - color: root.fallbackBackgroundColor - radius: Theme.cornerRadius - border.width: 0 - border.color: Theme.primarySelected - - StyledText { - anchors.centerIn: parent - text: root.fallbackText - font.pixelSize: root.iconSize * root.fallbackTextScale - color: root.fallbackTextColor - font.weight: Font.Bold - } - } -} |