[PATCH 4/4] print.c: Reduce vertical spacing between tank entries

Lubomir I. Ivanov neolit123 at gmail.com
Sun Feb 10 15:49:24 PST 2013


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

print_tanks():

It seems that
cairo_translate(cr, 0, logic_ext.height / (2 * (double) PANGO_SCALE));
with the multiplier (2 *) leaves no space between the tanks when testing
on Win32. On the other hand on Ubuntu there seems to be some extra space
bellow the four entries. Some sort of cairo inconsistency perhaps or we
may be doing something silly.

Lets change the multiplier to 1.5 to leave more vertical space between said
entries (and as a compromise). This way on Ubuntu the four entries fill
the entire box nicely, while on windows there is no overlapping of tank
text.

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 print.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/print.c b/print.c
index 76fea1f..fa699cc 100644
--- a/print.c
+++ b/print.c
@@ -258,7 +258,7 @@ static void print_tanks (struct dive *dive, cairo_t *cr, PangoLayout *layout, in
 		n++;
 		counter++;
 		pango_layout_get_extents(layout, NULL, &logic_ext);
-		cairo_translate (cr, 0, logic_ext.height / (2*(double) PANGO_SCALE));
+		cairo_translate (cr, 0, logic_ext.height / (1.5 * (double) PANGO_SCALE));
 	}
 	g_object_unref (layout);
 	cairo_restore(cr);
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list