On Wed, 13 May 2026 04:51:27 GMT, Prasanta Sadhukhan <[email protected]> wrote:
>> [JDK-8348760](https://bugs.openjdk.org/browse/JDK-8348760) fixed an issue in >> Windows L&F JMenuItem layout whereby radio bullet/checkmark was rendered in >> different columnspace than menuitem imageicon so radiobullet/checkmark is >> rendered in first column and imageicon is rendered in 2nd column but this >> rendering of imageicon in 2nd columnspace was done invariably for all >> JMenuItem irrespective of if it is JRadioButtonMenuItem or JCheckBoxMenuItem >> or JMenuItem, which is wrong. >> >> Normal JMenuItem (which are not JRadioButtonMenuItem or JCheckBoxMenuItem) >> imageicon rendering should be done in first columnspace as was done before >> JDK-8348760 fix because there is no radiobullet/checkmark to render for >> those menuitems so no need to reserve columnspace for those bullet/checkmark >> icon >> >> Before fix >> >> <img width="205" height="127" alt="image" >> src="https://github.com/user-attachments/assets/13a1e352-5e8d-4251-b7a7-032935eab74e" >> /> >> >> >> After fix >> >> <img width="195" height="131" alt="image" >> src="https://github.com/user-attachments/assets/84ec3ee6-2823-4bf7-840d-b53f2e9d44c3" >> /> >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Prasanta Sadhukhan has updated the pull request with a new target base due to > a merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains five additional > commits since the last revision: > > - Merge branch 'master' of https://git.openjdk.java.net/jdk into JDK-8370945 > - Fix > - Text alignment > - jcheck > - 8370945: With Windows LAF, the location of a JMenuItem icon is incorrect Can you provide screen shots of some of the most important cases, in particular 1. menu where items are all text only <img width="207" height="124" alt="image" src="https://github.com/user-attachments/assets/1b382245-6715-4f42-bbc4-b870dfba7e47" /> This left padding is there before fix too. This is what it looked in jdk9 <img width="213" height="59" alt="image" src="https://github.com/user-attachments/assets/a28298c3-578b-4bd5-a275-fa83fd55a614" /> 2. menu where all items have text and one item additionally has a checkmark <img width="208" height="126" alt="image" src="https://github.com/user-attachments/assets/60f12141-716b-4d12-acef-28bfced2c54a" /> 3. menu where all items have text and one item additionally has an image icon <img width="216" height="130" alt="image" src="https://github.com/user-attachments/assets/d78a37ac-43a5-4516-8ebb-222ab9be9e20" /> 4. menu where all items have text and one item additionally has an image icon one item additionally has a checkmark (or radio button) <img width="223" height="195" alt="image" src="https://github.com/user-attachments/assets/21c58583-d6be-4de4-8fba-ce8dcb9666d4" /> what a submenu looks like that uses an image and very long text SFAIK, these can never have a check mark, but can have everything else <img width="450" height="70" alt="image" src="https://github.com/user-attachments/assets/47f3fee4-d59c-468e-9727-199ef521fb69" /> ------------- PR Comment: https://git.openjdk.org/jdk/pull/29730#issuecomment-4439391558
