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.
This commit is contained in:
parent
ee800269fd
commit
72592afffd
|
@ -3,7 +3,7 @@ import QtGraphicalEffects 1.13
|
|||
|
||||
Image {
|
||||
property string icon: ""
|
||||
property color color
|
||||
property string color: ""
|
||||
|
||||
id: statusIcon
|
||||
width: 24
|
||||
|
@ -19,7 +19,7 @@ Image {
|
|||
}
|
||||
|
||||
ColorOverlay {
|
||||
visible: statusIcon.color !== undefined
|
||||
visible: !!statusIcon.color
|
||||
anchors.fill: statusIcon
|
||||
source: statusIcon
|
||||
color: statusIcon.color
|
||||
|
|
Loading…
Reference in New Issue