Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(ui): don't scale avatar to point of cropping in chat form header
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonybilinski committed Aug 26, 2018
1 parent 11131fa commit dc7ddbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/widget/maskablepixmapwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit dc7ddbe

Please sign in to comment.