From: Andrew Ruthven Date: Fri, 26 Sep 2008 10:24:52 +0000 (+1200) Subject: Center photos on the screen. X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b377a0845818afcd2ba040c8c8e762bbd294024b;p=picture-display.git Center photos on the screen. --- diff --git a/lib/Display/Plugins/FSpot.pm b/lib/Display/Plugins/FSpot.pm index 6bcff21..8664785 100644 --- a/lib/Display/Plugins/FSpot.pm +++ b/lib/Display/Plugins/FSpot.pm @@ -40,6 +40,14 @@ sub display_photo { $self->{'new'}->set_from_file($file); $self->{'new'}->set_opacity(0); $self->{'new'}->set_height($self->{'stage'}->get_height()); + $self->{'new'}->set_anchor_point( + $self->{'new'}->get_width / 2, + $self->{'new'}->get_height / 2 + ); + $self->{'new'}->set_position( + $self->{'stage'}->get_width / 2, + $self->{'stage'}->get_height / 2 + ); #$self->{'stage'}->add($self->{'new'}); #warn "Going to show $file\n";