mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 22:22:45 -04:00
NetworkView:
- corrected bug in popup menu - used more saturated colors to improve clarity - used darker colors for less trusted peers - fixed ownId node position to the center NetworkDialog: - changed color of own lign to yellow to comply with color code in NetworkView git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3826 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
63b32b0794
commit
1585606c4c
4 changed files with 16 additions and 50 deletions
|
@ -240,27 +240,25 @@ QPainterPath Node::shape() const
|
|||
void Node::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
|
||||
{
|
||||
static QColor type_color[4] = { QColor(Qt::yellow), QColor(Qt::green), QColor(Qt::cyan), QColor(Qt::black) } ;
|
||||
static QColor auth_color[3] = { QColor(Qt::darkYellow), QColor(Qt::darkGreen), QColor(Qt::darkBlue) } ;
|
||||
|
||||
QColor col0(type_color[_type]) ;
|
||||
|
||||
painter->setPen(Qt::NoPen);
|
||||
painter->setBrush(Qt::darkGray);
|
||||
painter->drawEllipse(-7, -7, 20, 20);
|
||||
|
||||
QColor col0(type_color[_type]) ;
|
||||
QColor col1(auth_color[_auth]) ;
|
||||
|
||||
QRadialGradient gradient(-3, -3, 10);
|
||||
if (option->state & QStyle::State_Sunken)
|
||||
{
|
||||
gradient.setCenter(3, 3);
|
||||
gradient.setFocalPoint(3, 3);
|
||||
gradient.setColorAt(1, col0.light(120));
|
||||
gradient.setColorAt(0, col1.light(120));
|
||||
gradient.setColorAt(1, col0.light(120).dark(100+_auth*100));
|
||||
gradient.setColorAt(0, col0.light(70).dark(100+_auth*100));
|
||||
}
|
||||
else
|
||||
{
|
||||
gradient.setColorAt(0, col0);
|
||||
gradient.setColorAt(1, col1);
|
||||
gradient.setColorAt(1, col0.light(50).dark(100+_auth*100));
|
||||
gradient.setColorAt(0, col0.dark(100+_auth*100));
|
||||
}
|
||||
painter->setBrush(gradient);
|
||||
painter->setPen(QPen(Qt::black, 0));
|
||||
|
@ -299,7 +297,7 @@ void Node::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
|||
void Node::peerDetails()
|
||||
{
|
||||
std::cerr << "Calling peer details" << std::endl;
|
||||
ConfCertDialog::showIt(_ssl_id, ConfCertDialog::PageDetails);
|
||||
ConfCertDialog::showIt(_gpg_id, ConfCertDialog::PageDetails);
|
||||
}
|
||||
void Node::makeFriend()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue