calculate carousel width and height correctly
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 12 Oct 2009 00:17:44 +0000 (02:17 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 12 Oct 2009 00:17:44 +0000 (02:17 +0200)
bin/mplayer.pl

index e303a68..103776e 100755 (executable)
@@ -226,12 +226,15 @@ sub html5tv {
 
        write_file 'www/media.html', $html;
 
+       my $carousel_width  = $html5tv->{video}->{width}  + 4 * 8; # offset 7 + border 1
+       my $carousel_height = $html5tv->{slide}->{height} + 2;
+
        write_file 'www/media/video.css', qq|
 
 .jcarousel-skin-ie7 .jcarousel-container-horizontal,
 .jcarousel-skin-ie7 .jcarousel-clip-horizontal {
-       width: $html5tv->{video}->{width}px;
-       height: $html5tv->{slide}->{height}px;
+       width: ${carousel_width}px;
+       height: ${carousel_height}px;
 }
 
 .jcarousel-skin-ie7 .jcarousel-item {