Skip to content

Commit

Permalink
Merge pull request #1617 from Anarchid/sequence-notes-in-timeline
Browse files Browse the repository at this point in the history
ui: SequenceItem draws step note-text in ShowEditor timeline
  • Loading branch information
mcallegari authored Sep 29, 2024
2 parents 24f34c4 + 1cef70c commit 7be2a34
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/src/showmanager/sequenceitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ void SequenceItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
uint stepFadeIn = step.fadeIn;
uint stepFadeOut = step.fadeOut;
uint stepDuration = step.duration;

if (m_chaser->fadeInMode() == Chaser::Common)
stepFadeIn = m_chaser->fadeInSpeed();
if (m_chaser->fadeOutMode() == Chaser::Common)
Expand Down Expand Up @@ -113,6 +114,10 @@ void SequenceItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
painter->setBrush(QBrush(Qt::NoBrush));
painter->drawRect(xpos, 0, stepWidth, TRACK_HEIGHT - 3);
}

QRect textRect = QRect(xpos + 1, 0, stepWidth - 1, TRACK_HEIGHT - 3);
painter->drawText(textRect, Qt::AlignBottom, step.note);

xpos += stepWidth;

// draw step vertical delimiter
Expand Down

0 comments on commit 7be2a34

Please sign in to comment.