From 359787835d50fd27359b57011e8765599c6ff043 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Tue, 25 May 2021 12:40:52 +0200 Subject: [PATCH] fix(Core): disable StatusIcon ColorOverlay if no color is supplied This is needed to have the underlying SVG's color bleed through and make use of the image's opacity at the same time. Using `ColorOverlay` together with (half) transparent colors doesn't work very well as it makes the underlying SVG color come through, result in wrong colors. Applying `opacity` on the image itself cause the `ColorOverlay` to reduce in opacity as well. So in order to work with transparent colors, we need a way to turn of the ColorOverlay and work with the Image's opacity, which is what this change enables. --- ui/StatusQ/src/StatusQ/Core/StatusIcon.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Core/StatusIcon.qml b/ui/StatusQ/src/StatusQ/Core/StatusIcon.qml index 6e3100b122..e0eb89da9f 100644 --- a/ui/StatusQ/src/StatusQ/Core/StatusIcon.qml +++ b/ui/StatusQ/src/StatusQ/Core/StatusIcon.qml @@ -3,7 +3,7 @@ import QtGraphicalEffects 1.13 Image { property string icon: "" - property color color + property color color: "transparent" id: statusIcon width: 24 @@ -19,7 +19,7 @@ Image { } ColorOverlay { - visible: statusIcon.color !== undefined + visible: !Qt.colorEqual(statusIcon.color, "transparent") anchors.fill: statusIcon source: statusIcon color: statusIcon.color