From f39a2aeee9967a147e43f23e794657e7f78c31f1 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Wed, 16 Feb 2011 23:21:19 +0000 Subject: [PATCH] followup r82181 and r82215 to fix the FIXME and botched fix for FIXME. Patch supplied by DieBuche (bug #27338) along with screenshot demonstrating fix. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Took out fix for bug #27458 (“ has a white background now”) since bug it conflicts with a fix for bug #26470. --- includes/ImageGallery.php | 10 +++++++--- skins/common/shared.css | 4 ---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/ImageGallery.php b/includes/ImageGallery.php index 7d161e0fbe..7290e5918e 100644 --- a/includes/ImageGallery.php +++ b/includes/ImageGallery.php @@ -275,7 +275,11 @@ class ImageGallery $thumbhtml = "\n\t\t\t".'
' . htmlspecialchars( $img->getLastError() ) . '
'; } else { - $vpad = floor(( 30 + $this->mHeights - $thumb->height ) /2); + //We get layout problems with the margin, if the image is smaller + //than the line-height, so we less margin in these cases. + $minThumbHeight = $thumb->height > 17 ? $thumb->height : 17; + $vpad = floor(( 30 + $this->mHeights - $minThumbHeight ) /2); + $imageParameters = array( 'desc-link' => true, @@ -288,11 +292,11 @@ class ImageGallery # Set both fixed width and min-height. $thumbhtml = "\n\t\t\t". - '
' + '
' # Auto-margin centering for block-level elements. Needed now that we have video # handlers since they may emit block-level elements as opposed to simple tags. # ref http://css-discuss.incutio.com/?page=CenteringBlockElement - . '
' + . '
' . $thumb->toHtml( $imageParameters ) . '
'; // Call parser transform hook diff --git a/skins/common/shared.css b/skins/common/shared.css index c613e294fc..0f15395551 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -780,10 +780,6 @@ li.gallerybox div.thumb { margin: 2px; } -li.gallerybox div.thumb a.image img { - vertical-align: text-top; -} - div.gallerytext { overflow: hidden; font-size: 94%; -- 2.20.1