dots-hyprland/.config/quickshell/modules/common/widgets/CustomIcon.qml
2025-04-14 23:35:40 +02:00

24 lines
596 B
QML

import QtQuick
import Qt.labs.platform
import Quickshell
import Quickshell.Widgets
Item {
id: root
property string source: ""
property string iconFolder: StandardPaths.standardLocations(StandardPaths.ConfigLocation)[0] + "/quickshell/assets/icons" // The folder to check first
width: 30
height: 30
IconImage {
id: iconImage
anchors.fill: parent
source: {
if (iconFolder && iconFolder + "/" + root.source) {
return iconFolder + "/" + root.source
}
return root.source
}
}
}