nosignal-shell/components/effects/ColouredIcon.qml
2 * r + 2 * t 258feae3d7 plugin: add getDominantColour
Replaces wack canvas stuff for ColouredIcon
2025-08-27 22:55:17 +10:00

30 lines
590 B
QML

pragma ComponentBehavior: Bound
import Caelestia
import Quickshell.Widgets
import QtQuick
IconImage {
id: root
required property color colour
property color dominantColour
asynchronous: true
layer.enabled: true
layer.effect: Colouriser {
sourceColor: root.dominantColour
colorizationColor: root.colour
}
layer.onEnabledChanged: {
if (layer.enabled)
CUtils.getDominantColour(this);
}
onStatusChanged: {
if (layer.enabled && status === Image.Ready)
CUtils.getDominantColour(this);
}
}