* Hiltjo Posthuma 2017-09-02 12:08
> I think its better to do:
> 
> > +   snprintf(idxstr, sizeof(idxstr), "%d", idx);
 
point taken. less magic numbers. I'll wait a bit in case someone else
may want to review and will update the patch. 

btw, this part below is pure heuristics, which turn out to work in the
cases I tested. feel free to sugest other magic numbers. 

> > +           drw_setfontset(d, fonts[numfontidx]);
> > +           drw_text(d,
> > +                   xw.w / 2 + numpos * (xw.w / 2 - 3 * 
> > fonts[numfontidx]->h),
> > +                   xw.h - 3 * fonts[numfontidx]->h,
> > +                   4 * d->fonts->h,
> > +                   d->fonts->h,
> > +                   1,
> > +                   idxstr,
> > +                   0);

Just had a look and will change it a bit: will pad the numbers with
spaces

> > +   snprintf(idxstr, sizeof(idxstr), "% 3d", idx);

and have 3 times the hight, rather than 4 as width. should be enough to
suit most fonts.

cheers
--s

Reply via email to