From e8d582dbd44c375d06ff8cbc91fcb21f07a5963b Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Sun, 10 Mar 2013 14:50:01 +0200 Subject: [PATCH] Table print: Add an extra line bellow the table header In 'table print' for some launguages the table header titles can span on two lines and the text on the second line ends up overlapping with the table border. With this patch two lines are reserved for the table header instead of one. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- print.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/print.c b/print.c index a04725d0d..2d2476fef 100644 --- a/print.c +++ b/print.c @@ -797,8 +797,8 @@ static void draw_table(GtkPrintOperation *operation, GtkPrintContext *context, g /* Get the height for an only line but move two down */ pango_layout_get_extents(layout, NULL, &logic_ext); delta_y = logic_ext.height; - cairo_translate (cr, 0, 2.0 * delta_y / PANGO_SCALE); - y += 2.0 * delta_y / PANGO_SCALE; + cairo_translate (cr, 0, 3.0 * delta_y / PANGO_SCALE); + y += 3.0 * delta_y / PANGO_SCALE; for (i = 0; i < dive_table.nr - nr; i++) { dive = get_dive_for_printing(nr+i); if (!dive) @@ -811,7 +811,7 @@ static void draw_table(GtkPrintOperation *operation, GtkPrintContext *context, g /* and move down by the max. height of it */ cairo_translate (cr, 0, (max_ext + delta_y / 2) / PANGO_SCALE); y += (max_ext + delta_y / 2) / PANGO_SCALE; - if (y > 1.9 * h) + if (y > 1.95 * h) break; } if (paginate)