RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v11]

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue Feb 11 03:03:15 UTC 2025


On Mon, 10 Feb 2025 17:35:45 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Restore Windows 10 behavior
>
> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java line 663:
> 
>> 661:         paintIcon(g, lh, lr, holdc);
>> 662:         if (UIManager.getLookAndFeel().getName().equals("Windows")
>> 663:             && System.getProperty("os.name").equals("Windows 11")
> 
> It's not what I meant.
> 
> I suggested painting the menu items *the same way* for Windows 10 and 11. Yet the layout for Windows 11 should be tweaked.
> 
> To be clear, the bullet / check-mark is painted at the same location where it would be painted if there were no custom icon for both Windows 10 and 11. The custom icon is painted to the right of the bullet / check-mark, and the menu text moves farther to the right.

This will preserve existing windows 10 behavior and at the same time, it will show Windows 11 File explorer behavior.
What is the need to show the same way for WIndows 10 and 11 when it will not be same as what native does for windows 10.

I am sorry but I dont agree to this...

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23324#discussion_r1950174781


More information about the client-libs-dev mailing list