Is hiding stuff behind the "more" sub-context menu intentional?

Isaac Oscar Gariano isaacoscar at live.com.au
Wed Nov 1 14:18:39 UTC 2023


Wow thank you, that was quick!

I have a 3840×2160 at 175% DPI monitor so I can probably fit more than most on my screen.
Regardless, I just did a quick test, and if I lower my screen resolution so that not everything fits on the context menu, it makes a two column context menu, so perhaps we don't need the >50 check at all?
(I don't know what happens if you also exhaust the screen width, but I expect that to be particularly unlikely to happen naturally).
Were there any actual cases of large context menus that lead to that piece of code?

There's also probably a way to get the screen resolution & DPI if you want to adjust to individual users.
Sadly, I only know general C++ programming, not Gui/QT stuff, so I haven't the faintest clue how to do that.

— Isaac Oscar Gariano​

________________________________
From: lyx-devel <lyx-devel-bounces at lists.lyx.org> on behalf of Jürgen Spitzmüller <jspitzm at gmail.com>
Sent: Thursday, 2 November 2023 12:50 AM
To: lyx-devel at lists.lyx.org <lyx-devel at lists.lyx.org>
Subject: Re: Is hiding stuff behind the "more" sub-context menu intentional?

Am Mittwoch, dem 01.11.2023 um 05:14 +0000 schrieb Isaac Oscar Gariano:
> If I have time later, I may modify the code that does the > 50​ check
> to actually count properly, as it's counting context menu items that
> don't even show up.

Yes, this would be the way to go, the current check is too dumb.

Attached is a patch that does this, considering not only hidden entries
but also the dynamic entries that are only expanded in expand() (such
as spelling suggestions). As far as I can see the result is correct.

Note, however, that this will result in shortcut conflicts with items
moved from sub- to main menu, so this effectively causes string
changes. Since string freeze that is lurking around the corner for some
time now, I am not sure if this is good to go in.

> Or you could just make the number much larger than 50​. I've
> personally not had a context menu in LyX that was too long, but users
> with higher DPI's/lower resolutions might have problems. (for example
> if I right click the menu bar I get a context menu with 49 items! but
> my screen could probably fit 6 more).

On my small laptop without HiDPI, 50 is not too short.

--
Jürgen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20231101/4813b728/attachment-0001.html>


More information about the lyx-devel mailing list