<Swing Dev> RFR: 8256019: JLabel HTML text does not support translucent text colors [v2]

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Fri Nov 20 03:45:06 UTC 2020


On Wed, 11 Nov 2020 08:03:08 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update spec
>
> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicHTML.java line 76:
> 
>> 74:             }
>> 75:             col = new Color(Integer.parseInt(color[0]), Integer.parseInt(color[1]),
>> 76:                             Integer.parseInt(color[2]), (int)(Float.parseFloat(color[3])*255));
> 
> It seems OceanTheme in Metal L&F supports only rgb
> 
> `ColorUIResource CONTROL_TEXT_COLOR =  new PrintColorUIResource(0x333333, Color.BLACK)`
> 
> so even when Color(r,g,b,a) is used, it creates rgb color and not rgba 
> so alpha is obtained and passed separately.

I have already mentioned it here.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1158


More information about the swing-dev mailing list