give CustomIcon colorization

This commit is contained in:
end-4
2025-07-09 09:40:59 +07:00
parent 2d6a897a66
commit b0750506cf
3 changed files with 15 additions and 10 deletions
@@ -1,10 +1,13 @@
import QtQuick
import Quickshell
import Quickshell.Widgets
import Qt5Compat.GraphicalEffects
Item {
id: root
property bool colorize: false
property color color
property string source: ""
property string iconFolder: "root:/assets/icons" // The folder to check first
width: 30
@@ -21,4 +24,13 @@ Item {
}
implicitSize: root.height
}
Loader {
active: root.colorize
anchors.fill: iconImage
sourceComponent: ColorOverlay {
source: iconImage
color: root.color
}
}
}