Integrated: 8268084: [macos] Disabled JMenuItem arrow is not disabled
Prasanta Sadhukhan
psadhukhan at openjdk.java.net
Mon Oct 4 06:52:50 UTC 2021
On Tue, 31 Aug 2021 06:09:38 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> It is seen in macos disabled JMenuItem arrow is not disabled even though JMenuItem itself is disabled.
> In native app, same menuitem arrow is disabled for disabled menuitem.
>
> Issue is when AquaMenuPainter#paintMenuItem() is called, it tries to draw a ImageIcon image of the arrow via ImageIcon#paintIcon which tries to generate MultiResolutionCachedImage via getResolutionVariant() by calling AquaUtils#generateFilteredImage.
> It does not take into account if disabled arrow icon image needs to be drawn or not, so it is always enabled.
>
> Proposed fix is to generate a disabled ImageIcon image of the same arrow icon and use it for disabled state.
This pull request has now been integrated.
Changeset: 32811026
Author: Prasanta Sadhukhan <psadhukhan at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/32811026ce5ecb1d27d835eac33de9ccbd51fcbf
Stats: 194 lines in 2 files changed: 193 ins; 0 del; 1 mod
8268084: [macos] Disabled JMenuItem arrow is not disabled
Reviewed-by: serb, jdv
-------------
PR: https://git.openjdk.java.net/jdk/pull/5310
More information about the client-libs-dev
mailing list