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;
|
||||
pixmap = pmap.scaled(width() - 2, height() - 2,
|
||||
Qt::KeepAspectRatioByExpanding,
|
||||
pixmap = pmap.scaled(width(), height(),
|
||||
Qt::KeepAspectRatio,
|
||||
Qt::SmoothTransformation);
|
||||
updatePixmap();
|
||||
update();
|
||||
|
@ -82,8 +82,8 @@ void MaskablePixmapWidget::setSize(QSize size)
|
|||
}
|
||||
|
||||
if (!unscaled.isNull()) {
|
||||
pixmap = unscaled.scaled(width() - 2, height() - 2,
|
||||
Qt::KeepAspectRatioByExpanding,
|
||||
pixmap = unscaled.scaled(width(), height(),
|
||||
Qt::KeepAspectRatio,
|
||||
Qt::SmoothTransformation);
|
||||
updatePixmap();
|
||||
update();
|
||||
|
|
Loading…
Reference in New Issue
Block a user