[bug] Colour properties with alpha don't work on Windows
-
I noticed this bug a while ago but couldn't really pin it down, but now I can.
In a paint routine if you read a colour property from a panel,
bgColour
for example, withinColours.withAlpha()
, the colour will be drawn as white.This only affects Windows.
HiseSnippet 829.3ocsUssaSCDDccRLpIPk.I9.rxSNRkHmRuPUEhzbChnWhZJU7V010ahWU6csrW2PDpeJHwmBeR7G.y5MI1ARqPQT+PTlKmcOdlyLdPjfPiiEQHixWLMjhLdl4voboWaOLii52Q4fH7EIQWPiknVSCwwwTWjgQw2qxvnbIT5yOeWKrOlSnYtPnKELB8XV.Sl4cPyOx786gcoWvBxk8NM6SD71o2ExnnoCJDStAOldJVkVASjwS55xjhngRrjFiLJ0R3NcnmXBWm+krX109TkQCzP3fzt6I7cULV4E01i46NX9acLBNkAY0fh5ZvKMOg4xV3OqV77z.VYHxWOLJrL8JtD8ZjmdN4n2JnjQNJURSoWXNjDwBkYQT74ol84RZzHLT1ySEctnBeyvrs.xfKqGfug1KBLVfvdOGmsrfepcXkJPoOVZcKNxZ.lS8aX8Vq4HGSksEAgBNXXWUGtpBi9u0ioxAPARdtHQx3T6QIbhjI31iqU4qkqTdb8QPC+HeeacyMt93H5T3.RiEqNck6EQmvjdG4G5gskdrX00aW85w5nUqskkS8cqoPqO2yoD4hDOVPv9sDIb2X6ccTYcWsCmyGKA+TgjdF2F3Eb42Uw5OCMZzJiopDQBeeZzJCqzwQODPadRv0znsf5qeBcQhPycYEi48qXxKnI5FStDE79bl7rPJ+9j4nYcS3eepeGrDqjYy7A4ERijLEEL5PuElY0htxlcnw2HEgo4NSB.tkoQ2btjTICPLP3sgoVRf9R1X8GZNMynSyILWo2BG+XRSOJarW15guKaNuWqV8ry1GryANM1eOGDSRCxucHyd6YCR+8TCLuJbS7wxkGhUatlE.5SKM4nlN3wL4z7a19uMY+uRwWXNfIIdqliEVAGgt4iAGmsObSytiFAyYYDrjYuO+3r7CoWiL9DrLhA5HySSBFBMYBEtcNntTyIFETJZssixVUAFR4toF+BdlErgx1XVvFyChBvjHwUD8zoZi6Fod.NwS+XSYyST1VMPoSr.NSm5Nn.X4+UDh50+UvP1pwr8Zf40qAlcVCL6tFX1aMvr+Zf4MOHF02cOJQJBziCfiAcSWiYXzkiAkUpJD8ayZ5X0B
-
If I set the colour via scripting in on init -
Panel1.set("bgColour", Colours.red);
Then it works... so it's like there is a problem reading from the UI xml or something on Windows. -
This happening for anyone else?
-
@d-healey just trying the snippet. I've changed the panel's bg colour to yellow, hit compile and it's yellow.
-
@DanH Now save that change in the xml (not .hip), close HISE and reload it. It should now be white.
And my snippet showed as white, right?
-
@d-healey yup
-
Bump bump
-
@d-healey It appears that saving and loading as XML loses the type information so it tries to render the value as string and fails so it defaults to 0.
I've added some logic to handle that case but it wasn't used in all those
Colour.withXXX()
methods (if you pass it intog.setColour()
it should work correctly.Anyway, it's fixed now.
-
@Christoph-Hart Thank you :)