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:
parent
81e6d8323a
commit
52d18f9f18
|
@ -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>
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user