1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Keep avatar aspect ratio (for real)

This commit is contained in:
Tux3 / Mlkj / !Lev.uXFMLA 2014-09-24 18:40:40 +02:00
parent 81e6d8323a
commit 52d18f9f18
2 changed files with 2 additions and 2 deletions

View File

@ -1472,7 +1472,7 @@ QSplitter:handle{
<pixmap resource="res.qrc">:/img/contact.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>true</bool>

View File

@ -302,7 +302,7 @@ void Widget::onAvatarClicked()
if (bytes.size() >= TOX_MAX_AVATAR_DATA_LENGTH)
{
pic = pic.scaledToWidth(64, Qt::SmoothTransformation);
pic = pic.scaled(64,64, Qt::KeepAspectRatio, Qt::SmoothTransformation);
bytes.clear();
buffer.open(QIODevice::WriteOnly);
pic.save(&buffer, "PNG");