From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix placement of toggle and radio button in Lucid menu. Date: Mon, 28 Feb 2022 15:21:59 +0200 Message-ID: <83o82rm8i0.fsf@gnu.org> References: <87sfs87i5o.fsf@elite.giraud> <87pmnc7f5c.fsf@yahoo.com> <87k0dk7ejd.fsf@yahoo.com> <878rtzb3hr.fsf@elite.giraud> <83h78nqguu.fsf@gnu.org> <87wnhj152u.fsf@elite.giraud> <83a6efqepd.fsf@gnu.org> <87wnhjdmxe.fsf@elite.giraud> <831qzrq9j0.fsf@gnu.org> <87bkyvdkif.fsf@elite.giraud> <83y21yq4zj.fsf@gnu.org> <87h78m5vfg.fsf@yahoo.com> <83sfs6p2ie.fsf@gnu.org> <87sfs63ws4.fsf@yahoo.com> <87ee3nz8ea.fsf@elite.giraud> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40853"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Manuel Giraud Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 28 14:29:49 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nOg61-000AUZ-6v for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Feb 2022 14:29:49 +0100 Original-Received: from localhost ([::1]:50802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOg60-00071B-9F for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Feb 2022 08:29:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOfyd-0006eg-DT for emacs-devel@gnu.org; Mon, 28 Feb 2022 08:22:11 -0500 Original-Received: from [2001:470:142:3::e] (port=40090 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOfyc-0007TH-FJ; Mon, 28 Feb 2022 08:22:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=DoY/wpW4E+8perx5fOs8DVsENCw/bXdjjJFT/tnemMM=; b=ol8OrU6q02PW tf6JsNtUqJ9u81yvbE36DBseWE+FPouTM6InrJ2yf9W8IGGro9is2Gpkh3bH7UTLyev4m4ZwDNrxp uLtRxhju/NGEKPPgZFTd/5dZXfsYYBl2IJm1fVkLOsmPNB3f9HlLMc+dPJd1qjnJjSeYs/eMFTJ/4 rJ0b6CTDuZQq/VYBmFule94U6wR9ZgPMGu0MGElY7oFKeVCNb/BKHHXCa4xQkF7idrQCuc+fuQCKJ /56tzd5divMQNGDHQIgC0EVC1JswXcWndt/XYwHAG1ci1Vs9VCgq1UpbZE7R8jgAG3PkcX89bblyV yHZwzgyQtQvUea65/AkkmQ==; Original-Received: from [87.69.77.57] (port=1430 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOfya-00069P-5F; Mon, 28 Feb 2022 08:22:10 -0500 In-Reply-To: <87ee3nz8ea.fsf@elite.giraud> (message from Manuel Giraud on Mon, 28 Feb 2022 09:45:49 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286725 Archived-At: > From: Manuel Giraud > Cc: Eli Zaretskii , 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.