diff options
author | Søren Sandmann <sandmann@redhat.com> | 2008-06-10 11:46:58 -0400 |
---|---|---|
committer | Søren Sandmann <sandmann@redhat.com> | 2008-06-10 11:46:58 -0400 |
commit | 712ca26f96f11e00bdb4d40fc986c9cb2a824724 (patch) | |
tree | cd3eec1a8e047d3368851c729e90fa7c3da620d3 | |
parent | 62126825e06aae43ebd94d48fccf7807d668dce6 (diff) |
Draw thumbnails better
-rw-r--r-- | deck.c | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -54,7 +54,8 @@ deck_paint (Deck *deck, cairo_t *cr, int orig_x, int orig_y, - int width) + int width, + gboolean is_thumbnail) { int height; int i; @@ -83,7 +84,16 @@ deck_paint (Deck *deck, cairo_set_source_rgba (cr, (i + 1.0) / N_SLIDES, 0, 1 - (i + 1.0) / N_SLIDES, 1); - cairo_rectangle (cr, x + width/2 - 10, y + height/2 - 10, 20, 20); + if (is_thumbnail) + { + cairo_rectangle (cr, x + width/2 - 4, y + height/2 - 4, + 8, 8); + } + else + { + cairo_rectangle (cr, x + width/2 - 10, y + height/2 - 10, + 20, 20); + } cairo_fill (cr); } @@ -95,7 +105,7 @@ deck_paint_main (Deck *deck, int orig_x, int orig_y) { - deck_paint (deck, cr, orig_x, orig_y, deck->view_width); + deck_paint (deck, cr, orig_x, orig_y, deck->view_width, FALSE); } void @@ -104,7 +114,7 @@ deck_paint_thumbs (Deck *deck, int x, int y) { - deck_paint (deck, cr, x, y, deck->thumb_width); + deck_paint (deck, cr, x, y, deck->thumb_width, TRUE); } /* Returns the slide the user is likely looking |