diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-02-27 16:35:01 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-02-27 16:35:01 +0100 |
commit | ac79b62359ecb4ab7e12c7d930460226da9bfbe8 (patch) | |
tree | 67e64a1db2af0507ae80e302ecdd1984a5e058dd /lib/App | |
parent | 5a366eae6ea2b09a61936f5c2e8436f4b9242538 (diff) |
Change internal --no-names handling
Diffstat (limited to 'lib/App')
-rwxr-xr-x | lib/App/Dthumb.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/App/Dthumb.pm b/lib/App/Dthumb.pm index a8014de..1b673c7 100755 --- a/lib/App/Dthumb.pm +++ b/lib/App/Dthumb.pm @@ -24,6 +24,7 @@ sub new { $conf->{size} //= 200; $conf->{spacing} //= 1.1; $conf->{quality} //= 75; + $conf->{names} = !$conf->{'no-names'}; $ref->{config} = $conf; @@ -123,7 +124,7 @@ sub create_thumbnails { sub create_thumbnail_html { my ($self, $file) = @_; my $div_width = $self->{config}->{size} * $self->{config}->{spacing}; - my $div_height = $div_width + ($self->{config}->{no_names} ? 0 : 10); + my $div_height = $div_width + ($self->{config}->{names} ? 10 : 0); $self->{html} .= sprintf( "<div style=\"%s; %s; %s; width: %dpx; height: %dpx\">\n", @@ -140,7 +141,7 @@ sub create_thumbnail_html { $self->{config}->{dir_thumbs}, ($file) x 2, ); - if (not $self->{config}->{no_names}) { + if ($self->{config}->{names}) { $self->{html} .= sprintf( "\t<br />\n" . "\t<a style=\"%s;\" href=\"%s\">%s</a>\n", |