Skip to content

Commit

Permalink
Further fix aspect ratio of the pixmaps
Browse files Browse the repository at this point in the history
Turns out we were dividing custom aspect by the wrong number.  It should be
1M, not 10k.  Also put in a hacky little div to force the pixmap to be
vertically centered rather than top-justified (works here anyways).
  • Loading branch information
Beirdo committed Oct 6, 2011
1 parent b70f00f commit a518106
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/tv/classes/Program.php
Expand Up @@ -821,7 +821,7 @@ public function getAspect() {
case 13:
return 2.21/1;
case 14:
return $row['data']/10000.0;
return $row['data']/1000000.0;
default:
return 4/3;
}
Expand Down
6 changes: 5 additions & 1 deletion modules/tv/tmpl/default/recorded.php
Expand Up @@ -140,7 +140,11 @@
echo " <td class=\"list\" rowspan=\"2\">&nbsp;</td>\n";
?>
<td rowspan="2" class="x-pixmap<?php
if ($_SESSION['recorded_pixmaps']) { ?>">
if ($_SESSION['recorded_pixmaps']) { ?>"><?php
$padding = 39 - (50 / $show->getAspect());
if ($padding > 0) { ?>
<div style="height: <?php echo $padding; ?>px; width: 100px; float: left;">
</div><?php } ?>
<a class="x-pixmap" href="<?php echo root_url ?>tv/detail/<?php echo $show->chanid, '/', $show->recstartts ?>" title="<?php echo t('Recording Details') ?>"
><img src="<?php echo $show->thumb_url(100,0) ?>" width="100" height="<?php echo floor(100 / $show->getAspect()); ?>"></a>
<?php }
Expand Down

0 comments on commit a518106

Please sign in to comment.