mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
grey user icon when online is 0 on statusbar
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1158 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
69914204db
commit
1c5db15325
@ -320,6 +320,7 @@
|
||||
<file>images/user/identityavaiblecyan24.png</file>
|
||||
<file>images/user/agt_forum24.png</file>
|
||||
<file>images/user/identity32.png</file>
|
||||
<file>images/user/identitygray16.png</file>
|
||||
<file>images/user/add_user16.png</file>
|
||||
<file>images/user/personal64.png</file>
|
||||
<file>images/user/kuser24.png</file>
|
||||
|
BIN
retroshare-gui/src/gui/images/user/identitygray16.png
Normal file
BIN
retroshare-gui/src/gui/images/user/identitygray16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 688 B |
@ -43,7 +43,7 @@ PeerStatus::PeerStatus(QWidget *parent)
|
||||
hbox->setSpacing(6);
|
||||
|
||||
iconLabel = new QLabel( this );
|
||||
iconLabel->setPixmap(QPixmap::QPixmap(":/images/user/identity16.png"));
|
||||
iconLabel->setPixmap(QPixmap::QPixmap(":/images/user/identitygray16.png"));
|
||||
// iconLabel doesn't change over time, so we didn't need a minimum size
|
||||
hbox->addWidget(iconLabel);
|
||||
|
||||
@ -61,26 +61,36 @@ PeerStatus::~PeerStatus()
|
||||
|
||||
void PeerStatus::getPeerStatus()
|
||||
{
|
||||
/* set users/friends/network */
|
||||
/* set users/friends/network */
|
||||
|
||||
std::list<std::string> ids;
|
||||
rsPeers->getOnlineList(ids);
|
||||
int online = ids.size();
|
||||
std::list<std::string> ids;
|
||||
rsPeers->getOnlineList(ids);
|
||||
int online = ids.size();
|
||||
|
||||
ids.clear();
|
||||
rsPeers->getFriendList(ids);
|
||||
int friends = ids.size();
|
||||
ids.clear();
|
||||
rsPeers->getFriendList(ids);
|
||||
int friends = ids.size();
|
||||
|
||||
ids.clear();
|
||||
rsPeers->getOthersList(ids);
|
||||
int others = 1 + ids.size();
|
||||
ids.clear();
|
||||
rsPeers->getOthersList(ids);
|
||||
int others = 1 + ids.size();
|
||||
|
||||
std::ostringstream out2;
|
||||
out2 << "<span style=\"color:#008000\"><strong>Online: </strong></span>" << online << " | <span style=\"color:#0000FF\"><strong>Friends: </strong></span>" << friends << " | <strong>Network: </strong>" << others << " ";
|
||||
std::ostringstream out2;
|
||||
out2 << "<span style=\"color:#008000\"><strong>Online: </strong></span>" << online << " | <span style=\"color:#0000FF\"><strong>Friends: </strong></span>" << friends << " | <strong>Network: </strong>" << others << " ";
|
||||
|
||||
|
||||
if (statusPeers)
|
||||
statusPeers -> setText(QString::fromStdString(out2.str()));
|
||||
if (statusPeers)
|
||||
statusPeers -> setText(QString::fromStdString(out2.str()));
|
||||
|
||||
if (online > 0)
|
||||
{
|
||||
iconLabel->setPixmap(QPixmap::QPixmap(":/images/user/identity16.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
iconLabel->setPixmap(QPixmap::QPixmap(":/images/user/identitygray16.png"));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user