all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Manuel Giraud <manuel@ledu-giraud.fr>
To: Po Lu <luangruo@yahoo.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: [PATCH] Fix placement of toggle and radio button in Lucid menu.
Date: Mon, 28 Feb 2022 09:45:49 +0100	[thread overview]
Message-ID: <87ee3nz8ea.fsf@elite.giraud> (raw)
In-Reply-To: <87sfs63ws4.fsf@yahoo.com> (Po Lu's message of "Sat, 26 Feb 2022 15:35:39 +0800")

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

Hi,

I think I've finally understood what you were trying to explain to me 😅
First, yet another screen shot:

[-- Attachment #2: shot.png --]
[-- Type: image/png, Size: 3148 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1561 bytes --]


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.

But I still find it to be high regarding the text label. I have tested
with other fonts with the same result because the capital letters were
always shorter than the full ascent of a font.

So here are the options I think we have now:

   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.

Best regards,
-- 
Manuel Giraud

  reply	other threads:[~2022-02-28  8:45 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 [this message]
2022-02-28 13:21                             ` Eli Zaretskii
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ee3nz8ea.fsf@elite.giraud \
    --to=manuel@ledu-giraud.fr \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=luangruo@yahoo.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.