Skip to content

Commit be3a188

Browse files
committed
[Bug 16754] Make sure line spacing is correct when displaying images
1 parent 804dd78 commit be3a188

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

engine/src/block.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
3838

3939
#include "exec-interface.h"
4040

41+
#define IMAGE_BLOCK_LEADING 2
4142
static MCRectangle
4243
MCBlockMakeRectangle(double x, double y,
4344
double width, double height)
@@ -1953,8 +1954,9 @@ coord_t MCBlock::GetDescent() const
19531954

19541955
coord_t MCBlock::GetLeading() const
19551956
{
1957+
// PM-2016-02-15: [[ Bug 16754 ]] Use same value for leading as in pre-LC 8 when an image is present
19561958
if (flags & F_HAS_IMAGE && atts->image != NULL)
1957-
return GetAscent()+GetDescent();
1959+
return IMAGE_BLOCK_LEADING;
19581960
else
19591961
return MCFontGetLeading(m_font);
19601962
}

0 commit comments

Comments
 (0)