More image dialog fixes

This commit is contained in:
Nicolas Werner 2022-05-10 03:19:53 +02:00
parent 8f6ed458a6
commit a6b2be112b
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
35 changed files with 95 additions and 50 deletions

View file

@ -193,7 +193,8 @@ MxcAnimatedImage::updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeD
}
QSizeF r = img.size();
r.scale(size(), Qt::KeepAspectRatio);
if (height() != 0 || width() != 0)
r.scale(size(), Qt::KeepAspectRatio);
n->setRect((width() - r.width()) / 2, (height() - r.height()) / 2, r.width(), r.height());
n->setFiltering(QSGTexture::Linear);