FVWM: Patch to vertically center menu text

From: John Williams <williams_at_sharkey.us.dynix.com>
Date: Thu, 9 May 1996 16:31:17 -0600 (MDT)

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 Thu May 09 1996 - 17:30:59 BST

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