On Fri, 5 Aug 2022 08:58:51 GMT, Prasanta Sadhukhan <[email protected]> wrote:
> Issue is Arrow in submenu with empty title have a wrong position in Aqua L&F > as can be seen > > <img width="94" alt="image" > src="https://user-images.githubusercontent.com/43534309/183023538-de8e51b4-31e6-45d7-b2bd-35da5e29c1e8.png"> > > > which is because the text being null/empty, `labelR` rectangle width/height > is 0 so arrowIcon y coordinate becomes -ve as per the calculation in > layoutMenuItem(). Although it seems logical to me to not show the arrow if > submenu text is null, but > whereas for other L&F, it is shown as this > for Metal > <img width="83" alt="image" > src="https://user-images.githubusercontent.com/43534309/183022436-d9e8ebf1-98de-4cf6-bf43-3713357846e5.png"> > > for Nimbus > <img width="77" alt="image" > src="https://user-images.githubusercontent.com/43534309/183022730-35d170b2-71c6-4231-9a03-880107dc49c6.png"> > > so the fix is made in Aqua L&F to show as other L&F as > <img width="92" alt="image" > src="https://user-images.githubusercontent.com/43534309/183023030-7356086d-957c-4e0d-bd52-bdf3493a96b0.png"> Changes requested by [email protected] (no known OpenJDK username). src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java line 496: > 494: if (!isTopLevelMenu) { > 495: // if ( GetSysDirection() < 0 ) hierRect.right = > hierRect.left + w + 4; > 496: // else hierRect.left = hierRect.right - w - 4; delete unused code ------------- PR: https://git.openjdk.org/jdk/pull/9769
