From 81e6d8323a8ad955ee998bb88e9167310f93ca64 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Wed, 24 Sep 2014 18:32:20 +0200 Subject: [PATCH] Keep avatar aspect ratio --- widget/widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/widget.cpp b/widget/widget.cpp index b2e1de6b5..21f02feec 100644 --- a/widget/widget.cpp +++ b/widget/widget.cpp @@ -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); }