aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2013-09-18 23:42:59 +0200
committerThomas White <taw@bitwiz.org.uk>2013-09-18 23:42:59 +0200
commit145a6410c735dfd771cc9f335273b34ea0d8df45 (patch)
tree5ae1be79aac2a57370d8bb694ff70a9f1d61f28c
parent42d04450f7a56b82bf1edb7b589f0d248aedc917 (diff)
Fix margins of slide sorter
-rw-r--r--src/slide_sorter.c4
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);