RFR: 8155030: The Menu Mnemonics are always displayed for GTK LAF [v11]

Abhishek Kumar abhiscxk at openjdk.org
Wed Jul 3 11:22:24 UTC 2024


On Fri, 28 Jun 2024 20:05:44 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove AquaMnemonicHandler class and unused APIs from WinDowsLookAndFeel, copyright year update
>
> Overall, the changes look good to me.
> 
> There are several minor comments though.
> 
> Now we have one common mnemonic handler instead of two… short of having three of those.

@aivanov-jdk `TestMenuMnemonic.java, bug4736093.java` and `bug6921687.java` tests failed after the helper methods are moved from `WindowsLookAndFeel.java` file to `MnemonicHandler.java`. Updated the test to invoke helper methods from MnemonicHandler class. 
CI testing is all ok after these tests update.

> src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsLabelUI.java line 82:
> 
>> 80:             mnemonicIndex = -1;
>> 81:         }
>> 82:         if ( UIManager.getColor("Label.disabledForeground") instanceof Color &&
> 
> Perhaps, we could resolve the warning: `UIManager.getColor` returns `Color` object, so what `instanceof Color` really verifies here is whether the returned object is `null` or not.

Not sure whether it is really required to update in this PR as the change may not be in the scope.

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

PR Comment: https://git.openjdk.org/jdk/pull/18992#issuecomment-2205837472
PR Review Comment: https://git.openjdk.org/jdk/pull/18992#discussion_r1664028372


More information about the client-libs-dev mailing list