1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(ui): don't scale avatar to point of cropping in chat form header

This commit is contained in:
Anthony Bilinski 2018-08-25 23:31:37 -07:00
parent 11131fa083
commit dc7ddbebad
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -58,8 +58,8 @@ void MaskablePixmapWidget::setPixmap(const QPixmap& pmap)
} }
unscaled = pmap; unscaled = pmap;
pixmap = pmap.scaled(width() - 2, height() - 2, pixmap = pmap.scaled(width(), height(),
Qt::KeepAspectRatioByExpanding, Qt::KeepAspectRatio,
Qt::SmoothTransformation); Qt::SmoothTransformation);
updatePixmap(); updatePixmap();
update(); update();
@ -82,8 +82,8 @@ void MaskablePixmapWidget::setSize(QSize size)
} }
if (!unscaled.isNull()) { if (!unscaled.isNull()) {
pixmap = unscaled.scaled(width() - 2, height() - 2, pixmap = unscaled.scaled(width(), height(),
Qt::KeepAspectRatioByExpanding, Qt::KeepAspectRatio,
Qt::SmoothTransformation); Qt::SmoothTransformation);
updatePixmap(); updatePixmap();
update(); update();