Subject: FVWM: icons in menu-labels

From: Julien Maillard <[email-masked]>
Date: Sat, 15 Jun 1996 10:58:34 -0400

Hello,

I have two quesions concerning icons in menu-labels:

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!

2) How big of an overload is it to add icons to menu labels? I only
added a few so far without noticable change in speed... any idea?

Thanks!

PS: i use fvwm-2.0.42 on a Linux system.
-- 
Julien Maillard                                       [email-masked]
Virginia Tech
                tel: (540) 231 4285,  fax: (540) 231 8836
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: <[email-masked]> (Charles Hines)
Date: Mon, 17 Jun 1996 15:42:01 -0400

>>>>> "JM" == Julien Maillard <[email-masked]> writes:

JM> Hello,

Hello.

JM> I have two quesions concerning icons in menu-labels:

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

You should have read the TO-DO list, as this is in there.  :)

I'll get to it eventually if someone else doesn't mail me a patch for
it first.  It's not too high up on my priorities right now.

JM> 2) How big of an overload is it to add icons to menu labels? I only
JM> added a few so far without noticable change in speed... any idea?

It shouldn't be too bad, as long as you don't go crazy.  The more
different XPMs you use in the menus, the more colors & memory it'll
eat up.  But if they are all relatively small and use similiar colors,
even a lot of different ones shouldn't cause any problems at all.

Chuck

*******************************************************************************
Charles K. Hines <[email-masked]>
IBM Logic Synthesis Developer [BooleDozer (TM)]
Martial Arts Instructor [Modern Arnis, Presas Style Filipino Martial Arts]

         "Go back to sleep, Chuck.  You're just havin' a nightmare
             -- of course, we ARE still in Hell." (Gary Larson)
*******************************************************************************
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: John Williams <[email-masked]>
Date: Mon, 17 Jun 1996 17:03:22 -0600 (MDT)

> 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 <[email-masked]>
To: fvwm <[email-masked]>
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
@@ -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)

---

From: <[email-masked]> (Charles Hines)
Date: Tue, 18 Jun 1996 08:32:37 -0400

>>>>> "John" == John Williams <[email-masked]> writes:

>> this really *is* a detail... just wondering!

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

Oh yeah - I had forgotten about that. :)

I'll see about getting that into the next beta.

Thanks,
Chuck