mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
5153a82ffe
commit
d9467c3a07
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user