Reworked design of the toaster and moved internal stylesheets to the file Standard.qss.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5506 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-09-03 10:58:11 +00:00
parent 1a8c9d9416
commit 2a460051e5
15 changed files with 733 additions and 886 deletions

View File

@ -190,3 +190,15 @@ ConnectFriendWizard QWizardPage#FriendRequestPage > QFrame#frame {
border-radius:6px; border-radius:6px;
background: white; background: white;
} }
/* Toaster */
ChatToaster > QFrame#windowFrame,
ChatLobbyToaster > QFrame#windowFrame,
DownloadToaster > QFrame#windowFrame,
FriendRequestToaster > QFrame#windowFrame,
GroupChatToaster > QFrame#windowFrame,
MessageToaster >QFrame#windowFrame,
OnlineToaster > QFrame#windowFrame {
background-image: url(:/images/toaster/backgroundtoaster.png);
}

View File

@ -32,11 +32,11 @@ ChatLobbyToaster::ChatLobbyToaster(const std::string &peerId, const QString &nam
this->peerId = peerId; this->peerId = peerId;
connect(ui.chatButton, SIGNAL(clicked()), SLOT(chatButtonSlot())); connect(ui.toasterButton, SIGNAL(clicked()), SLOT(chatButtonSlot()));
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide())); connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
/* set informations */ /* set informations */
ui.messageLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); ui.textLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE));
ui.avatarWidget->setFrameType(AvatarWidget::NORMAL_FRAME); ui.avatarWidget->setFrameType(AvatarWidget::NORMAL_FRAME);
ui.avatarWidget->setDefaultAvatar(":images/user/agt_forum64.png"); ui.avatarWidget->setDefaultAvatar(":images/user/agt_forum64.png");
@ -54,7 +54,7 @@ ChatLobbyToaster::ChatLobbyToaster(const std::string &peerId, const QString &nam
} }
} }
} }
ui.nameLabel->setText(lobbyName); ui.toasterLabel->setText(lobbyName);
} }
void ChatLobbyToaster::chatButtonSlot() void ChatLobbyToaster::chatButtonSlot()

View File

@ -22,7 +22,7 @@
<height>100</height> <height>100</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -39,32 +39,72 @@
</property> </property>
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="margin"> <property name="margin">
<number>0</number> <number>2</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>0</number> <number>2</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout" name="_2"> <layout class="QHBoxLayout">
<property name="leftMargin"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<property name="topMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="horizontalSpacing"> <item>
<number>6</number> <widget class="QLabel" name="toasterImage">
</property> <property name="minimumSize">
<property name="verticalSpacing"> <size>
<number>0</number> <width>16</width>
</property> <height>16</height>
<item row="0" column="3"> </size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toasterLabel">
<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>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="closeButton"> <widget class="QPushButton" name="closeButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -87,90 +127,26 @@
</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">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QGridLayout" name="_3"> <layout class="QGridLayout">
<property name="leftMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
</property> </property>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="chatButton"> <widget class="QPushButton" name="toasterButton">
<property name="font">
<font/>
</property>
<property name="text"> <property name="text">
<string>Show Chat Lobby</string> <string>Show Chat Lobby</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" rowspan="2"> <item row="1" column="1">
<widget class="QLabel" name="messageLabel"> <widget class="QLabel" name="textLabel">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>218</width> <width>218</width>
<height>45</height> <height>43</height>
</size> </size>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
@ -178,8 +154,8 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" rowspan="3"> <item row="0" column="0" rowspan="2">
<widget class="AvatarWidget" name="avatarWidget" native="true"> <widget class="AvatarWidget" name="avatarWidget">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>70</width> <width>70</width>

View File

@ -32,12 +32,12 @@ ChatToaster::ChatToaster(const std::string &peerId, const QString &message) : QW
this->peerId = peerId; this->peerId = peerId;
connect(ui.chatButton, SIGNAL(clicked()), SLOT(chatButtonSlot())); connect(ui.toasterButton, SIGNAL(clicked()), SLOT(chatButtonSlot()));
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide())); connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
/* set informations */ /* set informations */
ui.messageLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); ui.textLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE));
ui.nameLabel->setText(QString::fromUtf8(rsPeers->getPeerName(peerId).c_str())); ui.toasterLabel->setText(QString::fromUtf8(rsPeers->getPeerName(peerId).c_str()));
ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME); ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME);
ui.avatarWidget->setId(peerId, false); ui.avatarWidget->setId(peerId, false);
} }

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>300</width> <width>300</width>
<height>102</height> <height>100</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
@ -19,10 +19,10 @@
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>300</width> <width>300</width>
<height>102</height> <height>100</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -39,32 +39,72 @@
</property> </property>
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="margin"> <property name="margin">
<number>0</number> <number>2</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>0</number> <number>2</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout" name="_2"> <layout class="QHBoxLayout">
<property name="leftMargin"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<property name="topMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="horizontalSpacing"> <item>
<number>6</number> <widget class="QLabel" name="toasterImage">
</property> <property name="minimumSize">
<property name="verticalSpacing"> <size>
<number>0</number> <width>16</width>
</property> <height>16</height>
<item row="0" column="3"> </size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toasterLabel">
<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>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="closeButton"> <widget class="QPushButton" name="closeButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -87,87 +127,26 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</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">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QGridLayout" name="_3"> <layout class="QGridLayout">
<property name="leftMargin">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
</property> </property>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="chatButton"> <widget class="QPushButton" name="toasterButton">
<property name="font">
<font/>
</property>
<property name="text"> <property name="text">
<string>Show Chat</string> <string>Show Chat</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" rowspan="2"> <item row="1" column="1">
<widget class="QLabel" name="messageLabel"> <widget class="QLabel" name="textLabel">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>218</width> <width>218</width>
<height>45</height> <height>43</height>
</size> </size>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
@ -175,8 +154,8 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" rowspan="3"> <item row="0" column="0" rowspan="2">
<widget class="AvatarWidget" name="avatarWidget" native="true"> <widget class="AvatarWidget" name="avatarWidget">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>70</width> <width>70</width>

View File

@ -36,11 +36,11 @@ DownloadToaster::DownloadToaster(const std::string &hash, const QString &name) :
fileHash = hash; fileHash = hash;
/* connect buttons */ /* connect buttons */
connect(ui.spbClose, SIGNAL(clicked()), this, SLOT(hide())); connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(hide()));
connect(ui.startButton, SIGNAL(clicked()), this, SLOT(play())); connect(ui.toasterButton, SIGNAL(clicked()), this, SLOT(play()));
/* set informations */ /* set informations */
ui.labelTitle->setText(name); ui.textLabel->setText(name);
} }
void DownloadToaster::play() void DownloadToaster::play()

View File

@ -10,199 +10,178 @@
<height>100</height> <height>100</height>
</rect> </rect>
</property> </property>
<widget class="QLabel" name="labelTitle"> <property name="minimumSize">
<property name="geometry"> <size>
<rect> <width>300</width>
<x>10</x> <height>100</height>
<y>30</y> </size>
<width>241</width> </property>
<height>61</height> <property name="maximumSize">
</rect> <size>
<width>300</width>
<height>100</height>
</size>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>0</number>
</property> </property>
<property name="palette"> <property name="margin">
<palette> <number>0</number>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>247</green>
<blue>221</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>127</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>247</green>
<blue>221</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>117</red>
<green>116</green>
<blue>118</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>255</red>
<green>247</green>
<blue>221</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property> </property>
<property name="text"> <item>
<string/> <widget class="QFrame" name="windowFrame">
</property> <property name="frameShape">
<property name="wordWrap"> <enum>QFrame::WinPanel</enum>
<bool>true</bool> </property>
</property> <property name="frameShadow">
</widget> <enum>QFrame::Raised</enum>
<widget class="QToolButton" name="startButton"> </property>
<property name="geometry"> <layout class="QGridLayout">
<rect> <property name="margin">
<x>260</x> <number>2</number>
<y>43</y> </property>
<width>31</width> <property name="spacing">
<height>31</height> <number>2</number>
</rect> </property>
</property> <item row="0" column="0">
<property name="focusPolicy"> <layout class="QHBoxLayout">
<enum>Qt::NoFocus</enum> <property name="spacing">
</property> <number>6</number>
<property name="toolTip"> </property>
<string>Start file</string> <property name="leftMargin">
</property> <number>0</number>
<property name="text"> </property>
<string/> <property name="rightMargin">
</property> <number>0</number>
<property name="icon"> </property>
<iconset resource="../images.qrc"> <item>
<normaloff>:/images/player_play.png</normaloff>:/images/player_play.png</iconset> <widget class="QLabel" name="toasterImage">
</property> <property name="minimumSize">
<property name="iconSize"> <size>
<size> <width>16</width>
<width>22</width> <height>16</height>
<height>22</height> </size>
</size> </property>
</property> <property name="maximumSize">
<property name="autoRaise"> <size>
<bool>true</bool> <width>16</width>
</property> <height>16</height>
</widget> </size>
<widget class="QLabel" name="lblTitle"> </property>
<property name="geometry"> <property name="pixmap">
<rect> <pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
<x>30</x> </property>
<y>10</y> <property name="scaledContents">
<width>241</width> <bool>true</bool>
<height>20</height> </property>
</rect> </widget>
</property> </item>
<property name="text"> <item>
<string>&lt;b&gt;Download completed&lt;/b&gt;</string> <widget class="QLabel" name="toasterLabel">
</property> <property name="font">
</widget> <font>
<widget class="QLabel" name="label"> <pointsize>9</pointsize>
<property name="geometry"> <weight>75</weight>
<rect> <bold>true</bold>
<x>4</x> </font>
<y>10</y> </property>
<width>21</width> <property name="text">
<height>21</height> <string notr="true">Download completed</string>
</rect> </property>
</property> </widget>
<property name="text"> </item>
<string/> <item>
</property> <spacer>
<property name="pixmap"> <property name="orientation">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="scaledContents"> <property name="sizeHint" stdset="0">
<bool>true</bool> <size>
</property> <width>0</width>
</widget> <height>10</height>
<widget class="QToolButton" name="spbClose"> </size>
<property name="geometry"> </property>
<rect> </spacer>
<x>270</x> </item>
<y>10</y> <item>
<width>20</width> <widget class="QPushButton" name="closeButton">
<height>20</height> <property name="minimumSize">
</rect> <size>
</property> <width>18</width>
<property name="focusPolicy"> <height>18</height>
<enum>Qt::NoFocus</enum> </size>
</property> </property>
<property name="toolTip"> <property name="maximumSize">
<string>Close</string> <size>
</property> <width>18</width>
<property name="text"> <height>18</height>
<string/> </size>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../images.qrc"> <iconset resource="../images.qrc">
<normaloff>:/images/closenormal.png</normaloff>:/images/closenormal.png</iconset> <normaloff>:/images/closenormal.png</normaloff>:/images/closenormal.png</iconset>
</property> </property>
<property name="autoRaise"> <property name="flat">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QLabel" name="background"> </item>
<property name="geometry"> </layout>
<rect> </item>
<x>0</x> <item row="1" column="0">
<y>0</y> <layout class="QHBoxLayout">
<width>300</width> <item>
<height>100</height> <widget class="QLabel" name="textLabel">
</rect> <property name="minimumSize">
</property> <size>
<property name="pixmap"> <width>0</width>
<pixmap resource="../images.qrc">:/images/toaster/backgroundtoaster.png</pixmap> <height>70</height>
</property> </size>
</widget> </property>
<zorder>background</zorder> <property name="maximumSize">
<zorder>labelTitle</zorder> <size>
<zorder>startButton</zorder> <width>255</width>
<zorder>lblTitle</zorder> <height>70</height>
<zorder>label</zorder> </size>
<zorder>spbClose</zorder> </property>
</widget>
</item>
<item>
<widget class="QToolButton" name="toasterButton">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Start file</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/player_play.png</normaloff>:/images/player_play.png</iconset>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>startButton</tabstop> <tabstop>toasterButton</tabstop>
<tabstop>spbClose</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>

View File

@ -20,7 +20,6 @@
#include "FriendRequestToaster.h" #include "FriendRequestToaster.h"
#include "gui/FriendsDialog.h" #include "gui/FriendsDialog.h"
#include "gui/connect/ConnectFriendWizard.h" #include "gui/connect/ConnectFriendWizard.h"
#include "util/WidgetBackgroundImage.h"
#include <retroshare/rspeers.h> #include <retroshare/rspeers.h>
@ -37,9 +36,9 @@ FriendRequestToaster::FriendRequestToaster(const std::string &gpgId, const QStri
} }
if (knownPeer) { if (knownPeer) {
connect(ui.friendrequestButton, SIGNAL(clicked()), SLOT(friendrequestButtonSlot())); connect(ui.toasterButton, SIGNAL(clicked()), SLOT(friendrequestButtonSlot()));
} else { } else {
ui.friendrequestButton->setEnabled(false); ui.toasterButton->setEnabled(false);
} }
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide())); connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
@ -48,15 +47,12 @@ FriendRequestToaster::FriendRequestToaster(const std::string &gpgId, const QStri
/* set informations */ /* set informations */
ui.avatarWidget->setFrameType(AvatarWidget::NORMAL_FRAME); ui.avatarWidget->setFrameType(AvatarWidget::NORMAL_FRAME);
if (knownPeer) { if (knownPeer) {
ui.messageLabel->setText( peerName + " " + tr("wants to be friend with you on RetroShare")); ui.textLabel->setText( peerName + " " + 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.messageLabel->setText( sslName + " " + tr("Unknown (Incoming) Connect Attempt")); ui.textLabel->setText( sslName + " " + 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()

View File

@ -22,7 +22,7 @@
<height>100</height> <height>100</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -39,32 +39,72 @@
</property> </property>
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="margin"> <property name="margin">
<number>0</number> <number>2</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>0</number> <number>2</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout"> <layout class="QHBoxLayout">
<property name="leftMargin"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<property name="topMargin"> <property name="leftMargin">
<number>2</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="horizontalSpacing"> <item>
<number>6</number> <widget class="QLabel" name="toasterImage">
</property> <property name="minimumSize">
<property name="verticalSpacing"> <size>
<number>0</number> <width>16</width>
</property> <height>16</height>
<item row="0" column="3"> </size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toasterLabel">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">Friend Request</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="closeButton"> <widget class="QPushButton" name="closeButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -87,79 +127,15 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</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> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="leftMargin"> <property name="spacing">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>6</number>
</property>
<property name="horizontalSpacing">
<number>2</number> <number>2</number>
</property> </property>
<property name="verticalSpacing"> <item row="0" column="0" rowspan="2">
<number>3</number> <widget class="AvatarWidget" name="avatarWidget">
</property>
<item row="0" column="0" rowspan="4">
<widget class="AvatarWidget" name="avatarWidget" native="true">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>70</width> <width>70</width>
@ -174,8 +150,8 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="1" column="1">
<widget class="QPushButton" name="friendrequestButton"> <widget class="QPushButton" name="toasterButton">
<property name="font"> <property name="font">
<font/> <font/>
</property> </property>
@ -184,19 +160,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" rowspan="3"> <item row="0" column="1">
<widget class="QLabel" name="messageLabel"> <widget class="QLabel" name="textLabel">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>218</width> <width>218</width>
<height>35</height> <height>45</height>
</size> </size>
</property> </property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property> </property>
@ -220,9 +191,6 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<tabstops>
<tabstop>closeButton</tabstop>
</tabstops>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
</resources> </resources>

View File

@ -30,12 +30,12 @@ GroupChatToaster::GroupChatToaster(const std::string &peerId, const QString &mes
this->peerId = peerId; this->peerId = peerId;
connect(ui.chatButton, SIGNAL(clicked()), SLOT(chatButtonSlot())); connect(ui.toasterButton, SIGNAL(clicked()), SLOT(chatButtonSlot()));
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide())); connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
/* set informations */ /* set informations */
ui.messageLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE)); ui.textLabel->setText(RsHtml().formatText(NULL, message, RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS | RSHTML_FORMATTEXT_CLEANSTYLE));
ui.nameLabel->setText(QString::fromUtf8(rsPeers->getPeerName(peerId).c_str())); ui.toasterLabel->setText(QString::fromUtf8(rsPeers->getPeerName(peerId).c_str()));
ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME); ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME);
ui.avatarWidget->setDefaultAvatar(":/images/user/personal64.png"); ui.avatarWidget->setDefaultAvatar(":/images/user/personal64.png");
ui.avatarWidget->setId(peerId, false); ui.avatarWidget->setId(peerId, false);

View File

@ -22,7 +22,7 @@
<height>100</height> <height>100</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -39,32 +39,72 @@
</property> </property>
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="margin"> <property name="margin">
<number>0</number> <number>2</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>0</number> <number>2</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout"> <layout class="QHBoxLayout">
<property name="leftMargin"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<property name="topMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="horizontalSpacing"> <item>
<number>6</number> <widget class="QLabel" name="toasterImage">
</property> <property name="minimumSize">
<property name="verticalSpacing"> <size>
<number>0</number> <width>16</width>
</property> <height>16</height>
<item row="0" column="3"> </size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toasterLabel">
<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>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="closeButton"> <widget class="QPushButton" name="closeButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -87,99 +127,26 @@
</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">
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="leftMargin"> <property name="spacing">
<number>4</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>4</number>
</property>
<property name="horizontalSpacing">
<number>2</number> <number>2</number>
</property> </property>
<property name="verticalSpacing"> <item row="0" column="1">
<number>3</number> <widget class="QPushButton" name="toasterButton">
</property> <property name="text">
<item row="0" column="0" rowspan="3"> <string>Show Group Chat</string>
<widget class="AvatarWidget" name="avatarWidget" native="true">
<property name="minimumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>70</width>
<height>70</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" rowspan="2"> <item row="1" column="1">
<widget class="QLabel" name="messageLabel"> <widget class="QLabel" name="textLabel">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>218</width> <width>218</width>
<height>45</height> <height>43</height>
</size> </size>
</property> </property>
<property name="wordWrap"> <property name="wordWrap">
@ -187,13 +154,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="0" rowspan="2">
<widget class="QPushButton" name="chatButton"> <widget class="AvatarWidget" name="avatarWidget">
<property name="font"> <property name="minimumSize">
<font/> <size>
<width>70</width>
<height>70</height>
</size>
</property> </property>
<property name="text"> <property name="maximumSize">
<string>Show Group Chat</string> <size>
<width>70</width>
<height>70</height>
</size>
</property> </property>
</widget> </widget>
</item> </item>
@ -212,9 +185,6 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<tabstops>
<tabstop>closeButton</tabstop>
</tabstops>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
</resources> </resources>

View File

@ -28,16 +28,16 @@ MessageToaster::MessageToaster(const std::string &peerId, const QString &title,
ui.setupUi(this); ui.setupUi(this);
/* connect buttons */ /* connect buttons */
connect(ui.closebtn, SIGNAL(clicked()), this, SLOT(hide())); connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(hide()));
//connect(ui.openmessagebtn, SIGNAL(clicked()), this, SLOT(openmessageClicked())); //connect(ui.openmessagebtn, SIGNAL(clicked()), this, SLOT(openmessageClicked()));
connect(ui.openmessagetoolButton, SIGNAL(clicked()), this, SLOT(openmessageClicked())); connect(ui.toasterButton, SIGNAL(clicked()), this, SLOT(openmessageClicked()));
/* set informations */ /* set informations */
ui.subjectline->setText(tr("Sub:") + " " + title); ui.subjectLabel->setText(tr("Sub:") + " " + title);
ui.subjectline->setToolTip(title); ui.subjectLabel->setToolTip(title);
ui.contentBrowser->setText(message); ui.textLabel->setText(message);
ui.contentBrowser->setToolTip(message); ui.textLabel->setToolTip(message);
ui.lblTitle->setText(ui.lblTitle->text() + " " + QString::fromUtf8(rsPeers->getPeerName(peerId).c_str())); ui.toasterLabel->setText(ui.toasterLabel->text() + " " + QString::fromUtf8(rsPeers->getPeerName(peerId).c_str()));
} }
void MessageToaster::openmessageClicked() void MessageToaster::openmessageClicked()

View File

@ -10,182 +10,192 @@
<height>100</height> <height>100</height>
</rect> </rect>
</property> </property>
<widget class="QLabel" name="background"> <property name="minimumSize">
<property name="geometry"> <size>
<rect> <width>300</width>
<x>0</x> <height>100</height>
<y>0</y> </size>
<width>300</width> </property>
<height>100</height> <property name="maximumSize">
</rect> <size>
<width>300</width>
<height>100</height>
</size>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>0</number>
</property> </property>
<property name="pixmap"> <property name="margin">
<pixmap resource="../images.qrc">:/images/toaster/backgroundtoaster.png</pixmap> <number>0</number>
</property> </property>
</widget> <item>
<widget class="QToolButton" name="openmessagetoolButton"> <widget class="QFrame" name="windowFrame">
<property name="geometry"> <property name="frameShape">
<rect> <enum>QFrame::WinPanel</enum>
<x>10</x> </property>
<y>30</y> <property name="frameShadow">
<width>61</width> <enum>QFrame::Raised</enum>
<height>61</height> </property>
</rect> <layout class="QGridLayout">
</property> <property name="margin">
<property name="maximumSize"> <number>2</number>
<size> </property>
<width>64</width> <property name="spacing">
<height>64</height> <number>2</number>
</size> </property>
</property> <item row="0" column="0">
<property name="text"> <layout class="QHBoxLayout">
<string/> <property name="spacing">
</property> <number>6</number>
<property name="icon"> </property>
<iconset resource="../images.qrc"> <property name="leftMargin">
<normaloff>:/images/folder_inbox64.png</normaloff>:/images/folder_inbox64.png</iconset> <number>0</number>
</property> </property>
<property name="iconSize"> <property name="rightMargin">
<size> <number>0</number>
<width>64</width> </property>
<height>64</height> <item>
</size> <widget class="QLabel" name="toasterImage">
</property> <property name="minimumSize">
<property name="autoRaise"> <size>
<bool>true</bool> <width>16</width>
</property> <height>16</height>
</widget> </size>
<widget class="QLabel" name="lblTitle"> </property>
<property name="geometry"> <property name="maximumSize">
<rect> <size>
<x>40</x> <width>16</width>
<y>10</y> <height>16</height>
<width>221</width> </size>
<height>16</height> </property>
</rect> <property name="pixmap">
</property> <pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
<property name="font"> </property>
<font> <property name="scaledContents">
<weight>75</weight> <bool>true</bool>
<bold>true</bold> </property>
</font> </widget>
</property> </item>
<property name="text"> <item>
<string>1 new Message from</string> <widget class="QLabel" name="toasterLabel">
</property> <property name="font">
</widget> <font>
<widget class="QLabel" name="label"> <pointsize>9</pointsize>
<property name="geometry"> <weight>75</weight>
<rect> <bold>true</bold>
<x>10</x> </font>
<y>10</y> </property>
<width>16</width> <property name="text">
<height>16</height> <string notr="true">1 new Message from</string>
</rect> </property>
</property> </widget>
<property name="text"> </item>
<string/> <item>
</property> <spacer>
<property name="pixmap"> <property name="orientation">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="scaledContents"> <property name="sizeHint" stdset="0">
<bool>true</bool> <size>
</property> <width>0</width>
</widget> <height>10</height>
<widget class="QToolButton" name="closebtn"> </size>
<property name="geometry"> </property>
<rect> </spacer>
<x>270</x> </item>
<y>10</y> <item>
<width>20</width> <widget class="QPushButton" name="closeButton">
<height>20</height> <property name="minimumSize">
</rect> <size>
</property> <width>18</width>
<property name="focusPolicy"> <height>18</height>
<enum>Qt::NoFocus</enum> </size>
</property> </property>
<property name="toolTip"> <property name="maximumSize">
<string>Close</string> <size>
</property> <width>18</width>
<property name="accessibleName"> <height>18</height>
<string notr="true">Close button</string> </size>
</property> </property>
<property name="accessibleDescription"> <property name="icon">
<string notr="true">Close the information dialog</string> <iconset resource="../images.qrc">
</property> <normaloff>:/images/closenormal.png</normaloff>:/images/closenormal.png</iconset>
<property name="text"> </property>
<string/> <property name="flat">
</property> <bool>true</bool>
<property name="icon"> </property>
<iconset resource="../images.qrc"> </widget>
<normaloff>:/images/closenormal.png</normaloff>:/images/closenormal.png</iconset> </item>
</property> </layout>
<property name="autoRaise"> </item>
<bool>true</bool> <item row="1" column="0">
</property> <layout class="QGridLayout">
</widget> <property name="spacing">
<widget class="QTextBrowser" name="contentBrowser"> <number>2</number>
<property name="enabled"> </property>
<bool>false</bool> <item row="0" column="0" rowspan="2">
</property> <widget class="QToolButton" name="toasterButton">
<property name="geometry"> <property name="maximumSize">
<rect> <size>
<x>80</x> <width>64</width>
<y>50</y> <height>64</height>
<width>201</width> </size>
<height>41</height> </property>
</rect> <property name="icon">
</property> <iconset resource="../images.qrc">
<property name="autoFillBackground"> <normaloff>:/images/folder_inbox64.png</normaloff>:/images/folder_inbox64.png</iconset>
<bool>false</bool> </property>
</property> <property name="iconSize">
<property name="styleSheet"> <size>
<string notr="true">background-color: transparent; <width>64</width>
border: none;</string> <height>64</height>
</property> </size>
<property name="verticalScrollBarPolicy"> </property>
<enum>Qt::ScrollBarAlwaysOff</enum> <property name="autoRaise">
</property> <bool>true</bool>
<property name="horizontalScrollBarPolicy"> </property>
<enum>Qt::ScrollBarAlwaysOff</enum> </widget>
</property> </item>
<property name="html"> <item row="0" column="1">
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <widget class="QLabel" name="subjectLabel">
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; <property name="maximumSize">
p, li { white-space: pre-wrap; } <size>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; <width>224</width>
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Message&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <height>16777215</height>
</property> </size>
</widget> </property>
<widget class="QLineEdit" name="subjectline"> <property name="text">
<property name="enabled"> <string notr="true">Subject</string>
<bool>false</bool> </property>
</property> </widget>
<property name="geometry"> </item>
<rect> <item row="1" column="1">
<x>80</x> <widget class="QLabel" name="textLabel">
<y>30</y> <property name="sizePolicy">
<width>211</width> <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<height>20</height> <horstretch>0</horstretch>
</rect> <verstretch>0</verstretch>
</property> </sizepolicy>
<property name="autoFillBackground"> </property>
<bool>false</bool> <property name="maximumSize">
</property> <size>
<property name="styleSheet"> <width>224</width>
<string notr="true">background-color: transparent; <height>53</height>
border: none; </size>
color: black;</string> </property>
</property> <property name="wordWrap">
<property name="text"> <bool>true</bool>
<string>Subject</string> </property>
</property> </widget>
</widget> </item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget> </widget>
<tabstops>
<tabstop>closebtn</tabstop>
</tabstops>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
</resources> </resources>

View File

@ -19,7 +19,6 @@
#include "OnlineToaster.h" #include "OnlineToaster.h"
#include "gui/chat/ChatDialog.h" #include "gui/chat/ChatDialog.h"
#include "util/WidgetBackgroundImage.h"
#include <retroshare/rspeers.h> #include <retroshare/rspeers.h>
@ -31,15 +30,13 @@ OnlineToaster::OnlineToaster(const std::string &peerId) : QWidget(NULL)
this->peerId = peerId; this->peerId = peerId;
/* connect buttons */ /* connect buttons */
connect(ui.messageButton, SIGNAL(clicked()), SLOT(chatButtonSlot())); connect(ui.toasterButton, SIGNAL(clicked()), SLOT(chatButtonSlot()));
connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide())); connect(ui.closeButton, SIGNAL(clicked()), SLOT(hide()));
/* set informations */ /* set informations */
ui.messageLabel->setText(QString::fromUtf8(rsPeers->getPeerName(peerId).c_str())); ui.textLabel->setText(QString::fromUtf8(rsPeers->getPeerName(peerId).c_str()));
ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME); ui.avatarWidget->setFrameType(AvatarWidget::STATUS_FRAME);
ui.avatarWidget->setId(peerId, false); ui.avatarWidget->setId(peerId, false);
WidgetBackgroundImage::setBackgroundImage(ui.windowFrame, ":images/toaster/backgroundtoaster.png", WidgetBackgroundImage::AdjustNone);
} }
void OnlineToaster::chatButtonSlot() void OnlineToaster::chatButtonSlot()

View File

@ -10,13 +10,19 @@
<height>100</height> <height>100</height>
</rect> </rect>
</property> </property>
<property name="minimumSize">
<size>
<width>300</width>
<height>100</height>
</size>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>300</width> <width>300</width>
<height>100</height> <height>100</height>
</size> </size>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
@ -33,32 +39,72 @@
</property> </property>
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="margin"> <property name="margin">
<number>0</number> <number>2</number>
</property> </property>
<property name="spacing"> <property name="spacing">
<number>0</number> <number>2</number>
</property> </property>
<item row="0" column="0"> <item row="0" column="0">
<layout class="QGridLayout"> <layout class="QHBoxLayout">
<property name="leftMargin"> <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<property name="topMargin"> <property name="leftMargin">
<number>2</number> <number>0</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="horizontalSpacing"> <item>
<number>6</number> <widget class="QLabel" name="toasterImage">
</property> <property name="minimumSize">
<property name="verticalSpacing"> <size>
<number>0</number> <width>16</width>
</property> <height>16</height>
<item row="0" column="3"> </size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toasterLabel">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">RetroShare</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="closeButton"> <widget class="QPushButton" name="closeButton">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -76,123 +122,40 @@
<iconset resource="../images.qrc"> <iconset resource="../images.qrc">
<normaloff>:/images/closenormal.png</normaloff>:/images/closenormal.png</iconset> <normaloff>:/images/closenormal.png</normaloff>:/images/closenormal.png</iconset>
</property> </property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="flat"> <property name="flat">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="minimumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/rstray3.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">RetroShare</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<layout class="QGridLayout"> <layout class="QGridLayout">
<property name="leftMargin"> <property name="spacing">
<number>6</number>
</property>
<property name="topMargin">
<number>2</number> <number>2</number>
</property> </property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="horizontalSpacing">
<number>9</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="1" column="1" rowspan="2">
<widget class="QLabel" name="messageLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="messageButton"> <widget class="QPushButton" name="toasterButton">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: #238;</string>
</property>
<property name="text"> <property name="text">
<string>Friend Online</string> <string>Friend Online</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="1" column="1">
<spacer> <widget class="QLabel" name="textLabel">
<property name="orientation"> <property name="maximumSize">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>213</width>
<height>10</height> <height>43</height>
</size> </size>
</property> </property>
</spacer> <property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item row="0" column="0" rowspan="4"> <item row="0" column="0" rowspan="2">
<widget class="AvatarWidget" name="avatarWidget" native="true"> <widget class="AvatarWidget" name="avatarWidget">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>70</width> <width>70</width>
@ -222,9 +185,6 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<tabstops>
<tabstop>closeButton</tabstop>
</tabstops>
<resources> <resources>
<include location="../images.qrc"/> <include location="../images.qrc"/>
</resources> </resources>