Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Fri, 02 Nov 2012 20:48:49 UTC Commit: 9f32fdd1a4c54ba035c2f655bea6096c3b74fbe9 https://github.com/geany/geany/commit/9f32fdd1a4c54ba035c2f655bea6096c3b74fb...
Log Message: ----------- Printing: draw the vertical separator line more accurately
Use the dimensions and offsets used by Scintilla to position our separator line, since its position depends on where Scintilla drawn.
Closes #3580268.
Modified Paths: -------------- src/printing.c
Modified: src/printing.c 15 files changed, 7 insertions(+), 8 deletions(-) =================================================================== @@ -462,18 +462,17 @@ static void draw_page(GtkPrintOperation *operation, GtkPrintContext *context,
if (printing_prefs.print_line_numbers) { /* print a thin line between the line number margin and the data */ - gint y1 = 0, y2 = height; + gdouble y1 = dinfo->fr.rc.top * dinfo->sci_scale; + gdouble y2 = dinfo->fr.rc.bottom * dinfo->sci_scale; + gdouble x = dinfo->fr.rc.left * dinfo->sci_scale + dinfo->margin_width;
if (printing_prefs.print_page_header) - y1 += (dinfo->line_height * 3) - 2; /* "- 2": to connect the line number line to - * the page header frame */ - - if (printing_prefs.print_page_numbers) - y2 -= (dinfo->line_height * 2) - 2; + y1 -= 2 - 0.3; /* to connect the line number line to the page header frame, + * 2 is the border, and 0.3 the line width */
cairo_set_line_width(cr, 0.3); - cairo_move_to(cr, dinfo->margin_width, y1); - cairo_line_to(cr, dinfo->margin_width, y2); + cairo_move_to(cr, x, y1); + cairo_line_to(cr, x, y2); cairo_stroke(cr); }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).