- QString text = transitionName();
- if (m_forceTransitionTrack) text.append("|>");
- QRectF txtBounding = painter->boundingRect(mapped, Qt::AlignHCenter | Qt::AlignVCenter, ' ' + text + ' ');
- painter->fillRect(txtBounding, QBrush(QColor(50, 50, 0, 150)));
- txtBounding.translate(QPointF(1, 1));
- painter->setPen(QColor(255, 255, 255, 255));
+ const QString text = m_name + (m_forceTransitionTrack ? "|>" : QString());
+
+ // Draw clip name
+ QColor frameColor(brush().color().darker());
+ if (isSelected() || (parentItem() && parentItem()->isSelected())) {
+ frameColor = QColor(Qt::red);
+ }
+ frameColor.setAlpha(160);
+
+ const QRectF txtBounding = painter->boundingRect(mapped, Qt::AlignHCenter | Qt::AlignVCenter, ' ' + text + ' ');
+ //painter->fillRect(txtBounding2, frameColor);
+ painter->setBrush(frameColor);
+ painter->setPen(Qt::NoPen);
+ painter->drawRoundedRect(txtBounding, 3, 3);
+ painter->setBrush(QBrush(Qt::NoBrush));
+
+ painter->setPen(Qt::white);