On Thu, 9 Sep 2021 07:41:06 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java line 254:
>>
>>> 252:
>>> 253: @Override
>>> 254: public Icon getInvertedIcon() {
>>
>> When we draw result of this method? Is it possible that we use the
>> getInvertedIcon for disabled menus as well?
>
> It is called from AquaMenuPainter#405 and 378
> if (c instanceof JMenu && (model.isArmed() || model.isSelected()) &&
> arrowIcon instanceof InvertableIcon) {
> ((InvertableIcon)arrowIcon).getInvertedIcon().paintIcon(c, g,
> arrowIconRect.x, arrowIconRect.y);
> }
> I could not find at what point arrowIcon or checkIcon would be instance of
> InvertableIcon...
> I guess we can take one fix at a time since this normal icon disable issue
> itself is there from macox port origin
> and fix it later if any issue comes for InvertableIcon...
> I could not find at what point arrowIcon or checkIcon would be an instance of
> InvertableIcon...
All InvertableImageIcon objects are InvertableIcon since it implements that
interface, so that part is always true, and if it possible to make "(c
instanceof JMenu && (model.isArmed() || model.isSelected()"== true for the
disabled components then "getInvertedIcon" should return disabled icon.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5310