Display Online and Total Friends on same Label, to get more free space on Statusbar

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3892 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-12-02 14:43:11 +00:00
parent 5153a82ffe
commit d9467c3a07

View File

@ -38,7 +38,7 @@ PeerStatus::PeerStatus(QWidget *parent)
// iconLabel doesn't change over time, so we didn't need a minimum size // iconLabel doesn't change over time, so we didn't need a minimum size
hbox->addWidget(iconLabel); hbox->addWidget(iconLabel);
statusPeers = new QLabel( tr("Online: 0 | Friends: 0 | Network: 0 "), this ); statusPeers = new QLabel( tr("Friends: 0/0"), this );
// statusPeers->setMinimumSize( statusPeers->frameSize().width() + 0, 0 ); // statusPeers->setMinimumSize( statusPeers->frameSize().width() + 0, 0 );
hbox->addWidget(statusPeers); hbox->addWidget(statusPeers);
@ -54,11 +54,12 @@ void PeerStatus::getPeerStatus(unsigned int nFriendCount, unsigned int nOnlineCo
out << nFriendCount << " "; out << nFriendCount << " ";
std::ostringstream out2; std::ostringstream out2;
out2 << nOnlineCount << " "; out2 << nOnlineCount << "";
statusPeers->setToolTip(tr("Online Friends/Total Friends") );
if (statusPeers) if (statusPeers)
statusPeers -> setText( "<strong>" + tr("Friends") + ":</strong> " + QString::fromStdString(out.str()) + " | <span style=\"color:#0000FF\"><strong>" + tr("Online") + ":</strong></span> " + QString::fromStdString(out2.str()) ); statusPeers -> setText( "<strong>" + tr("Friends") + ":</strong> " + QString::fromStdString(out2.str()) + "/" + QString::fromStdString(out.str()) );
if (nOnlineCount > 0) if (nOnlineCount > 0)
{ {