Tim Phipps <timbo_at_computer.hpl.hp.com> wrote:
> Fvwm2.0.45 : the man page for FvwmButtons states that the (side) option can be
> used for swallowed windows and pixmaps. If I try:
>
> *FvwmButtons(Title(side) CPU Swallow xload xload)
>
> The label is drawn in the button until xload and then it is overwritten. What
> am I doing wrong?
It seems that the man page is not correct in this point. As far as I can
see the existing code deals with icons only. In the README it says that
side option is just a hack which will be replaced by a more general solution.
For the time being the attached patch might be useful. It will reserve space
for the title up to half of the width of the button.
Thomas
--- draw.c.orig Sat Jun 28 13:40:46 1997
+++ draw.c Sat Jun 28 21:11:20 1997
_at_@ -140,9 +140,17 @@
exit(2);
}
- if(b->flags&b_Title && font && !(buttonJustify(b)&b_Horizontal))
- ih -= font->ascent+font->descent;
-
+ if(b->flags&b_Title && font)
+ if (buttonJustify(b)&b_Horizontal)
+ {
+ int title_w;
+ if (2*(title_w=XTextWidth(font, b->title, strlen(b->title))) > iw)
+ iw /= 2;
+ else
+ iw -= title_w;
+ }
+ else
+ ih -= font->ascent+font->descent;
b->icon_w=iw;
b->icon_h=ih;
--
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 Sat Jun 28 1997 - 15:05:33 BST