From bec98e1fc5a25e68e3cc7bf7585c092a82a40633 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 27 Aug 2025 23:29:11 +1000 Subject: plugin: better getDominantColour Use callback instead of setting prop --- components/effects/ColouredIcon.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/effects/ColouredIcon.qml b/components/effects/ColouredIcon.qml index a858c25..b711b88 100644 --- a/components/effects/ColouredIcon.qml +++ b/components/effects/ColouredIcon.qml @@ -19,12 +19,12 @@ IconImage { } layer.onEnabledChanged: { - if (layer.enabled) - CUtils.getDominantColour(this); + if (layer.enabled && status === Image.Ready) + CUtils.getDominantColour(this, c => dominantColour = c); } onStatusChanged: { if (layer.enabled && status === Image.Ready) - CUtils.getDominantColour(this); + CUtils.getDominantColour(this, c => dominantColour = c); } } -- cgit v1.2.3-freya