Branch: Tag:

2000-05-24

2000-05-24 12:03:08 by 0

Now accepts empty button title (again).

Rev: server/modules/graphics/gbutton.pike:1.48

25:   // must also be aligned left or right.       - constant cvs_version = "$Id: gbutton.pike,v 1.47 2000/05/01 06:17:36 nilsson Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.48 2000/05/24 12:03:08 jonasw Exp $";   constant thread_safe = 1;      #include <module.h>
208:    icon = roxen.low_decode_image(args->icd);       int i_width = icon && icon->img->xsize(); -  int i_spc = i_width ? 5 : 0; +  int i_spc = i_width && sizeof(text) && 5;       // Generate text    if (sizeof(text))
222:    int t_width = text_img && text_img->xsize();       // Compute text and icon placement -  req_width = text_img->xsize() + left + right + i_width + i_spc; +  req_width = (text_img && text_img->xsize()) + left + right + i_width + i_spc;       if (args->wi && (req_width < args->wi))    req_width = args->wi;