]> git.etc.gen.nz Git - picture-display.git/commitdiff
Center photos on the screen.
authorAndrew Ruthven <andrew@etc.gen.nz>
Fri, 26 Sep 2008 10:24:52 +0000 (22:24 +1200)
committerAndrew Ruthven <andrew@etc.gen.nz>
Fri, 26 Sep 2008 10:24:52 +0000 (22:24 +1200)
lib/Display/Plugins/FSpot.pm

index 6bcff214857afa061c2fac7790ceae41446706b9..8664785c72921aab4a41fc2a1d74dfd197e18a33 100644 (file)
@@ -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";