RFR: 8155030: The Menu Mnemonics are always displayed for GTK LAF [v2]
Alisen Chung
achung at openjdk.org
Thu May 9 20:59:10 UTC 2024
On Wed, 8 May 2024 05:53:38 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> In GTK LAF, the menu mnemonics are always displayed which is different from the native behavior. In native application **(tested with gedit**), the menu mnemonics toggle on press of `ALT` key. Menu mnemonics are hidden initially and then toggles between show/hide on `ALT` press.
>> Proposed fix is to handle the `ALT` key press for GTK LAF and mimic the native behavior. Fix is similar to the `ALT` key processing in Windows LAF. Automated test case is added to verify the fix and tested in Ubuntu and Oracle linux.
>>
>> CI testing is green and link attached in JBS.
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> Var moved to local scope
src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java line 1085:
> 1083: if (UIManager.getBoolean("Button.showMnemonics")) {
> 1084: // Do not hide mnemonics if the UI defaults do not support this
> 1085: isMnemonicHidden = false;
why does the get method also set the `isMnemonicHidden` flag? Shouldn't this only be done on the set method?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18992#discussion_r1595973841
More information about the client-libs-dev
mailing list