mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
Added to display the headshot images on the group item
This commit is contained in:
parent
589bb65324
commit
df0ed8e77e
@ -1,5 +1,8 @@
|
||||
<RCC>
|
||||
<qresource prefix="/" >
|
||||
<file>images/compose.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/">
|
||||
<file>images/compose.png</file>
|
||||
<file>images/like.png</file>
|
||||
<file>images/reply.png</file>
|
||||
<file>images/retweet.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -51,6 +51,25 @@ void WireGroupItem::setup()
|
||||
label_authorId->setId(mGroup.mMeta.mAuthorId);
|
||||
frame_details->setVisible(false);
|
||||
|
||||
if (mGroup.mHeadshot.mData )
|
||||
{
|
||||
QPixmap pixmap;
|
||||
if (GxsIdDetails::loadPixmapFromData(
|
||||
mGroup.mHeadshot.mData,
|
||||
mGroup.mHeadshot.mSize,
|
||||
pixmap,GxsIdDetails::ORIGINAL))
|
||||
{
|
||||
pixmap = pixmap.scaled(32,32);
|
||||
label_headshot->setPixmap(pixmap);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// default.
|
||||
QPixmap pixmap = QPixmap(":/icons/wire.png").scaled(32,32);
|
||||
label_headshot->setPixmap(pixmap);
|
||||
}
|
||||
|
||||
RsIdentityDetails idDetails ;
|
||||
rsIdentity->getIdDetails(mGroup.mMeta.mAuthorId,idDetails);
|
||||
|
||||
@ -59,6 +78,7 @@ void WireGroupItem::setup()
|
||||
if(idDetails.mAvatar.mSize == 0 || !GxsIdDetails::loadPixmapFromData(idDetails.mAvatar.mData, idDetails.mAvatar.mSize, pixmap,GxsIdDetails::SMALL))
|
||||
pixmap = GxsIdDetails::makeDefaultIcon(mGroup.mMeta.mAuthorId,GxsIdDetails::SMALL);
|
||||
|
||||
pixmap = pixmap.scaled(24,24);
|
||||
label_avatar->setPixmap(pixmap);
|
||||
|
||||
connect(toolButton_show, SIGNAL(clicked()), this, SLOT(show()));
|
||||
|
@ -38,7 +38,7 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_avatar">
|
||||
<widget class="QLabel" name="label_headshot">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
@ -102,6 +102,13 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_avatar">
|
||||
<property name="text">
|
||||
<string>Avatar</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="GxsIdLabel" name="label_authorId">
|
||||
<property name="text">
|
||||
|
BIN
retroshare-gui/src/gui/TheWire/images/like.png
Normal file
BIN
retroshare-gui/src/gui/TheWire/images/like.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
retroshare-gui/src/gui/TheWire/images/reply.png
Normal file
BIN
retroshare-gui/src/gui/TheWire/images/reply.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
retroshare-gui/src/gui/TheWire/images/retweet.png
Normal file
BIN
retroshare-gui/src/gui/TheWire/images/retweet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Loading…
Reference in New Issue
Block a user