Browse Source

Fix self avatar being cropped

pull/317/head
Tux3 / Mlkj / !Lev.uXFMLA 11 years ago
parent
commit
c1f24b27ba
  1. 3
      mainwindow.ui
  2. 3
      widget/widget.cpp

3
mainwindow.ui

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

3
widget/widget.cpp

@ -320,7 +320,8 @@ void Widget::onAvatarClicked() @@ -320,7 +320,8 @@ void Widget::onAvatarClicked()
void Widget::onSelfAvatarLoaded(const QPixmap& pic)
{
ui->profilePicture->setPixmap(pic);
QPixmap scaled = pic.scaledToWidth(40, Qt::SmoothTransformation);
ui->profilePicture->setPixmap(scaled);
}
void Widget::onConnected()

Loading…
Cancel
Save