unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: luangruo@yahoo.com, emacs-devel@gnu.org
Subject: Re: [PATCH] Fix placement of toggle and radio button in Lucid menu.
Date: Mon, 28 Feb 2022 15:21:59 +0200	[thread overview]
Message-ID: <83o82rm8i0.fsf@gnu.org> (raw)
In-Reply-To: <87ee3nz8ea.fsf@elite.giraud> (message from Manuel Giraud on Mon,  28 Feb 2022 09:45:49 +0100)

> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
> Date: Mon, 28 Feb 2022 09:45:49 +0100
> 
> Here for each menu entry, I have prepend two unicode characters ('FULL
> BLOCK' and 'MEDIUM SHADE') that, I think, is showing the full extend of
> a given font.
> 
> With those "full block", we can see that the toggle button is correctly
> placed: at the middle between the baseline and the top of the font.

Is it?  I still see the toggle button too high, even if we consider
the higher block characters.

>    1- Compute the ascent of each label (ie. max ascent of each
>       character) and use this value to place the button;
> 
>    2- Compute a global ascent for all labels in all menus and use this
>       value;
> 
>    3- Place the toggle button on the baseline (not at middle of baseline
>       and top);
> 
>    4- Leave it as is.
> 
> Regarding option 1, I understood that having the metrics of a given
> character is not yet available in the backend. Plus we probably end up
> with non uniformly placed buttons.
> 
> Option 2: Fix the "uniformly placed buttons" but is that even possible
> given how dynamic Emacs menus are?
> 
> As you guess, option 3 has my favour. It fixes my aesthetic issue
> without more computation. In fact, I don't even undertand why those
> buttons need to be placed in at the middle of the baseline and the top
> in the first place (maybe I need an explanation here).
> 
> If we stay with option 4, I still think that the toggle button should be
> 2/3 of the ascent and not 2/3 of the height of the font.

I proposed to have a variable users could tweak precisely because it
is a very simple solution that can satisfy everyone.



  reply	other threads:[~2022-02-28 13:21 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  9:01 [PATCH] Fix placement of toggle and radio button in Lucid menu Manuel Giraud
2022-02-24 10:06 ` Po Lu
2022-02-24 10:19   ` Po Lu
2022-02-24 10:36     ` Eli Zaretskii
2022-02-24 14:09     ` Manuel Giraud
2022-02-25 11:16     ` Manuel Giraud
2022-02-25 11:50       ` Po Lu
2022-02-26 17:38         ` Manuel Giraud
2022-02-25 12:18       ` Eli Zaretskii
2022-02-25 12:52         ` Manuel Giraud
2022-02-25 13:05           ` Eli Zaretskii
2022-02-25 13:46             ` Po Lu
2022-02-25 14:10               ` Eli Zaretskii
2022-02-26  0:20                 ` Po Lu
2022-02-26  6:24                   ` Eli Zaretskii
2022-02-26  7:33                     ` Po Lu
2022-02-26  7:51                       ` Eli Zaretskii
2022-02-26  8:35                         ` Po Lu
2022-02-26  8:53                           ` Eli Zaretskii
2022-02-25 14:46             ` Manuel Giraud
2022-02-25 14:57               ` Eli Zaretskii
2022-02-25 15:38                 ` Manuel Giraud
2022-02-25 16:35                   ` Eli Zaretskii
2022-02-26  0:21                     ` Po Lu
2022-02-26  6:26                       ` Eli Zaretskii
2022-02-26  7:35                         ` Po Lu
2022-02-28  8:45                           ` Manuel Giraud
2022-02-28 13:21                             ` Eli Zaretskii [this message]
2022-02-28 21:19                               ` Manuel Giraud
2022-03-01  3:33                                 ` Eli Zaretskii
2022-03-02 12:06                                   ` Manuel Giraud
2022-02-28 18:35                             ` chad
2022-03-02 12:10                               ` Manuel Giraud

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=83o82rm8i0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=manuel@ledu-giraud.fr \
    /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).