← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Set color picker color alpha channel to 1


Le 29/09/2017 à 14:08, Seppe Stas a écrit :
> Fixes lp:1718389 <https://bugs.launchpad.net/kicad/+bug/1718389>. The alpha channel of
> |KIGFX::COLOR4D|, which is used to draw the color pickers, initialises to 0. This causes the color
> picker to be invisible on platforms that support alpha channels in a |wxBitmap| (like macOS). This
> patch sets the alpha channel of the color used to draw the color pickers to 1.

Good catch Seppe.

The main bug is in KIGFX::COLOR4D that initialize the opacity to 0.
This is clearly a mistake.
I just committed a fix to set the opacity to 1.0 (a normal value) and therefore fix this issue.

> This patch also simplifies the generation of the color channel bitmaps a bit and fixes weird scaling
> issue of green-blue triangle
> <https://launchpadlibrarian.net/339135271/Screen%20Shot%202017-09-29%20at%2011.54.46.png>
> @Jean-pierre, I’m not sure what the 0.9 factor was for, but removing it looks a lot nicer.
Just to adjust the vertical scale to give a "good" 3D rendering of the 3D RGB space in the 2D draw
The "good" value is a matter of taste.

Jean-Pierre CHARRAS

Follow ups