mirror of
https://github.com/KDE/kasts.git
synced 2024-12-27 00:43:25 +01:00
Fix height on resized images
This commit is contained in:
parent
6cf133d1d6
commit
55e13ab059
@ -177,6 +177,7 @@ QString Entry::adjustedContent(int width, int fontSize)
|
||||
if (widthParameter.length() != 0) {
|
||||
if (widthParameter.toInt() > width)
|
||||
imgTag.replace(match.captured(3), QStringLiteral("width=\"%1\"").arg(width));
|
||||
imgTag.replace(QRegularExpression(QStringLiteral("height=\"([0-9]+)(px)?\"")), QString());
|
||||
} else {
|
||||
imgTag.insert(4, QStringLiteral(" width=\"%1\"").arg(width));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user