On Tue, 4 Feb 2025 14:16:16 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> When JRadioButtonMenuItem is called with imageIcon, then only imageIcon is 
>> shown without radiobutton in WIndowsLookAndFeel as there was no provision of 
>> drawing the radiobutton alongside icon.
>> If icon is not there, the radiobutton is drawn. Added provision of drawing 
>> the radiobutton windows Skin even when imageIcon is present.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   retain diff of OFFSET between skin background start coord and skin 
> coordinate

> I tested it on Windows 11 and 10.
> 
> **Windows 11** 
> ![Windows-11-menu-items-2025-02-06](https://private-user-images.githubusercontent.com/70774172/410576669-e368f0ce-3c0f-45d6-a485-3c5331471204.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTc0MzIsIm5iZiI6MTczODg5NzEzMiwicGF0aCI6Ii83MDc3NDE3Mi80MTA1NzY2NjktZTM2OGYwY2UtM2MwZi00NWQ2LWE0ODUtM2M1MzMxNDcxMjA0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDAyNTg1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE2NTY2YmRmZDliMmU5ODcyNjUyMjI2MWQxOTMxNGIxMzhkMmJkOGQzNThmNWM4ZTYxYzA5ZTFjNDA2NjBjMGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.FdAMEYOhNS3AyYW9pX0ia7pAsvR1mhpyNFN9h01MuL8)
>  It looks reasonably well…
> 
> But it doesn't look like the menu in Windows 11 File Explorer, does it? 
> ![Windows 11 File Explorer View with icons 
> (100%)](https://private-user-images.githubusercontent.com/70774172/410576902-53fd8ba9-00f7-4126-a238-ab162ff54325.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTc0MzIsIm5iZiI6MTczODg5NzEzMiwicGF0aCI6Ii83MDc3NDE3Mi80MTA1NzY5MDItNTNmZDhiYTktMDBmNy00MTI2LWEyMzgtYWIxNjJmZjU0MzI1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDAyNTg1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ5YjRhYWUyZGYxODkyMmMxNWQyMTQ4OGNkM2M5N2M0ZWUwMTllYTJiMDBjYTUxNmM3YTg1YzcxYmU1MmI0YjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.LNaIqN5mjLKZDjElsheeNpWhqqL41c9wqXfCFMdtBTc)
>  Windows L&F should look like native apps do, and we're not there yet with 
> the menu rendering.
> 
> **Windows 10** 
> ![Windows-10-menu-items-2025-02-06](https://private-user-images.githubusercontent.com/70774172/410577351-e2d64c81-3831-4f20-93ea-f9e85f5ce5aa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTc0MzIsIm5iZiI6MTczODg5NzEzMiwicGF0aCI6Ii83MDc3NDE3Mi80MTA1NzczNTEtZTJkNjRjODEtMzgzMS00ZjIwLTkzZWEtZjllODVmNWNlNWFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDAyNTg1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE1NjUyZWQ2ZjJmZjQzM2VmMzZiMTNkNjhhZTU2N2NkMjA1ZDU5YzA2MGVlM2EzZGRhZGI0ZjU0ZDgzNGZkOGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.jM3mD5sW8UzdiY6i_BIF7Dm9SvuImyVYDp831E-2sYk)
>  It looks bad because neither icon is where it should be.
> 
> Without the fix, it looks good: 
> ![Windows-10-menu-items-no-fix-2025-02-06](https://private-user-images.githubusercontent.com/70774172/410577950-684c9461-e47e-46de-a609-7bd9724099cb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTc0MzIsIm5iZiI6MTczODg5NzEzMiwicGF0aCI6Ii83MDc3NDE3Mi80MTA1Nzc5NTAtNjg0Yzk0NjEtZTQ3ZS00NmRlLWE2MDktN2JkOTcyNDA5OWNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDAyNTg1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZlOTMxODdkNTQxMjhkNDZjMzZiYjhlNDkxNzBjODI3MTBlZGQ5MTA5ZTExYTQ5OWU5YTA1MzJhYjE5Y2VhODMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.A8WiqJm1sFLaPXUmbYHiigZiO9c6ZH6UUrjI7Ndy0bU)
>  And one can see if an item is selected or not. Yet they changed the skin in 
> Windows 11, now it's impossible to distinguish them.

I am not sure if we can satisfy both windows 10 and windows 11 simultaneously 
as both design is different for this logic...
Without the fix, it looks good as Windows 10  as it doesn't support separate 
bullet/checkmark skin whereas windows 11 does...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

Also, Windows 11 there is another thing I noticed which is without icon, the 
bullet/checkmark is drawn at the icon location and do not have its own space, 
so we need to bring back the if (icon == null) logic which we removed to render 
the skin always at specified location..

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

PR Comment: https://git.openjdk.org/jdk/pull/23324#issuecomment-2641830140

Reply via email to