<Swing Dev> RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Thu Sep 2 09:56:31 UTC 2021


On Thu, 2 Sep 2021 09:26:16 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> In other L&Fs, it creates their own icon 
>> for ex, MetalLookAndFeel
>> "MenuItem.arrowIcon",(LazyValue) t -> MetalIconFactory.getMenuItemArrowIcon(),
>> and WindowsLookAndFeel
>> "MenuItem.arrowIcon", menuItemArrowIcon,
>> 
>> but for AquaL&F it does not create it's own factory icon and rely on BasicIconFactory$MenuItemArrowIcon, so tweaking aqua arrow icon inline with how other do will cause design change, so I think this fix caters to the problem in view of this aqua limitation.
>
>> but for AquaL&F it does not create it's own factory icon and rely on BasicIconFactory$MenuItemArrowIcon, so tweaking aqua arrow icon inline with how other do will cause design change, so I think this fix caters to the problem in view of this aqua limitation.
> 
> Are you sure that the Aqua does not have its own factory? the BasicIconFactory$MenuItemArrowIcon is an empty class.
> AquaLookAndFeel.java:
>     "Menu.arrowIcon",(LazyValue) t -> AquaImageFactory.getMenuArrowIcon(),

That is for MenuArrowIcon which is also there for Metal and Windows L&F in addition with MenuItemArrowIcon(). Aqua does not have it for MenuItem.
The control for aqua menuitem goes via ImageIcon#paintIcon for menuitem arrow which does not have enabled/disabled parameter so it was done the way it is now.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5310


More information about the swing-dev mailing list