Don't ignore forced width for textbox with background image.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Benoît Ryder 2011-01-31 01:06:30 +01:00 committed by Uli Schlachter
parent 89c3e7411d
commit 1513f399e1
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ textbox_extents(lua_State *L, widget_t *widget)
int bgi_height = image_getheight(d->bg_image);
int bgi_width = image_getwidth(d->bg_image);
double ratio = d->bg_resize ? (double) geometry.height / bgi_height : 1;
geometry.width = MAX(d->extents.width + d->margin.left + d->margin.right, MAX(d->width, bgi_width * ratio));
geometry.width = MAX(geometry.width, bgi_width * ratio);
}
geometry.x = geometry.y = 0;