On Fri, 3 Sep 2021 04:13:46 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> src/java.desktop/macosx/classes/com/apple/laf/AquaMenuPainter.java line 419:
>>
>>> 417: } else {
>>> 418: arrowIcon.paintIcon(c, g, arrowIconRect.x,
>>> arrowIconRect.y);
>>> 419: }
>>
>> It will be even better to implement it in the same way as done in other L&fs
>> like windows/metal.
>
> I will like to know how because as it is pointed out, paintArrow delegates
> drawing to ImageIcon#paintIcon which is in shared code and this is mac
> specific issue so it needs to be handled before we call ImageIcon#paintIcon
You need to override the paintIcon method in the InvertableImageIcon returned
by the AquaImageFactory.getMenuArrowIcon() or you can create `class
MenuArrowIcon extends InvertableImageIcon,` and override it there.
Also take a look to another usage of InvertableImageIcon for
"MenuItemCheckIcon", should we disable it as well?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5310