Re: FVWM: icons in menu-labels

From: John Williams <williams_at_sharkey.us.dynix.com>
Date: Mon, 17 Jun 1996 17:03:22 -0600 (MDT)

On Sat, 15 Jun 1996, Julien Maillard wrote:
> 1) I noticed that when using:
> "Calculator%xcalc.xpm%"
> the text to the right of the icon in not centered vertically with
> respect to the icon height... this shows up when the icon is taller
> than the font used... would it be easy to make them centered? I know
> this really *is* a detail... just wondering!

I sent a patch for this to the list last month.
Here's the message again:


Date: Thu, 9 May 1996 16:31:17 -0600 (MDT)
From: John Williams <williams_at_sharkey.us.dynix.com>
To: fvwm <fvwm_at_hpc.uh.edu>
Subject: Patch to vertically center menu text

One of the items on the fvwm2-TO.DO list is:

  - Make left justified pixmaps in menus center align vertically w/
    any text displayed?

It seems that small pixmaps are already centered with larger text, but
text is not centered with larger pixmaps.
So here is a small patch to fix the vertical alignment.

John Williams


--- 1.1 1996/05/09 21:41:26
+++ menus.c 1996/05/09 22:06:27
_at_@ -179,6 +179,14 @@
   text_y = y_offset + Scr.StdFont.y;
   if(mi->picture)
     text_y+=mi->picture->height;
+ if (mi->lpicture)
+ {
+ y = mi->lpicture->height - Scr.StdFont.height;
+ if (y>1)
+ text_y += y>>1;
+ }
 
   ShadowGC = Scr.MenuShadowGC;
   if(Scr.d_depth<2)


--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Mon Jun 17 1996 - 18:07:25 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST