Fix height on resized images

This commit is contained in:
Tobias Fella 2021-05-12 01:28:41 +02:00
parent 6cf133d1d6
commit 55e13ab059

View File

@ -177,6 +177,7 @@ QString Entry::adjustedContent(int width, int fontSize)
if (widthParameter.length() != 0) { if (widthParameter.length() != 0) {
if (widthParameter.toInt() > width) if (widthParameter.toInt() > width)
imgTag.replace(match.captured(3), QStringLiteral("width=\"%1\"").arg(width)); imgTag.replace(match.captured(3), QStringLiteral("width=\"%1\"").arg(width));
imgTag.replace(QRegularExpression(QStringLiteral("height=\"([0-9]+)(px)?\"")), QString());
} else { } else {
imgTag.insert(4, QStringLiteral(" width=\"%1\"").arg(width)); imgTag.insert(4, QStringLiteral(" width=\"%1\"").arg(width));
} }