mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 07:20:28 -04:00
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:
parent
16501f62dd
commit
173ce82099
2 changed files with 48 additions and 36 deletions
|
@ -20,6 +20,7 @@
|
||||||
#include "FriendRequestToaster.h"
|
#include "FriendRequestToaster.h"
|
||||||
#include "gui/FriendsDialog.h"
|
#include "gui/FriendsDialog.h"
|
||||||
#include "gui/connect/FriendRequest.h"
|
#include "gui/connect/FriendRequest.h"
|
||||||
|
#include "util/WidgetBackgroundImage.h"
|
||||||
|
|
||||||
#include <retroshare/rspeers.h>
|
#include <retroshare/rspeers.h>
|
||||||
|
|
||||||
|
@ -41,18 +42,21 @@ FriendRequestToaster::FriendRequestToaster(const std::string &gpgId, const QStri
|
||||||
ui.friendrequestButton->setEnabled(false);
|
ui.friendrequestButton->setEnabled(false);
|
||||||
}
|
}
|
||||||
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
|
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
|
||||||
|
|
||||||
|
QString peerName = QString::fromUtf8(details.name.c_str());
|
||||||
|
|
||||||
/* set informations */
|
/* set informations */
|
||||||
ui.avatarWidget->setFrameType(AvatarWidget::NORMAL_FRAME);
|
ui.avatarWidget->setFrameType(AvatarWidget::NORMAL_FRAME);
|
||||||
if (knownPeer) {
|
if (knownPeer) {
|
||||||
ui.nameLabel->setText(QString::fromUtf8(details.name.c_str()));
|
ui.messageLabel->setText( peerName + " " + tr("wants to be friend with you on RetroShare"));
|
||||||
ui.messageLabel->setText(tr("wants to be friend with you on RetroShare"));
|
|
||||||
ui.avatarWidget->setDefaultAvatar(":/images/avatar_request.png");
|
ui.avatarWidget->setDefaultAvatar(":/images/avatar_request.png");
|
||||||
} else {
|
} else {
|
||||||
ui.nameLabel->setText(sslName);
|
ui.messageLabel->setText( sslName + " " + tr("Unknown (Incoming) Connect Attempt"));
|
||||||
ui.messageLabel->setText(tr("Unknown (Incoming) Connect Attempt"));
|
|
||||||
ui.avatarWidget->setDefaultAvatar(":/images/avatar_request_unknown.png");
|
ui.avatarWidget->setDefaultAvatar(":/images/avatar_request_unknown.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WidgetBackgroundImage::setBackgroundImage(ui.windowFrame, ":images/toaster/backgroundtoaster.png", WidgetBackgroundImage::AdjustNone);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FriendRequestToaster::friendrequestButtonSlot()
|
void FriendRequestToaster::friendrequestButtonSlot()
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
|
@ -87,20 +87,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
@ -139,6 +125,20 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>4</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="horizontalSpacing">
|
<property name="horizontalSpacing">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
|
@ -158,7 +158,7 @@
|
||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" rowspan="3">
|
<item row="0" column="0" rowspan="4">
|
||||||
<widget class="AvatarWidget" name="avatarWidget" native="true">
|
<widget class="AvatarWidget" name="avatarWidget" native="true">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -174,26 +174,34 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" rowspan="2">
|
<item row="3" column="1">
|
||||||
<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">
|
|
||||||
<widget class="QPushButton" name="friendrequestButton">
|
<widget class="QPushButton" name="friendrequestButton">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font/>
|
<font/>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue