moved the Status icons to the correct place

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2043 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-01-15 00:09:39 +00:00
parent 5349ab101a
commit 7e29afbbd9
5 changed files with 20 additions and 8 deletions

View File

@ -404,39 +404,50 @@ void PeersDialog::insertPeers()
/* change color and icon */
int i;
if (sslDetail.state & RS_PEER_STATE_CONNECTED) {
sslItem -> setIcon(0,(QIcon(IMAGE_ONLINE)));
gpg_item -> setIcon(0,(QIcon(IMAGE_ONLINE)));
gpg_item -> setText(1, tr("Online"));
sslItem -> setIcon(0,(QIcon(":/images/connect_established.png")));
QFont font;
font.setBold(true);
for(i = 0; i < 3; i++) {
sslItem -> setTextColor(i,(Qt::darkBlue));
gpg_item -> setTextColor(i,(Qt::darkBlue));
gpg_item -> setFont(i,font);
sslItem -> setFont(i,font);
}
} else if (sslDetail.state & RS_PEER_STATE_UNREACHABLE) {
sslItem -> setIcon(0,(QIcon(IMAGE_UNREACHABLE)));
gpg_item -> setIcon(0,(QIcon(IMAGE_UNREACHABLE)));
gpg_item -> setText(1, tr("Unreachable"));
QFont font;
font.setBold(false);
for(i = 0; i < 3; i++) {
sslItem -> setTextColor(i,(Qt::darkRed));
gpg_item -> setTextColor(i,(Qt::darkRed));
gpg_item -> setFont(i,font);
sslItem -> setFont(i,font);
}
} else if (sslDetail.state & RS_PEER_STATE_ONLINE) {
/* bright green */
sslItem -> setIcon(0,(QIcon(IMAGE_AVAIBLE)));
gpg_item -> setIcon(0,(QIcon(IMAGE_AVAIBLE)));
gpg_item -> setText(1, tr("Avaible"));
QFont font;
font.setBold(true);
for(i = 0; i < 3; i++) {
sslItem -> setTextColor(i,(Qt::darkCyan));
gpg_item -> setTextColor(i,(Qt::darkCyan));
gpg_item -> setFont(i,font);
sslItem -> setFont(i,font);
}
} else {
if (time(NULL) - sslDetail.lastConnect < 3600) {
sslItem -> setIcon(0,(QIcon(IMAGE_OFFLINE)));
gpg_item -> setIcon(0,(QIcon(IMAGE_OFFLINE)));
gpg_item -> setText(1, tr("Offline"));
} else {
sslItem -> setIcon(0,(QIcon(IMAGE_OFFLINE2)));
gpg_item -> setIcon(0,(QIcon(IMAGE_OFFLINE2)));
gpg_item -> setText(1, tr("Offline"));
}
QFont font;
font.setBold(false);
for(i = 0; i < 3; i++) {
gpg_item -> setTextColor(i,(Qt::black));
gpg_item -> setFont(i,font);
sslItem -> setTextColor(i,(Qt::black));
sslItem -> setFont(i,font);
}

View File

@ -12,6 +12,7 @@
<file>images/btn_26_hover.png</file>
<file>images/btn_27.png</file>
<file>images/btn_27_hover.png</file>
<file>images/connect_established.png</file>
<file>images/feedback_arrow.png</file>
<file>images/feedback_arrow_hover.png</file>
<file>images/feedback-bar-background.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B