RFR: 7189422: [macosx] Submenu's arrow have a wrong position
Prasanta Sadhukhan
psadhukhan at openjdk.org
Fri Aug 5 09:13:38 UTC 2022
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">
-------------
Commit messages:
- Fix
- 7189422: [macosx] Submenu's arrow have a wrong position
Changes: https://git.openjdk.org/jdk/pull/9769/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9769&range=00
Issue: https://bugs.openjdk.org/browse/JDK-7189422
Stats: 122 lines in 2 files changed: 119 ins; 2 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/9769.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/9769/head:pull/9769
PR: https://git.openjdk.org/jdk/pull/9769
More information about the client-libs-dev
mailing list