Bug 159976 - Accelerators are shown as tildes instead of underlined characters
Summary: Accelerators are shown as tildes instead of underlined characters
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+ Master
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Main-Menu Shortcuts-Accelerators
  Show dependency treegraph
 
Reported: 2024-03-01 01:35 UTC by Stéphane Guillou (stragu)
Modified: 2024-03-04 09:04 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot with gen VCL plugin (27.77 KB, image/png)
2024-03-01 01:39 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2024-03-01 01:35:11 UTC
Reported on the localisation mailing list by Michael Wolff[1]:

----

I stated that the tilde character which is used to mark the accesskey in LibreOffice interface is not converted into an underscore character under a letter which shall be an accesskey. The tilde is written before the letter to be used as accesskey instead. See the screenshot behind the following link:

https://www.sorbzilla.de/libreoffice/accesskey_character_not_converted.png

In LibreOffice 24.2 it works. 

---

I can confirm on Windows 11 as well, with English-US UI. The inactive menu items show the tilde instead of the underlined character.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c279cad9484cce44cf11473478c6059d69013fd2
CPU threads: 4; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Reproduced on Linux with gen VCL plugin (not with gtk3).

Bibisected with linux-64-24.8 repo to first bad build [b9d85f61685c1ed18f3910edac82af2d3a4a268d] which points to:

commit f2dfb95258215f90562617823b950c3ed151c1bf
author	Mike Kaganski Sat Feb 10 18:49:55 2024 +0600
committer	Mike Kaganski Sat Feb 10 16:58:03 2024 +0100
tdf#54169: revert "gtk is the only case auto-accel is true, and the
... menubar is native gtk there" (commit 3fbae5dc7e7b200776bbc8a7c2a43e1e04f15a2b
from 2021-08-05).
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163214

Mike, can you please have a look?

[1]:https://listarchives.libreoffice.org/global/l10n/2024/msg00065.html
Comment 1 Stéphane Guillou (stragu) 2024-03-01 01:39:53 UTC
Created attachment 192882 [details]
screenshot with gen VCL plugin

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5234ef71c7459506236d4d0dfe7beb5f00d8cc41
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: x11
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 2 Stéphane Guillou (stragu) 2024-03-01 01:42:32 UTC
(and pressing alt does not reveal the accelerators with gen VCL plugin, whereas it does with win)
Comment 3 Mike Kaganski 2024-03-01 05:13:38 UTC
(In reply to Stéphane Guillou (stragu) from comment #2)
> (and pressing alt does not reveal the accelerators with gen VCL plugin,
> whereas it does with win)

Is this a change?
Comment 4 Stéphane Guillou (stragu) 2024-03-01 07:15:24 UTC
(In reply to Mike Kaganski from comment #3)
> (In reply to Stéphane Guillou (stragu) from comment #2)
> > (and pressing alt does not reveal the accelerators with gen VCL plugin,
> > whereas it does with win)
> 
> Is this a change?
Good point. At f2dfb95~1, they are always visible, and pressing Alt has no effect. At f2dfb95, they are never shown on non-greyed out items, so no way to know what they are.
Comment 5 Mike Kaganski 2024-03-01 08:34:06 UTC
(In reply to Stéphane Guillou (stragu) from comment #4)

Thanks for the info.
Could you please check, if the mnemonics were shown also in 3fbae5dc7e7b200776bbc8a7c2a43e1e04f15a2b~1? That was the Caolan's change that I reverted.

If it was also shown there, then something has changed in the middle, and I'll try to find out. Otherwise, that was an unintended side effect, and we need to decide if gen needs the underlines at all.

It is also useful to know the state of other VCL plugins. When I merged that my commit, I anticipated something, so asked in the dev channel to check, telling that I only really tested on Windows (and indeed, this issue proves my testing poor even there) :-)
Comment 6 Mike Kaganski 2024-03-01 10:09:22 UTC
https://gerrit.libreoffice.org/c/core/+/164180
Comment 7 Commit Notification 2024-03-01 21:38:27 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4d39b88283d02eb44fe4cb8f3e4ec153ebf96a13

tdf#159976: make sure to always strip mnemonics in DrawCtrlText

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Stéphane Guillou (stragu) 2024-03-01 23:36:01 UTC
(In reply to Mike Kaganski from comment #5)
> Could you please check, if the mnemonics were shown also in
> 3fbae5dc7e7b200776bbc8a7c2a43e1e04f15a2b~1? That was the Caolan's change
> that I reverted.
Alt key had no effect either back then. Mnemonics always visible.
Comment 9 Mike Kaganski 2024-03-02 03:37:54 UTC
(In reply to Stéphane Guillou (stragu) from comment #8)

Thanks! Please file the gen problem separately. Despite caused by the same commit, it is different, and needs a different fix.
Comment 10 Stéphane Guillou (stragu) 2024-03-04 07:05:12 UTC Comment hidden (obsolete)
Comment 11 Mike Kaganski 2024-03-04 07:06:15 UTC
(In reply to Stéphane Guillou (stragu) from comment #10)
> Do you still want me to open a separate report about them not being visible
> after your 4d39b882?

Of course, please do.
Comment 12 Stéphane Guillou (stragu) 2024-03-04 08:28:55 UTC
(In reply to Mike Kaganski from comment #11)
> Of course, please do.
Done in bug 160020.
Comment 13 Mike Kaganski 2024-03-04 08:39:05 UTC
(In reply to Stéphane Guillou (stragu) from comment #12)
> Done in bug 160020.

Thanks!

(In reply to Stéphane Guillou (stragu) from comment #10)
> verified that the tildes are gone in:
> 
> Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 709866a3b8e073fab4937dcf91dcd33ff1d2bc13
> CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
> Locale: en-AU (en_AU.UTF-8); UI: en-US
> Calc: CL threaded
> 
> But the mnemonics underlines are not shown at all in the top menu bar (while
> they are shown in the context menus).

Please clarify, if you really tested using the gtk3 plugin, as specified in your comment. If so - is the underline missing there? I believe that my change couldn't affect gtk3, because it uses a different implementation, but ...
Comment 14 Stéphane Guillou (stragu) 2024-03-04 09:04:22 UTC
> (In reply to Stéphane Guillou (stragu) from comment #10)
> Please clarify, if you really tested using the gtk3 plugin, as specified in
> your comment. If so - is the underline missing there? I believe that my
> change couldn't affect gtk3, because it uses a different implementation, but
> ...
Sorry, misuse of my clipboard manager. Indeed, verified with:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 709866a3b8e073fab4937dcf91dcd33ff1d2bc13
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: x11
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded