unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Fix placement of toggle and radio button in Lucid menu.
@ 2022-02-24  9:01 Manuel Giraud
  2022-02-24 10:06 ` Po Lu
  0 siblings, 1 reply; 33+ messages in thread
From: Manuel Giraud @ 2022-02-24  9:01 UTC (permalink / raw)
  To: emacs-devel

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

Hi,

It seems to me that toggle and radio buttons in the Lucid backend are
placed too high in relation to their label in menus. The attach patch
fixes it.

Before patch:

[-- Attachment #2: small-font-orig.png --]
[-- Type: image/png, Size: 6822 bytes --]

[-- Attachment #3: big-font-orig.png --]
[-- Type: image/png, Size: 66627 bytes --]

[-- Attachment #4: Type: text/plain, Size: 14 bytes --]


After patch:

[-- Attachment #5: small-font-patch.png --]
[-- Type: image/png, Size: 6784 bytes --]

[-- Attachment #6: big-font-patch.png --]
[-- Type: image/png, Size: 66863 bytes --]

[-- Attachment #7: Type: text/plain, Size: 15 bytes --]


Best regards,

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #8: 0001-better-placement-of-toggle-radio-button-in-Lucid-wid.patch --]
[-- Type: text/x-patch, Size: 1173 bytes --]

From 83d3948fd12c2a8398898dc2e9536c2e11e28746 Mon Sep 17 00:00:00 2001
From: Manuel Giraud <manuel@ledu-giraud.fr>
Date: Thu, 24 Feb 2022 09:51:48 +0100
Subject: [PATCH] better placement of toggle/radio button in Lucid widget.

---
 lwlib/xlwmenu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c
index ace5141cdb..56acaa5a4d 100644
--- a/lwlib/xlwmenu.c
+++ b/lwlib/xlwmenu.c
@@ -793,7 +793,7 @@ draw_toggle (XlwMenuWidget mw, Window window, int x, int y, int selected_p)
   width = toggle_button_width (mw);
   height = width;
   x += mw->menu.horizontal_spacing;
-  y += (MENU_FONT_ASCENT (mw) - height) / 2;
+  y += (MENU_FONT_HEIGHT (mw) - height) / 2;
   draw_shadow_rectangle (mw, window, x, y, width, height, False, selected_p);
 }
 
@@ -810,7 +810,7 @@ draw_radio (XlwMenuWidget mw, Window window, int x, int y, int selected_p)
   width = radio_button_width (mw);
   height = width;
   x += mw->menu.horizontal_spacing;
-  y += (MENU_FONT_ASCENT (mw) - height) / 2;
+  y += (MENU_FONT_HEIGHT (mw) - height) / 2;
   draw_shadow_rhombus (mw, window, x, y, width, height, False, selected_p);
 }
 
-- 
2.35.1


[-- Attachment #9: Type: text/plain, Size: 18 bytes --]

-- 
Manuel Giraud

^ permalink raw reply related	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2022-03-02 12:10 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).