I've set my 'thumbnail' derivative dimensions to 140 x (blank), to take advantage of the sizing options.

However, gallery thumbnails are set to only 75 height, presumably because this line reads in a null value from the height:

  $height = $size['height'] + 75; // line 377 of gallery module

Not sure how this can be fixed though, as with the size set like that the height of the image could feasibly be anything...

Comments

Hetta’s picture

Why not change your thumbnail size to 140 x 140? Then your thumbnails will be 140 pixels, longest side.

Or change the "+ 75" line to something more to your liking; that's less than optimal, though, as you'll have to remember to change it every time you upgrade the image module.

drewish’s picture

marked http://drupal.org/node/196659 as a duplicate

Hetta’s picture

Status: Active » Fixed

No activity for two months - I'm marking this fixed.

joachim’s picture

Actually -- I wonder if anything can be done by setting height at exactly the pixel height of the image, and then margin-bottom to an em value (which will still be guesswork), and letting the element overflow into it.
Would need a LOT of testing on all browsers though, and I don't have access to all flavours of IE.

Hetta’s picture

Status: Fixed » Active
joachim’s picture

Title: Height on gallery thumbnails is too small if no height is set on the derivative size » Make height of gallery images more flexible
Version: 5.x-1.6 » 5.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new1.29 KB

This issue is more about http://drupal.org/node/134423#comment-715391 now...

Try this patch.
It's still not ideal, but as there's no way of knowing how long people's image titles are, for example, the height has to be an approximation.
At least by putting the extra height in the stylesheet rather than the element, users can tweak it for their own site in their theme's stylesheet.

Will need testing on different browsers, especially all the different IEs.

It's not made a *huge* difference to the height of the Random Image block, which was Hetta's point. If you want better, we could make another view type plugin 'Image list' made specifically for blocks.

Hetta’s picture

StatusFileSize
new14.76 KB

OK, changing the .css to

ul.images li {
  float: left;
  margin: 1em;
  margin-left: 0;
  margin-right: 2em;
  padding: 0;
  background: transparent;
  
  margin-bottom: 1em;
  padding-bottom: 2em;
  border: 1px dotted blue;
}
/* gallery view in a block */
.block ul.images li {
  margin:0 ;
  margin-top: 0;
  margin-bottom: 0;
  margin-right: 0;
  padding-bottom: 0;
}

gives block images where height = max thumbnail size, not actual image size.
Screenshot (firefox 2.0, linux) attached. (Konqueror off KDE 3.5.8, linux, looks the same.)

It's much better. I can live with this, although it's not yet optimal.

joachim’s picture

Oops. The dotted blue wasn't meant to be in there -- that was just for me to see the edges.

The reason I put padding-bottom:1em; in the block li is for the image name -- in your screenshot there wouldn't be enough room for that.

(BTW, I notice your images have bullets -- I thought we'd fixed that in another issue a while back. Reopen if you're using a standard theme.)

Hetta’s picture

StatusFileSize
new1.32 KB

This:

.block ul.images li {
  list-style-type: none;
  list-style-image: none;

takes care of the bullet.
I've amended your patch to that effect (and taken out the blue dotted line).

sun’s picture

Category: bug » feature
Status: Needs review » Closed (won't fix)

There are several advanced CSS techniques that claim to solve this somehow - however, to my knowledge, all of them either need special hacks for certain browsers or simply don't support certain browsers.

Ultimately, the most safe approach is to use a good old table. Requires no hacks and very little CSS.

Since we want to move away from custom image galleries anyway, and Views Bonus Pack already comes with a grid style, I'm marking this won't fix.

joachim’s picture

Tables ugh :(

FWIW I had a long chat with (arg forgot his name... was maybe going to work on the 3.x branch of image module) on IRC some months ago and we found the nicest way to do a gallery with CSS is the way http://www.deviantart.com/ does it, because the left over images can be centred rather than ragged left.