Bug: newlines included in label text in gtklabel.c



In gtk_label_set in gtklabel.c, we have:

    p = strchr(p, '\n');
    if (p)
      {
	p++;
	row->len = (p - label->label) - row->index;
      }

IMHO the p++ should be done *after* calculating the row length, or
else the newline is included in the row. In X11 it apparently doesn't
matter as most fonts don't have anything for '\n' and the default
glyph is blank anyway (I guess that's what happens), but in Windows I
got ugly square boxes at the end of the rows of multi-line labels.

--tml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]