<Swing Dev> RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v3]
Prasanta Sadhukhan
psadhukhan at openjdk.java.net
Fri Sep 3 07:45:09 UTC 2021
> 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.
Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
Override paintIcon
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/5310/files
- new: https://git.openjdk.java.net/jdk/pull/5310/files/ba8f30b5..63b591cc
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5310&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5310&range=01-02
Stats: 24 lines in 2 files changed: 15 ins; 8 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/5310.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/5310/head:pull/5310
PR: https://git.openjdk.java.net/jdk/pull/5310
More information about the swing-dev
mailing list