Added a title label to Friend Request Toaster, little design changes.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5140 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2012-05-04 14:42:06 +00:00
parent 16501f62dd
commit 173ce82099
2 changed files with 48 additions and 36 deletions

View File

@ -20,6 +20,7 @@
#include "FriendRequestToaster.h"
#include "gui/FriendsDialog.h"
#include "gui/connect/FriendRequest.h"
#include "util/WidgetBackgroundImage.h"
#include <retroshare/rspeers.h>
@ -41,18 +42,21 @@ FriendRequestToaster::FriendRequestToaster(const std::string &gpgId, const QStri
ui.friendrequestButton->setEnabled(false);
}
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
QString peerName = QString::fromUtf8(details.name.c_str());
/* set informations */
ui.avatarWidget->setFrameType(AvatarWidget::NORMAL_FRAME);
if (knownPeer) {
ui.nameLabel->setText(QString::fromUtf8(details.name.c_str()));
ui.messageLabel->setText(tr("wants to be friend with you on RetroShare"));
ui.messageLabel->setText( peerName + " " + tr("wants to be friend with you on RetroShare"));
ui.avatarWidget->setDefaultAvatar(":/images/avatar_request.png");
} else {
ui.nameLabel->setText(sslName);
ui.messageLabel->setText(tr("Unknown (Incoming) Connect Attempt"));
ui.messageLabel->setText( sslName + " " + tr("Unknown (Incoming) Connect Attempt"));
ui.avatarWidget->setDefaultAvatar(":/images/avatar_request_unknown.png");
}
WidgetBackgroundImage::setBackgroundImage(ui.windowFrame, ":images/toaster/backgroundtoaster.png", WidgetBackgroundImage::AdjustNone);
}
void FriendRequestToaster::friendrequestButtonSlot()

View File

@ -50,7 +50,7 @@
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
<number>2</number>
</property>
<property name="rightMargin">
<number>6</number>
@ -87,20 +87,6 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="nameLabel">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Name</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
@ -139,6 +125,20 @@
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Friend Request</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
@ -150,7 +150,7 @@
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
<number>6</number>
</property>
<property name="horizontalSpacing">
<number>2</number>
@ -158,7 +158,7 @@
<property name="verticalSpacing">
<number>3</number>
</property>
<item row="0" column="0" rowspan="3">
<item row="0" column="0" rowspan="4">
<widget class="AvatarWidget" name="avatarWidget" native="true">
<property name="minimumSize">
<size>
@ -174,26 +174,34 @@
</property>
</widget>
</item>
<item row="1" column="1" rowspan="2">
<widget class="QLabel" name="messageLabel">
<property name="maximumSize">
<size>
<width>218</width>
<height>45</height>
</size>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="3" column="1">
<widget class="QPushButton" name="friendrequestButton">
<property name="font">
<font/>
</property>
<property name="text">
<string>Accept Friend Request</string>
<string>Confirm Friend Request</string>
</property>
</widget>
</item>
<item row="0" column="1" rowspan="3">
<widget class="QLabel" name="messageLabel">
<property name="maximumSize">
<size>
<width>218</width>
<height>35</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>