Switch logical text extents for textwidth()

This commit is contained in:
Kris Maglione 2008-10-13 22:54:14 -04:00
parent 89f0ba2016
commit 7860d65c33
3 changed files with 4 additions and 5 deletions

View File

@ -165,7 +165,7 @@ menu_draw(void) {
r2.max.x = inputw;
drawstring(ibuf, font, r2, West, filter, cnorm.fg);
r2.min.x = textwidth(font, filter) + pad/2 + 1;
r2.min.x = textwidth(font, filter) + pad/2;
r2.max.x = r2.min.x + 2;
r2.min.y++;
r2.max.y--;

View File

@ -56,7 +56,6 @@ area_create(View *v, Area *pos, int scrn, uint w) {
int colnum;
Area *a;
if(v->areas) { /* Creating a column. */
minwidth = Dx(v->r)/NCOL;
i = v->floating == nil;
@ -91,9 +90,9 @@ area_create(View *v, Area *pos, int scrn, uint w) {
a->view = v;
a->id = id++;
if(v->areas)
a->mode = Coldefault;
else
a->mode = def.colmode;
else
a->mode = Coldefault;
a->screen = scrn;
a->frame = nil;
a->sel = nil;

View File

@ -675,7 +675,7 @@ textwidth_l(Font *font, char *text, uint len) {
XRectangle r;
if(font->set) {
Xutf8TextExtents(font->set, text, len, &r, nil);
Xutf8TextExtents(font->set, text, len, nil, &r);
return r.width;
}
return XTextWidth(font->xfont, text, len);