attempt to fix icon sizes in identity dialog

This commit is contained in:
csoler 2017-12-07 17:20:27 +01:00
parent d2c8ba1a86
commit acbcba8a64
2 changed files with 25 additions and 5 deletions

View File

@ -221,7 +221,9 @@ IdDialog::IdDialog(QWidget *parent) :
connect(ui->inviteButton, SIGNAL(clicked()), this, SLOT(sendInvite()));
ui->avLabel_Person->setPixmap(QPixmap(":/icons/png/people.png"));
QFontMetricsF f(ui->avLabel_Person->font()) ;
ui->avLabel_Person->setPixmap(QPixmap(":/icons/png/people.png").scaled(f.height()*4,f.height()*4,Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
ui->avlabel_Circles->setPixmap(QPixmap(":/icons/png/circles.png"));
ui->headerTextLabel_Person->setText(tr("People"));
@ -1768,8 +1770,14 @@ void IdDialog::insertIdDetails(uint32_t token)
std::cerr << "Setting header frame image : " << pixmap.width() << " x " << pixmap.height() << std::endl;
#endif
ui->avLabel_Person->setPixmap(pixmap);
ui->avatarLabel->setPixmap(pixmap);
//ui->avLabel_Person->setPixmap(pixmap);
//ui->avatarLabel->setPixmap(pixmap);
QFontMetricsF f(ui->avLabel_Person->font()) ;
ui->avLabel_Person->setPixmap(pixmap.scaled(f.height()*4,f.height()*4,Qt::KeepAspectRatio,Qt::SmoothTransformation));
QFontMetricsF g(ui->inviteButton->font()) ;
ui->avatarLabel->setPixmap(pixmap.scaled(ui->inviteButton->width(),ui->inviteButton->width(),Qt::IgnoreAspectRatio,Qt::SmoothTransformation));
ui->avatarLabel->setScaledContents(true);
if (data.mPgpKnown)
{

View File

@ -290,6 +290,12 @@
<layout class="QVBoxLayout" name="scrollAreaWidgetContentsVLayout">
<item>
<widget class="QFrame" name="headerFramePerson">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
@ -477,6 +483,12 @@ border-image: url(:/images/closepressed.png)
</item>
<item row="0" column="0" rowspan="2">
<widget class="QLabel" name="avLabel_Person">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
@ -485,8 +497,8 @@ border-image: url(:/images/closepressed.png)
</property>
<property name="maximumSize">
<size>
<width>64</width>
<height>64</height>
<width>1000</width>
<height>1000</height>
</size>
</property>
<property name="styleSheet">