summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann <sandmann@redhat.com>2008-06-10 11:46:58 -0400
committerSøren Sandmann <sandmann@redhat.com>2008-06-10 11:46:58 -0400
commit712ca26f96f11e00bdb4d40fc986c9cb2a824724 (patch)
treecd3eec1a8e047d3368851c729e90fa7c3da620d3
parent62126825e06aae43ebd94d48fccf7807d668dce6 (diff)
Draw thumbnails better
-rw-r--r--deck.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/deck.c b/deck.c
index 970ba3e..74df0fc 100644
--- a/deck.c
+++ b/deck.c
@@ -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