From 2ccd3a8662c46e1be9cfb21a8d60751c98e78065 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 24 Sep 2025 01:37:53 +1000 Subject: plugin: add image analyser --- components/effects/ColouredIcon.qml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'components') diff --git a/components/effects/ColouredIcon.qml b/components/effects/ColouredIcon.qml index b711b88..5ef4d4c 100644 --- a/components/effects/ColouredIcon.qml +++ b/components/effects/ColouredIcon.qml @@ -8,23 +8,28 @@ IconImage { id: root required property color colour - property color dominantColour asynchronous: true layer.enabled: true layer.effect: Colouriser { - sourceColor: root.dominantColour + sourceColor: analyser.dominantColour colorizationColor: root.colour } layer.onEnabledChanged: { if (layer.enabled && status === Image.Ready) - CUtils.getDominantColour(this, c => dominantColour = c); + analyser.requestUpdate(); } onStatusChanged: { if (layer.enabled && status === Image.Ready) - CUtils.getDominantColour(this, c => dominantColour = c); + analyser.requestUpdate(); + } + + ImageAnalyser { + id: analyser + + sourceItem: root } } -- cgit v1.2.3-freya