Subject: Re: 2.1.5 FvwmWinList button text

From: Nadim Saeed <[email-masked]>
Date: Wed, 16 Dec 1998 09:03:33 -0800 (XXX)

On Tue - December.15.1998 [21:27:16 +0100],
 Dominik Vogt ([email-masked]) wrote:
>
> On Tue, Dec 15, 1998 at 12:38:24PM -0600, [email-masked] wrote:
> > Full_Name: Nadim Saeed
> > Version: 2.1.5
> > CVS_Date: 
> > OS: SunOS 5.5.1 Generic_105428-01 sun4u sparc SUNW,Ultra-5_10
> > 
> > X_Server: 
> > Submission from: (NULL) (206.71.186.98)
> > 
> > 
> > With 2.1.5 the WinList buttons show their entries with 2 extra spaces that
> > weren't there in 2.0.45.  These 2 spaces were introduced, unnecessarily,
> > in
> > the MINI_ICON patch in 2.0.46
> >  
> > To clarify,
> >  
> >   was (2.0.45):         " TITLE "
> >   now (2.1.5) :         "  TITLE  "
> >  
> > It's taking up more room than is really necessary; a single space ought to
> > do.
> >  
> > NOTE: I do not use MINI_ICONS and so the titles are center-justified :-)
> 
> Well, that's the extra space reserved for the mini icons ;-)
> Take a look at line 700 in FvwmWinList.c:
> 
>         tw+=14; /* for title icon */ /* Magic Number ? */
> 

I'm not quite sure what this addition really buys you.  I have MINI_ICONS
defined (ie. they are #define'd to 1), yet I don't use them, which leads me to
the question above - what for ?

BTW: I'm just trying to understand the code better (the comments are rather
     scarce and the variable names not very descriptive in alot of the
     places (I was never a believer in "magic numbers" either ;-)

If its a matter of padding space around the mini-icons, well can't that be
done at the same point that the mini-icon itself is added to the button (BTW:
I don't see how that is done in the code either).  In other words, why not do
the padding/addition at the point when the mini-icons themselves are to be
added ?

> I'll put this in '#ifdef MINI_ICONS/#endif' so you can at
> least compile FvwmWinList without this extra space. I see
> no easy way to avoid this. Mini icons might be added or
> removed at any time, so even if you can find out if there
> is no mini icon in use you might pop up one a second later
> and then your WinList would have to resize.
> 

I commented out that line altogether and it removed the unnecessary
spaces (ie. its back to normal -- finally :-)

Thanks for the help and the prompt response (make sure to cc me)

> Bye
> Dominik
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 16 Dec 1998 18:10:11 +0100

> the padding/addition at the point when the mini-icons themselves are to be

There is no padding. There is extra space reserved for the mini
icons. The extra space is not removed if you have no mini icons.
Even if you compiled without them (until I patched it).

Bye

Dominik
-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Nadim Saeed <[email-masked]>
Date: Wed, 16 Dec 1998 09:57:44 -0800 (XXX)

On Wed - December.16.1998 [18:10:11 +0100],
 > Even if you compiled without them (until I patched it).

I see, but I would still argue that the extra space is NOT needed regardless
of whether one has MINI_ICONS defined or not.  The WinList is dynamically
sized and so if MINI_ICONS are all of a sudden included the size would
(should) increase on a need basis.  In other words,

--> spawn an xterm titled "XTERM"
--> note WinList size
--> spawn an xterm titled "LONGER.XTERM"
--> note again WinList size; its increased to accommodate the longer string.

I would assume MINI_ICONS could take the same approach with the extra spaces
coming in _only_ when they are needed and being excluded otherwise
irrespective of whether one compiled with MINI_ICONs or not.

Am I completely 'out to pasture' on this ?

 - Nadim

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 17 Dec 1998 00:09:40 +0100

> irrespective of whether one compiled with MINI_ICONs or not.

Well, you are right - in principle. But you said you took a look
at this and didn't understand it. Neither did I. It seems to
be non-trivial since a mini icon might be added or removed at any
time and no width recalculation is planned for this case. If you
find out where to begin patching just tell me (or create a patch).

Bye

Dominik
-- 
Dominik Vogt, [email-masked]
Reply-To: [email-masked]