From d2b48645e239d88d756cb460877c3456a3a33009 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 6 Jul 2011 16:23:20 +0000 Subject: [PATCH] Revert r91426 and followups r91427, r91430: Breaks Gallery-related parser tests --- includes/ImageGallery.php | 5 ++++- skins/common/shared.css | 5 ----- tests/parser/parserTests.txt | 12 ++++++------ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 5c2ed89fe3..d3773007a6 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -281,7 +281,10 @@ class ImageGallery { $thumbhtml = "\n\t\t\t" . '
' . htmlspecialchars( $img->getLastError() ) . '
'; } else { - $vpad = ( self::THUMB_PADDING + $this->mHeights - $thumb->height ) /2; + # We get layout problems with the margin, if the image is smaller + # than the line-height (17), so we add less margin in these cases. + $minThumbHeight = $thumb->height > 17 ? $thumb->height : 17; + $vpad = floor( ( self::THUMB_PADDING + $this->mHeights - $minThumbHeight ) /2 ); $imageParameters = array( 'desc-link' => true, diff --git a/skins/common/shared.css b/skins/common/shared.css index 77dad1e727..1c5ab444b5 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -584,11 +584,6 @@ li.gallerybox div.thumb { margin: 2px; } -li.gallerybox div.thumb img { - display: block; - margin: 0 auto; -} - div.gallerytext { overflow: hidden; font-size: 94%; diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index f62fadf3b7..b2b4980745 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -7465,14 +7465,14 @@ File:foobar.jpg|{{Test|unamedParam|alt=param}}|alt=galleryalt !! result