From 92590a9498e0a5b5c356e94b9e61fc230304d3fd Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Tue, 9 Jan 2001 10:18:49 +0000 Subject: [PATCH] Fix drawing bug. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3418 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/register/gnome/gnucash-grid.c | 32 +++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/register/gnome/gnucash-grid.c b/src/register/gnome/gnucash-grid.c index 6954d1a922..33ae1cd1b0 100644 --- a/src/register/gnome/gnucash-grid.c +++ b/src/register/gnome/gnucash-grid.c @@ -380,24 +380,40 @@ draw_cell (GnucashGrid *grid, /* top */ draw_cell_line (drawable, grid->gc, bg_color, - x, y, x + width, y, + borders.top >= borders.left ? x : x + 1, + y, + (borders.top >= borders.right ? + x + width : x + width - 1), + y, borders.top); - /* right */ - draw_cell_line (drawable, grid->gc, bg_color, - x + width, y, x + width, y + height, - borders.right); - /* bottom */ draw_cell_line (drawable, grid->gc, bg_color, - x + width, y + height, x, y + height, + borders.bottom >= borders.left ? x : x + 1, + y + height, + (borders.bottom >= borders.right ? + x + width : x + width - 1), + y + height, borders.bottom); /* left */ draw_cell_line (drawable, grid->gc, bg_color, - x, y + height, x, y, + x, + borders.left > borders.top ? y : y + 1, + x, + (borders.left > borders.bottom ? + y + height : y + height - 1), borders.left); + /* right */ + draw_cell_line (drawable, grid->gc, bg_color, + x + width, + borders.right > borders.top ? y : y + 1, + x + width, + (borders.right > borders.bottom ? + y + height : y + height - 1), + borders.right); + /* dividing line */ if ((virt_loc.phys_row_offset == 0) && (table->dividing_row >= 0)) {