emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix placement of toggle and radio button in Lucid menu.


From: Manuel Giraud
Subject: Re: [PATCH] Fix placement of toggle and radio button in Lucid menu.
Date: Mon, 28 Feb 2022 09:45:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix)

Hi,

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

PNG image

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 via email to

[Prev in Thread] Current Thread [Next in Thread]