RFR: 8343123: Nimbus: javax/swing/JInternalFrame/bug6726866.java does not have green undecorated window [v3]
Prasanta Sadhukhan
psadhukhan at openjdk.org
Sun Nov 17 08:56:53 UTC 2024
On Fri, 15 Nov 2024 12:02:23 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> Test fails in NimbusL&F as DesktopPane does not have green background as set by the user, which is because, the auto-generated [DesktopPanePainter class](https://github.com/openjdk/jdk/blob/eb40a88f4076360708402454a494907e8c0c845d/src/java.desktop/share/classes/javax/swing/plaf/nimbus/SynthPainterImpl.java#L100-L102) which has pre-coded color values does not honour user-defined color.
>>
>> Fix is to make sure user-defined DesktopPane background color is honoured and is painted and only auto-generated class for L&F derived colors.
>> CI is ok..
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> wildcard
If it's L&F set color, which is the case in auto-generated DesktopPainter class, then it will be an instance of UIResource so the fix delegates the painting to that auto-generated class but if background is set by user (as is the case in this testcase) then it will be an instance of Color and not UIResource so we are not delegating to the auto-generated class and do the painting in SynthDesktopPaneUI#update which is called after DesktopPainter class call..
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22057#issuecomment-2481049331
More information about the client-libs-dev
mailing list