mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 06:31:20 -04:00
fixed position of scaled/highlighted nodes in node graph (patch from Chozabu)
This commit is contained in:
parent
a9ef48d133
commit
d004056f67
2 changed files with 4 additions and 3 deletions
|
@ -285,7 +285,8 @@ void Node::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
|
|||
|
||||
painter->setPen(Qt::NoPen);
|
||||
painter->setBrush(Qt::darkGray);
|
||||
painter->drawEllipse(-7, -7, mNodeDrawSize, mNodeDrawSize);
|
||||
int mNodeDrawSize2 = mNodeDrawSize/2;
|
||||
painter->drawEllipse(-mNodeDrawSize2+3, -mNodeDrawSize2+3, mNodeDrawSize, mNodeDrawSize);
|
||||
|
||||
QRadialGradient gradient(-3, -3, 10);
|
||||
if (option->state & QStyle::State_Sunken)
|
||||
|
@ -312,7 +313,7 @@ void Node::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
|
|||
}
|
||||
painter->setBrush(gradient);
|
||||
painter->setPen(QPen(Qt::black, 0));
|
||||
painter->drawEllipse(-10, -10, mNodeDrawSize, mNodeDrawSize);
|
||||
painter->drawEllipse(-mNodeDrawSize2, -mNodeDrawSize2, mNodeDrawSize, mNodeDrawSize);
|
||||
painter->drawText(-10, 0, QString::fromUtf8(_desc_string.c_str()));
|
||||
|
||||
if (!mDeterminedBB)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue