fixed icon sizes in peerstatus/statusbar

This commit is contained in:
csoler 2016-01-19 22:16:25 -05:00
parent a2d8cc84fd
commit b382c3e846
3 changed files with 31 additions and 29 deletions

View File

@ -3,6 +3,9 @@
<file>icons/add_user_256.png</file> <file>icons/add_user_256.png</file>
<file>icons/anonymous_blue_128.png</file> <file>icons/anonymous_blue_128.png</file>
<file>icons/anonymous_green_128.png</file> <file>icons/anonymous_green_128.png</file>
<file>icons/aol.png</file>
<file>icons/avatar_128.png</file>
<file>icons/avatar_grey_128.png</file>
<file>icons/blank_blue_128.png</file> <file>icons/blank_blue_128.png</file>
<file>icons/blank_green_128.png</file> <file>icons/blank_green_128.png</file>
<file>icons/browsable_blue_128.png</file> <file>icons/browsable_blue_128.png</file>
@ -19,6 +22,7 @@
<file>icons/friends_128.png</file> <file>icons/friends_128.png</file>
<file>icons/global_switch_off_128.png</file> <file>icons/global_switch_off_128.png</file>
<file>icons/global_switch_on_128.png</file> <file>icons/global_switch_on_128.png</file>
<file>icons/gmail.png</file>
<file>icons/help_128.png</file> <file>icons/help_128.png</file>
<file>icons/help_64.png</file> <file>icons/help_64.png</file>
<file>icons/information_128.png</file> <file>icons/information_128.png</file>
@ -38,6 +42,7 @@
<file>icons/mail_old_128.png</file> <file>icons/mail_old_128.png</file>
<file>icons/mail_red_128.png</file> <file>icons/mail_red_128.png</file>
<file>icons/newsfeed128.png</file> <file>icons/newsfeed128.png</file>
<file>icons/outlook.png</file>
<file>icons/plugins_128.png</file> <file>icons/plugins_128.png</file>
<file>icons/posted_128.png</file> <file>icons/posted_128.png</file>
<file>icons/posted_red_128.png</file> <file>icons/posted_red_128.png</file>
@ -55,19 +60,18 @@
<file>icons/tile_downloaded_48.png</file> <file>icons/tile_downloaded_48.png</file>
<file>icons/tile_downloading_48.png</file> <file>icons/tile_downloading_48.png</file>
<file>icons/tile_inactive_48.png</file> <file>icons/tile_inactive_48.png</file>
<file>icons/tor-logo.png</file>
<file>icons/tor-off.png</file>
<file>icons/tor-on.png</file>
<file>icons/tor-starting.png</file>
<file>icons/tor-stopping.png</file>
<file>icons/user-away_64.png</file> <file>icons/user-away_64.png</file>
<file>icons/user-away-extended_64.png</file> <file>icons/user-away-extended_64.png</file>
<file>icons/user-busy_64.png</file> <file>icons/user-busy_64.png</file>
<file>icons/user-offline_64.png</file> <file>icons/user-offline_64.png</file>
<file>icons/user-online_64.png</file> <file>icons/user-online_64.png</file>
<file>icons/yellow_biohazard64.png</file>
<file>icons/gmail.png</file>
<file>icons/yahoo.png</file> <file>icons/yahoo.png</file>
<file>icons/outlook.png</file>
<file>icons/aol.png</file>
<file>icons/yandex.png</file> <file>icons/yandex.png</file>
<file>icons/tor-on.png</file> <file>icons/yellow_biohazard64.png</file>
<file>icons/tor-logo.png</file>
<file>icons/tor-off.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -40,8 +40,9 @@ DHTStatus::DHTStatus(QWidget *parent)
hbox->setSpacing(6); hbox->setSpacing(6);
statusDHT = new QLabel("<strong>" + tr("DHT") + ":</strong>", this ); statusDHT = new QLabel("<strong>" + tr("DHT") + ":</strong>", this );
statusDHT->setToolTip(tr("<p>Retroshare uses Bittorrent's DHT as a proxy for connexions. It does not \"store\" your IP in the DHT. Instead the DHT is used by your friends to get in \ statusDHT->setToolTip(tr("<p>Retroshare uses Bittorrent's DHT as a proxy for connexions. It does not \"store\" your IP in the DHT. \
contact to you when processing requests. The status bullet will turn green as soon as Retroshare is able to find one of your friends using DHT look-ups.</p>")) ; Instead the DHT is used by your friends to reach you while processing standard DHT requests. \
The status bullet will turn green as soon as Retroshare gets a DHT response from one of your friends.</p>")) ;
hbox->addWidget(statusDHT); hbox->addWidget(statusDHT);
dhtstatusLabel = new QLabel( this ); dhtstatusLabel = new QLabel( this );
@ -127,7 +128,7 @@ void DHTStatus::getDHTStatus()
{ {
// RED - some issue. // RED - some issue.
dhtstatusLabel->setPixmap(QPixmap(":/icons/bullet_red_128.png").scaledToHeight(S,Qt::SmoothTransformation)); dhtstatusLabel->setPixmap(QPixmap(":/icons/bullet_red_128.png").scaledToHeight(S,Qt::SmoothTransformation));
dhtstatusLabel->setToolTip( text + tr("DHT Error")); dhtstatusLabel->setToolTip( text + tr("No peer found in DHT"));
spaceLabel->setVisible(false); spaceLabel->setVisible(false);
dhtnetworkLabel->setVisible(false); dhtnetworkLabel->setVisible(false);

View File

@ -31,13 +31,13 @@ PeerStatus::PeerStatus(QWidget *parent)
hbox->setMargin(0); hbox->setMargin(0);
hbox->setSpacing(6); hbox->setSpacing(6);
iconLabel = new QLabel( this ); iconLabel = new QLabel( this );
iconLabel->setPixmap(QPixmap(":/images/user/identitygray16.png")); int S = QFontMetricsF(iconLabel->font()).height();
// iconLabel doesn't change over time, so we didn't need a minimum size iconLabel->setPixmap(QPixmap(":/icons/avatar_grey_128.png").scaledToHeight(S,Qt::SmoothTransformation));
hbox->addWidget(iconLabel); hbox->addWidget(iconLabel);
statusPeers = new QLabel( tr("Friends: 0/0"), this ); statusPeers = new QLabel( tr("Friends: 0/0"), this );
// statusPeers->setMinimumSize( statusPeers->frameSize().width() + 0, 0 );
hbox->addWidget(statusPeers); hbox->addWidget(statusPeers);
_compactMode = false; _compactMode = false;
@ -57,13 +57,10 @@ void PeerStatus::getPeerStatus(unsigned int nFriendCount, unsigned int nOnlineCo
else text = QString("<strong>%1:</strong> %2/%3 ").arg(tr("Friends")).arg(nOnlineCount).arg(nFriendCount); else text = QString("<strong>%1:</strong> %2/%3 ").arg(tr("Friends")).arg(nOnlineCount).arg(nFriendCount);
statusPeers -> setText(text); statusPeers -> setText(text);
} }
int S = QFontMetricsF(iconLabel->font()).height();
if (nOnlineCount > 0) if (nOnlineCount > 0)
{ iconLabel->setPixmap(QPixmap(":/icons/avatar_128.png").scaledToHeight(S,Qt::SmoothTransformation));
iconLabel->setPixmap(QPixmap(":/images/user/identity16.png"));
}
else else
{ iconLabel->setPixmap(QPixmap(":/icons/avatar_grey_128.png").scaledToHeight(S,Qt::SmoothTransformation));
iconLabel->setPixmap(QPixmap(":/images/user/identitygray16.png"));
}
} }