RFR: 8348760: RadioButton is not shown if JRadioButtonMenuItem is rendered with ImageIcon in WindowsLookAndFeel [v9]
Alexey Ivanov
aivanov at openjdk.org
Fri Feb 7 11:16:16 UTC 2025
On Fri, 7 Feb 2025 03:10:03 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> I am not sure if we can satisfy both windows 10 and windows 11 simultaneously as both design is different for this logic...
We absolutely can… I'm not proposing using different rendering, instead I'm for following Windows 11 rendering, but it requires updating menu layout code.
> Without the fix, it looks good as Windows 10 as it doesn't support separate bullet/checkmark skin whereas windows 11 does...
I'm unsure Windows 11 does support it natively, likely File Explorer implements custom drawing code.
I'm pretty sure the situation is the same with Windows 10, yet none of use was able to find an app which displays both icons and bullets/check-marks.
The commonly available feature in Windows is to display an icon, which you can see in window menu activated by <kbd>Alt</kbd>+<kbd>Space</kbd> or right-clicking the window title bar: Restore, Minimise, Maximise, and Close items display an icon — this icon is rendered centred exactly at the position where radio bullet or check mark are.
I may be able to play around in a Win32 app with it.
> Also, its difficult to test for me as I do not have windows 10 so any change for windows 11 whether it works for windows10 is difficult to make out, also considering the fact mainline jdk is not supporting windows10 so not sure why we should introduce additional logic to satisfy windows10
My point here is that the current approach doesn't look similar to how File Explorer renders menu with bullets and icons. If you do it, this style would work just fine for Windows 10 too: the bullet will have its own place, the icon will have its own place.
Even though Windows 10 is not going to be supported by JDK 25, it doesn't make sense to break anything that works there. After all, we had to restore theming support for Windows 7 support for which ended long-long time ago.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23324#issuecomment-2642621656
More information about the client-libs-dev
mailing list