On Fri, 31 Jul 2026 18:06:49 GMT, Alexey Ivanov <[email protected]> wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review comment > > src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsPopupMenuUI.java > line 243: > >> 241: return true; >> 242: } >> 243: } > > Why does the presence of check marks / bullets and icons in a submenu affect > rendering of the current popup? > > Each drop-down menu from the menu bar and each submenu should be independent. > > Otherwise, it makes the first popup too wide for no reason: > > <img width="312" height="166" alt="The first drop-down reserves the space for > the icon column but no icon is present in its menu items — but a submenu has > displays both a check mark and an icon" > src="https://github.com/user-attachments/assets/4d9357fc-cabc-41f7-a6cc-d97cd62fddb0" > /> > > Also notice that the selection of the submenu is painted over the owned popup. I noticed a weird effect on Windows 10. Initially, the drop down menu is rendered without reserving the space for the icon column (as expected), but after I open the submenu, the popup repaints… not immediately but rather as one hovers mouse over menu items. This shouldn't be happening. <img width="216" height="140" alt="The third menu item including the submenu title aren't aligned" src="https://github.com/user-attachments/assets/2267f525-dc0b-4cb6-b646-1248252107d5" /> ~~I couldn't reproduce such a behaviour on Windows 11 where the drop down reserves the space for icon column right away.~~ I used the wrong build in my testing on Windows 11. I see the same behaviour. <img width="218" height="140" alt="The third menu item including the submenu title aren't aligned" src="https://github.com/user-attachments/assets/333382dc-c0fa-4693-8e9d-c8c3e714b093" /> ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29730#discussion_r3692809499
