diff --git a/src/__celerity_resource_map__.php b/src/__celerity_resource_map__.php index 10e0cb2003..a67f9c0b0c 100644 --- a/src/__celerity_resource_map__.php +++ b/src/__celerity_resource_map__.php @@ -2924,7 +2924,7 @@ celerity_register_resource_map(array( ), 'phabricator-property-list-view-css' => array( - 'uri' => '/res/cd84ee5a/rsrc/css/layout/phabricator-property-list-view.css', + 'uri' => '/res/dfee0687/rsrc/css/layout/phabricator-property-list-view.css', 'type' => 'css', 'requires' => array( diff --git a/src/applications/files/controller/PhabricatorFileInfoController.php b/src/applications/files/controller/PhabricatorFileInfoController.php index a9a20c8123..14957f0314 100644 --- a/src/applications/files/controller/PhabricatorFileInfoController.php +++ b/src/applications/files/controller/PhabricatorFileInfoController.php @@ -146,9 +146,6 @@ final class PhabricatorFileInfoController extends PhabricatorFileController { if ($file->isViewableImage()) { - // TODO: Clean this up after Pholio (dark backgrounds, standardization, - // etc.) - $image = phutil_tag( 'img', array( @@ -163,7 +160,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController { ), $image); - $view->addTextContent($linked_image); + $view->addImageContent($linked_image); } return $view; diff --git a/src/applications/macro/controller/PhabricatorMacroViewController.php b/src/applications/macro/controller/PhabricatorMacroViewController.php index 94e0c4691f..61fef8ead9 100644 --- a/src/applications/macro/controller/PhabricatorMacroViewController.php +++ b/src/applications/macro/controller/PhabricatorMacroViewController.php @@ -157,7 +157,7 @@ final class PhabricatorMacroViewController $sub_view); if ($file) { - $view->addTextContent( + $view->addImageContent( phutil_tag( 'img', array( diff --git a/src/view/layout/PhabricatorPropertyListView.php b/src/view/layout/PhabricatorPropertyListView.php index 615f6e6156..21018330f4 100644 --- a/src/view/layout/PhabricatorPropertyListView.php +++ b/src/view/layout/PhabricatorPropertyListView.php @@ -59,6 +59,14 @@ final class PhabricatorPropertyListView extends AphrontView { return $this; } + public function addImageContent($content) { + $this->parts[] = array( + 'type' => 'image', + 'content' => $content, + ); + return $this; + } + public function invokeWillRenderEvent() { if ($this->object && $this->getUser() && !$this->invokedWillRenderEvent) { $event = new PhabricatorEvent( @@ -91,6 +99,7 @@ final class PhabricatorPropertyListView extends AphrontView { $items[] = $this->renderSectionPart($part); break; case 'text': + case 'image': $items[] = $this->renderTextPart($part); break; default: @@ -166,10 +175,15 @@ final class PhabricatorPropertyListView extends AphrontView { } private function renderTextPart(array $part) { + $classes = array(); + $classes[] = 'phabricator-property-list-text-content'; + if ($part['type'] == 'image') { + $classes[] = 'phabricator-property-list-image-content'; + } return phutil_tag( 'div', array( - 'class' => 'phabricator-property-list-text-content', + 'class' => implode($classes, ' '), ), $part['content']); } diff --git a/webroot/rsrc/css/layout/phabricator-property-list-view.css b/webroot/rsrc/css/layout/phabricator-property-list-view.css index 31d57de183..815073df6b 100644 --- a/webroot/rsrc/css/layout/phabricator-property-list-view.css +++ b/webroot/rsrc/css/layout/phabricator-property-list-view.css @@ -93,6 +93,10 @@ border-bottom: 1px solid #dbdbdb; } +.phabricator-property-list-image-content { + background: #282828; +} + /* In the common case where we immediately follow a header, move back up 30px so we snuggle next to the header. */