Skip to content

Commit

Permalink
Graph: better UX for selected/hover point(s) #163
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Aug 31, 2024
1 parent 15f4978 commit e92a3d6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/core/Animators/qrealpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,15 @@ void QrealPoint::draw(QPainter * const p,
if (mHovered) { gDrawCosmeticEllipse(p, center, mRadius + 1, mRadius + 1); }
else { gDrawCosmeticEllipse(p, center, mRadius, mRadius); }


//p->setBrush(paintColor);
p->setBrush(Qt::white);

if (!isSelected()) { p->setBrush(/*paintColor.lighter()*/Qt::gray); }
if (isSelected() || mHovered) { p->setBrush(Qt::white); }
else { p->setBrush(Qt::gray); }

gDrawCosmeticEllipse(p, center, mRadius - 1, mRadius - 1);

if (isSelected() || mHovered) {
p->setBrush(paintColor);
gDrawCosmeticEllipse(p, center, mRadius/2 - 1, mRadius/2 - 1);
}
}

void QrealPoint::setSelected(const bool selected) {
Expand Down

0 comments on commit e92a3d6

Please sign in to comment.