Set Light gray background color for the identicons for better look n feel.

Fixed to scale QLabel content.
Moved to display Avatars on ID Dialog into a QLabel

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7907 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2015-02-03 22:16:21 +00:00
parent 7642ba1c1f
commit 0ebc1223b3
5 changed files with 67 additions and 12 deletions

View File

@ -172,6 +172,9 @@
<property name="text">
<string extracomment="Click here to change your avatar">Your Avatar</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>

View File

@ -557,7 +557,8 @@ void IdDialog::insertIdDetails(uint32_t token)
#ifdef ID_DEBUG
std::cerr << "Setting header frame image : " << pix.width() << " x " << pix.height() << std::endl;
#endif
ui->headerFrame->setHeaderImage(pixmap);
ui->headerFrame->setHeaderImage(QPixmap(":/images/user/personal64.png"));
ui->avatarLabel->setPixmap(pixmap);
if (data.mPgpKnown)
{

View File

@ -224,14 +224,18 @@
<string>Identity Info</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="margin">
<number>6</number>
</property>
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>6</number>
</property>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Identity ID :</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="PgpId_LB">
<property name="text">
@ -279,13 +283,6 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Identity ID :</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="PgpName_LB">
<property name="text">
@ -325,6 +322,57 @@
</item>
</layout>
</item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="avatarLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>128</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>128</width>
<height>128</height>
</size>
</property>
<property name="text">
<string extracomment="Click here to change your avatar">Your Avatar</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>

View File

@ -221,6 +221,9 @@
<property name="text">
<string extracomment="Click here to change your avatar">Your Avatar</string>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>

View File

@ -701,7 +701,7 @@ QImage GxsIdDetails::drawIdentIcon( QString hash, quint16 width, bool rotate)
/// start with blank 3x3 identicon
QPixmap pixmap = QPixmap(totalsize, totalsize);
pixmap.fill(QColor::fromRgb(200,200,200));
pixmap.fill(QColor::fromRgb(230,230,230));
// Generate corner sprites
QList<qreal> corner = getSprite(csh, size);