Improve image thumbnailing and increase the size of Macro thumbnails

Summary:
Alternate proposal for D3635.

  - Works better with small images.
  - Produces a predictable thumbnail size.
  - Somewhat reasonable output on 3000x10 images.
  - Increase the size of Macro thumbnails to 240px.

Test Plan: {F20497}

Reviewers: vrana, chad

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3638
This commit is contained in:
epriestley
2012-10-08 13:26:10 -07:00
parent 74644d5210
commit 85d6f7a66e
6 changed files with 81 additions and 28 deletions

View File

@@ -99,8 +99,8 @@ final class PhabricatorMacroListController
$item = new PhabricatorPinboardItemView();
if ($file) {
$item->setImageURI($file->getThumb160x120URI());
$item->setImageSize(160, 120);
$item->setImageURI($file->getThumb220x165URI());
$item->setImageSize(220, 165);
if ($file->getAuthorPHID()) {
$author_handle = $this->getHandle($file->getAuthorPHID());
$item->appendChild(
@@ -112,7 +112,6 @@ final class PhabricatorMacroListController
'div',
array(),
'Created on '.$datetime));
}
$item->setURI($this->getApplicationURI('/edit/'.$macro->getID().'/'));
$item->setHeader($macro->getName());