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:
parent
11131fa083
commit
dc7ddbebad
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user