aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2016-03-28 17:36:33 +0200
committerThomas White <taw@bitwiz.org.uk>2016-03-28 17:36:33 +0200
commit10b73d26ba94ead1021106df4e9886335d28eb7b (patch)
tree138eb5f274f8a6c46089fcf7a7f51a03affc5bb8
parent13ab84211488aa422c43756737664dec62bebb90 (diff)
Fixed flowed height (and reduce spaces between paragraphs)
-rw-r--r--src/frame.c2
-rw-r--r--src/render.c4
-rw-r--r--src/sc_editor.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/frame.c b/src/frame.c
index c21589f..3f3e708 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -350,7 +350,7 @@ double total_height(struct frame *fr)
int i;
double t = 0.0;
for ( i=0; i<fr->n_paras; i++ ) {
- t += fr->paras[i]->height + 20.0;
+ t += fr->paras[i]->height;
}
return t;
}
diff --git a/src/render.c b/src/render.c
index 2096492..0a64fc6 100644
--- a/src/render.c
+++ b/src/render.c
@@ -217,7 +217,7 @@ static int draw_frame(cairo_t *cr, struct frame *fr, ImageStore *is,
cairo_translate(cr, fr->pad_l, fr->pad_t);
for ( i=0; i<fr->n_paras; i++ ) {
- double cur_h = paragraph_height(fr->paras[i]) + 20.0;
+ double cur_h = paragraph_height(fr->paras[i]);
cairo_save(cr);
cairo_translate(cr, 0.0, hpos);
@@ -226,7 +226,7 @@ static int draw_frame(cairo_t *cr, struct frame *fr, ImageStore *is,
render_paragraph(cr, fr->paras[i]);
} /* else paragraph is not visible */
- hpos += cur_h + 20.0;
+ hpos += cur_h;
cairo_restore(cr);
}
diff --git a/src/sc_editor.c b/src/sc_editor.c
index 9b81980..1658122 100644
--- a/src/sc_editor.c
+++ b/src/sc_editor.c
@@ -98,7 +98,7 @@ static void update_size(SCEditor *e)
{
if ( e->flow ) {
e->w = e->top->w;
- e->h = total_height(e->top);
+ e->h = total_height(e->top) + e->top->pad_t + e->top->pad_b;
e->log_w = e->w;
e->log_h = e->h;
e->top->h = e->h;