From b382c3e8462bf38f475f5e144dbe6cf7cdc411c1 Mon Sep 17 00:00:00 2001 From: csoler Date: Tue, 19 Jan 2016 22:16:25 -0500 Subject: [PATCH] fixed icon sizes in peerstatus/statusbar --- retroshare-gui/src/gui/icons.qrc | 18 ++++++---- .../src/gui/statusbar/dhtstatus.cpp | 7 ++-- .../src/gui/statusbar/peerstatus.cpp | 35 +++++++++---------- 3 files changed, 31 insertions(+), 29 deletions(-) diff --git a/retroshare-gui/src/gui/icons.qrc b/retroshare-gui/src/gui/icons.qrc index 8967f1670..0a7f8342a 100644 --- a/retroshare-gui/src/gui/icons.qrc +++ b/retroshare-gui/src/gui/icons.qrc @@ -3,6 +3,9 @@ icons/add_user_256.png icons/anonymous_blue_128.png icons/anonymous_green_128.png + icons/aol.png + icons/avatar_128.png + icons/avatar_grey_128.png icons/blank_blue_128.png icons/blank_green_128.png icons/browsable_blue_128.png @@ -19,6 +22,7 @@ icons/friends_128.png icons/global_switch_off_128.png icons/global_switch_on_128.png + icons/gmail.png icons/help_128.png icons/help_64.png icons/information_128.png @@ -38,6 +42,7 @@ icons/mail_old_128.png icons/mail_red_128.png icons/newsfeed128.png + icons/outlook.png icons/plugins_128.png icons/posted_128.png icons/posted_red_128.png @@ -55,19 +60,18 @@ icons/tile_downloaded_48.png icons/tile_downloading_48.png icons/tile_inactive_48.png + icons/tor-logo.png + icons/tor-off.png + icons/tor-on.png + icons/tor-starting.png + icons/tor-stopping.png icons/user-away_64.png icons/user-away-extended_64.png icons/user-busy_64.png icons/user-offline_64.png icons/user-online_64.png - icons/yellow_biohazard64.png - icons/gmail.png icons/yahoo.png - icons/outlook.png - icons/aol.png icons/yandex.png - icons/tor-on.png - icons/tor-logo.png - icons/tor-off.png + icons/yellow_biohazard64.png diff --git a/retroshare-gui/src/gui/statusbar/dhtstatus.cpp b/retroshare-gui/src/gui/statusbar/dhtstatus.cpp index 6f9d3a968..33373327b 100644 --- a/retroshare-gui/src/gui/statusbar/dhtstatus.cpp +++ b/retroshare-gui/src/gui/statusbar/dhtstatus.cpp @@ -40,8 +40,9 @@ DHTStatus::DHTStatus(QWidget *parent) hbox->setSpacing(6); statusDHT = new QLabel("" + tr("DHT") + ":", this ); - statusDHT->setToolTip(tr("

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 \ - 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.

")) ; + statusDHT->setToolTip(tr("

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 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.

")) ; hbox->addWidget(statusDHT); dhtstatusLabel = new QLabel( this ); @@ -127,7 +128,7 @@ void DHTStatus::getDHTStatus() { // RED - some issue. 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); dhtnetworkLabel->setVisible(false); diff --git a/retroshare-gui/src/gui/statusbar/peerstatus.cpp b/retroshare-gui/src/gui/statusbar/peerstatus.cpp index e496ae13e..084620a95 100644 --- a/retroshare-gui/src/gui/statusbar/peerstatus.cpp +++ b/retroshare-gui/src/gui/statusbar/peerstatus.cpp @@ -31,13 +31,13 @@ PeerStatus::PeerStatus(QWidget *parent) hbox->setMargin(0); hbox->setSpacing(6); + iconLabel = new QLabel( this ); - iconLabel->setPixmap(QPixmap(":/images/user/identitygray16.png")); - // iconLabel doesn't change over time, so we didn't need a minimum size + int S = QFontMetricsF(iconLabel->font()).height(); + iconLabel->setPixmap(QPixmap(":/icons/avatar_grey_128.png").scaledToHeight(S,Qt::SmoothTransformation)); hbox->addWidget(iconLabel); statusPeers = new QLabel( tr("Friends: 0/0"), this ); -// statusPeers->setMinimumSize( statusPeers->frameSize().width() + 0, 0 ); hbox->addWidget(statusPeers); _compactMode = false; @@ -48,22 +48,19 @@ PeerStatus::PeerStatus(QWidget *parent) void PeerStatus::getPeerStatus(unsigned int nFriendCount, unsigned int nOnlineCount) { - /* set users/friends/network */ + /* set users/friends/network */ - if (statusPeers){ - statusPeers->setToolTip(tr("Online Friends/Total Friends") ); - QString text; - if (_compactMode) text = QString("%1/%2").arg(nOnlineCount).arg(nFriendCount); - else text = QString("%1: %2/%3 ").arg(tr("Friends")).arg(nOnlineCount).arg(nFriendCount); - statusPeers -> setText(text); - } + if (statusPeers){ + statusPeers->setToolTip(tr("Online Friends/Total Friends") ); + QString text; + if (_compactMode) text = QString("%1/%2").arg(nOnlineCount).arg(nFriendCount); + else text = QString("%1: %2/%3 ").arg(tr("Friends")).arg(nOnlineCount).arg(nFriendCount); + statusPeers -> setText(text); + } + int S = QFontMetricsF(iconLabel->font()).height(); - if (nOnlineCount > 0) - { - iconLabel->setPixmap(QPixmap(":/images/user/identity16.png")); - } - else - { - iconLabel->setPixmap(QPixmap(":/images/user/identitygray16.png")); - } + if (nOnlineCount > 0) + iconLabel->setPixmap(QPixmap(":/icons/avatar_128.png").scaledToHeight(S,Qt::SmoothTransformation)); + else + iconLabel->setPixmap(QPixmap(":/icons/avatar_grey_128.png").scaledToHeight(S,Qt::SmoothTransformation)); }