From: Stefan Kangas <stefan@marxist.se>
To: martin rudalics <rudalics@gmx.at>
Cc: 31020@debbugs.gnu.org
Subject: bug#31020: 27.0; Please provide a way to know about menu-bar wrapping
Date: Sat, 28 Sep 2019 20:42:35 +0200 [thread overview]
Message-ID: <CADwFkm=qbpq43Zs=Aj-bt6fwxcaYDjnsjxfF36gcs-mEE4Ow3w@mail.gmail.com> (raw)
In-Reply-To: <37c99926-a5e5-4fa8-b734-6f9c146740e9@default>
tags 31020 + wontfix
close 31020
quit
martin rudalics <rudalics@gmx.at> writes:
>> I don't understand why you think that the menu-bar-lines parameter
>> should not be it. AFAIU, the problem with setting it (or any other
>> frame parameter) to the actual value is that with many toolkits Emacs
>> simply doesn't know the correct value. But maybe Martin will have
>> some trick up his sleeves.
>
> I am not aware of any toolkit telling us that number or whether the
> current menu bar was wrapped at all. It's nowhere in the various API
> descriptions and I suppose the information usually gets lost somewhere
> in between calculations of which font the user's theme wants for the
> menu bar and how that affects wrapping. I'm not even sure whether
> some toolkit would deliberately truncate our menu bar when it doesn't
> fit into one line. And lets not talk about GTK auto-resizing our
> frame when the menu bar gets too long.
>
> So what you can do is the following: Make a frame with a _visibly
> unwrapped_ menu bar, get the menu bar height via
>
> (cddr (assq 'menu-bar-size (frame-geometry)))
>
> Do the same for a frame with a _visibly wrapped_ two-lines menu bar.
> You can now derive the height of the single-line and any additional
> menu bar line and use these values together with 'frame-geometry' for
> getting the actual number of lines.
>
> Obviously, this will work only as long as you do not change themes,
> the menu bar height of the current theme or the resolution of your
> screen or whatever else could affect this. And since you have to
> visuallly check the "wrappedness" of the menu bar, this work cannot be
> reasonably done from within Emacs.
It seems like the conclusion here is that the feature suggestion is not
practical, so I'm closing it as wontfix.
If this is incorrect, please reopen the bug.
Best regards,
Stefan Kangas
next prev parent reply other threads:[~2019-09-28 18:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-02 3:03 bug#31020: 27.0; Please provide a way to know about menu-bar wrapping Drew Adams
2018-04-02 6:08 ` Eli Zaretskii
2018-04-02 8:54 ` martin rudalics
2018-04-02 13:32 ` Drew Adams
2019-09-28 18:42 ` Stefan Kangas [this message]
[not found] <<37c99926-a5e5-4fa8-b734-6f9c146740e9@default>
[not found] ` <<837epq6sxx.fsf@gnu.org>
2018-04-02 13:25 ` Drew Adams
2018-04-03 6:49 ` martin rudalics
2018-04-03 14:28 ` Drew Adams
2018-04-04 7:49 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkm=qbpq43Zs=Aj-bt6fwxcaYDjnsjxfF36gcs-mEE4Ow3w@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=31020@debbugs.gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).