On Tue, 24 Nov 2020 04:58:37 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> 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.
>
> As far as I understand the only place where we decode `rgb()` is 
> `CSS.stringToColor` and that code missing the `rgba()` case.
> Just to double-check.
> If the test case `TestTranslucentLabelText` will be modified to use `rgb()` 
> instead of `rgba()` then the color which was set by the user to the 
> `Component` will be ignored, and the correct color from the `rgb()` will be 
> used. So it does not matter that `c.getForeground()` contains some opaque 
> color, it is ignored, why the similar case for` rgba()` does not work in the 
> same way?

Yes, seems like overkill last time which is not needed. Reverted back unneeded 
code.

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

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

Reply via email to