jwidget: fix background overwriting 1 pixel in each direction

This commit is contained in:
Lephenixnoir 2022-06-20 01:17:31 +01:00
parent 9a70a6398e
commit c90b3f1fb2
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495
2 changed files with 2 additions and 2 deletions

View file

@ -377,7 +377,7 @@ void jwidget_render(void *w, int x, int y);
//---
/* jwidget_type(): Get a widget's human-readable type name
This is the name specified in the jwidgetPoly structure for the type. */
This is the name specified in the jwidget_poly structure for the type. */
char const *jwidget_type(void *w);
#endif /* _J_JWIDGET */

View file

@ -618,7 +618,7 @@ void jwidget_render(void *w0, int x, int y)
/* TODO: jwidget_render(): More border types */
if(g->background_color != C_NONE) {
drect(x1 + b.left, y1 + b.top, x2, y2, g->background_color);
drect(x1 + b.left, y1 + b.top, x2-1, y2-1, g->background_color);
}
/* Call the polymorphic render function at the top-left content point */