From f7064eb9257f44654756f029bce052db54d5520b Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Fri, 26 Sep 2008 22:12:14 +1200 Subject: [PATCH] Make the photos retain their aspect ratios. Thank you to Emmanuele Bassi for all his help on IRC! --- lib/Display/Plugins/FSpot.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Display/Plugins/FSpot.pm b/lib/Display/Plugins/FSpot.pm index b191d46..6bcff21 100644 --- a/lib/Display/Plugins/FSpot.pm +++ b/lib/Display/Plugins/FSpot.pm @@ -36,8 +36,10 @@ sub display_photo { #warn "Loading $file\n"; $self->{'new'}->set_opacity(0); + $self->{'new'}->set_size(-1, -1); $self->{'new'}->set_from_file($file); $self->{'new'}->set_opacity(0); + $self->{'new'}->set_height($self->{'stage'}->get_height()); #$self->{'stage'}->add($self->{'new'}); #warn "Going to show $file\n"; @@ -124,7 +126,7 @@ LIMIT 1 for my $age ('new', 'old') { $self->{$age} = Clutter::Texture->new(); - $self->{$age}->set_size($self->{'stage'}->get_size()); + $self->{$age}->set('request_mode' => 'width-for-height'); $self->{$age}->set('keep-aspect-ratio' => 1); $self->{$age}->set('sync-size' => 1); $self->{$age}->set_opacity(0); -- 2.30.2