Changes calculations for the thumbnail size to avoid the appearance of a second row.