mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Enabled to display extern gxs Avatars on ID Details Dialog
Moved remove button under the add btn,for better look. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7901 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
63a3051d3c
commit
88c6af3b74
@ -153,12 +153,17 @@ void IdDetailsDialog::insertIdDetails(uint32_t token)
|
||||
//ui->lineEdit_GpgHash->setText(QString::fromStdString(data.mPgpIdHash.toStdString()));
|
||||
ui->lineEdit_GpgId->setText(QString::fromStdString(data.mPgpId.toStdString()));
|
||||
|
||||
QPixmap pix = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(data.mMeta.mGroupId))) ;
|
||||
QPixmap pixmap;
|
||||
|
||||
if(data.mImage.mSize > 0 && pixmap.loadFromData(data.mImage.mData, data.mImage.mSize, "PNG"))
|
||||
ui->avatarLabel->setPixmap(pixmap);
|
||||
else
|
||||
pixmap = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(data.mMeta.mGroupId))) ;
|
||||
ui->avatarLabel->setPixmap(pixmap); // we need to use the default pixmap here, generated from the ID
|
||||
|
||||
#ifdef ID_DEBUG
|
||||
std::cerr << "Setting header frame image : " << pix.width() << " x " << pix.height() << std::endl;
|
||||
#endif
|
||||
ui->avatarLabel->setPixmap(pix);
|
||||
|
||||
|
||||
if (data.mPgpKnown)
|
||||
{
|
||||
|
@ -197,7 +197,7 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="avatarLabel">
|
||||
<property name="sizePolicy">
|
||||
@ -229,11 +229,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="avatarButton">
|
||||
<property name="text">
|
||||
@ -243,34 +238,22 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="removeButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Remove Avatar</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/delete.png</normaloff>:/images/delete.png</iconset>
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>138</width>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user