diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-09-18 23:42:59 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-09-18 23:42:59 +0200 |
commit | 145a6410c735dfd771cc9f335273b34ea0d8df45 (patch) | |
tree | 5ae1be79aac2a57370d8bb694ff70a9f1d61f28c | |
parent | 42d04450f7a56b82bf1edb7b589f0d248aedc917 (diff) |
Fix margins of slide sorter
-rw-r--r-- | src/slide_sorter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slide_sorter.c b/src/slide_sorter.c index f68e5cb..d3c37ba 100644 --- a/src/slide_sorter.c +++ b/src/slide_sorter.c @@ -68,6 +68,8 @@ static gboolean draw_sig(GtkWidget *da, cairo_t *cr, struct slide_sorter *n) tw = n->p->thumb_slide_width; th = (n->p->slide_height/n->p->slide_width) * n->p->thumb_slide_width; + cairo_translate(cr, bw, bw); /* Border */ + for ( i=0; i<n->p->num_slides; i++ ) { int x = i % n->width; @@ -105,7 +107,7 @@ static void size_sig(GtkWidget *da, GdkRectangle *size, struct slide_sorter *n) th = (n->p->slide_height/n->p->slide_width) * n->p->thumb_slide_width; w = size->width; - n->width = w / (tw+2*bw); + n->width = (w-2*bw) / (tw+2*bw); h = (n->p->num_slides / n->width) * (th+2*bw); |