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

Alexey Ivanov aivanov at openjdk.org
Mon Jul 8 13:57:42 UTC 2024


On Mon, 8 Jul 2024 09:17:55 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:

>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Javadoc style comment, unused import removed
>
>> The diff modifies the generic `SynthGraphicsUtils.paintText` so that no mnemonic is passed to `SwingUtilities2.drawStringUnderlineCharAt` if `isMnemonicHidden` returns `true`.
>> 
>> This approach has _a performance impact_ on all UI text painting. The condition can be moved into `GTKGraphicsUtils` so that only GTK L&F will call `isMnemonicHidden`.
> 
> Updated the code to handle the mnemonic for buttons as well as labels. Mnemonic hide condition check moved to `GTKGraphicsUtils` to avoid the `performance issue`.

> @kumarabhi006 Setting summary to:

It's not what I meant. This summary will be included in the commit message, its purpose is to provide additional details of the changeset.

Something like this should be enough:


Hides mnemonics on menus, buttons, and labels for GTK L&F.

Moved shared code for hiding mnemonics into
sun/swing/MnemonicHandler and AltProcessor to avoid code duplication.

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

PR Comment: https://git.openjdk.org/jdk/pull/18992#issuecomment-2214143609


More information about the client-libs-dev mailing list