summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/effects/ColouredIcon.qml13
1 files changed, 9 insertions, 4 deletions
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
}
}