<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:04 UTC 2020


On Thu, 19 Nov 2020 19:16:31 GMT, Sergey Bylokhov <serb 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 64:
> 
>> 62:     public static View createHTMLView(JComponent c, String html) {
>> 63:         BasicEditorKit kit = getFactory();
>> 64:         int beginIndex = html.indexOf("rgba(");
> 
> Don't we need to implement this parsing similarly to rgb()? somewhere inside kit.createDefaultDocument() or where we parse rgb()?

The problem is the alpha color not being present in c.getForeground() so we need to parse alpha here to pass the value to displayPropertiesToCSS(). I have already mentioned it below.

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

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


More information about the swing-dev mailing list