mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Keep avatar aspect ratio
This commit is contained in:
parent
c1f24b27ba
commit
81e6d8323a
|
@ -320,7 +320,7 @@ void Widget::onAvatarClicked()
|
|||
|
||||
void Widget::onSelfAvatarLoaded(const QPixmap& pic)
|
||||
{
|
||||
QPixmap scaled = pic.scaledToWidth(40, Qt::SmoothTransformation);
|
||||
QPixmap scaled = pic.scaled(40,40, Qt::KeepAspectRatio,Qt::SmoothTransformation);
|
||||
ui->profilePicture->setPixmap(scaled);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user