On Mon, 23 Feb 2026 01:23:33 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> > They do need to be aligned. Anything else is weird.
>
> It was aligned before this PR and so I closed this JBS as Not an Issue but it 
> was reopened..

[JDK-8370945](https://bugs.openjdk.org/browse/JDK-8370945) was reopen to remove 
the space reserved for check mark or radio bullet where none is needed.

I agree with Phil, the icons should be aligned by default if there are both 
check marks / radio bullets and icons at the same time.

I think the icons should be rendered at the location of check marks / radio 
bullets if there are no menu items that have both, that is no 
`JCheckBoxMenuItem` or `JRadioButtonMenuItem` with an icon.

> Metal and Nimbus are platform independent so they can do their own things but 
> Windows L&F need to do similar to what native application does…

Yet we failed to find [a native app that displays 
both](https://github.com/openjdk/jdk/pull/23324#discussion_r1935724542). It was 
the problem in https://github.com/openjdk/jdk/pull/23324. The menu in Windows 
Explorer that @tabata-d [referred 
to](https://github.com/openjdk/jdk/pull/29730#issuecomment-3919381079) is the 
one that [you'd used in the 
PR](https://github.com/openjdk/jdk/pull/23324#discussion_r1935744523) for the 
initial fix.

Later on, [Phil 
demonstrated](https://github.com/openjdk/jdk/pull/23324#issuecomment-2859773998)
 with a native Win32 app that the layout of Windows native menus doesn't 
reserve another column—for a check mark / radio bullet and for a menu 
icon—unless you specify both `hbmpChecked` and `hbmpUnchecked` as well as 
`hbmpItem`. *If only `hbmpItem` is specified, the icon is displayed where the 
check mark / bullet is displayed.*

Thus, your currently proposed fix produces a similar menu to that of Win32. But…

> > They do need to be aligned. Anything else is weird.

I still think we should align the icons in this case.

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

PR Comment: https://git.openjdk.org/jdk/pull/29730#issuecomment-3945094779

Reply via email to