RFR: 8365625: Can't change accelerator colors in Windows L&F [v2]
Alexey Ivanov
aivanov at openjdk.org
Tue Sep 16 15:33:09 UTC 2025
On Tue, 19 Aug 2025 03:10:13 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
>> Alexey Ivanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>>
>> - 8365625: Can't change accelerator colors in Windows L&F
>> - 8365389
>> - 8365389
>
> test/jdk/com/sun/java/swing/plaf/windows/MenuItem/MenuItemAcceleratorColor.java line 126:
>
>> 124: Color acceleratorSelectionForeground = UIManager.getColor("MenuItem.acceleratorSelectionForeground");
>> 125: UIManager.put("MenuItem.acceleratorForeground", Color.GREEN);
>> 126: UIManager.put("MenuItem.acceleratorSelectionForeground", Color.RED);
>
> We are testing 2 of 3 static fields..I guess since we do not have test for these fields explicitly, we can test the 3rd one too which is `disabledForeground`
>
> like putting `UIManager.put("MenuItem.disabledForeground", Color.BLUE) `
> and do `quit.setEnabled(false)` in which case it should be BLUE
I added a set of three disabled menu items.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26826#discussion_r2352890922
More information about the client-libs-dev
mailing list