From 3e648f553eedd8a69b904555dbd4bb7c308a2aa7 Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 20 Feb 2012 13:59:51 -0500 Subject: [PATCH] fixes #329 --- app/presenters/post_presenter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb index 0e2403700..3891e1960 100644 --- a/app/presenters/post_presenter.rb +++ b/app/presenters/post_presenter.rb @@ -20,7 +20,7 @@ class PostPresenter < Presenter end def self.margin_top(post) - if post.is_image? && post.image_height > post.image_width && post.image_height < 2 * post.image_width && post.image_height + if post.is_image? && post.image_height > post.image_width && post.image_height > Danbooru.config.small_image_width && post.image_height < 1.5 * post.image_width ratio = Danbooru.config.small_image_width.to_f / post.image_width.to_f offset = ((ratio * post.image_height) - Danbooru.config.small_image_width).to_i / 2 return "-#{offset}px"