]> git.sesse.net Git - kdenlive/commitdiff
Use antialiasing to draw line connecting keyframes (only on selected clip)
authorTill Theato <root@ttill.de>
Sat, 30 Oct 2010 07:53:43 +0000 (07:53 +0000)
committerTill Theato <root@ttill.de>
Sat, 30 Oct 2010 07:53:43 +0000 (07:53 +0000)
svn path=/trunk/kdenlive/; revision=5062

src/abstractclipitem.cpp

index dbdd5cb254b88bc6d4de3720aaa8d66b3c0c1c9b..7bd2ea7ee04959c4f9d94160eb9999f09b12b78e 100644 (file)
@@ -255,6 +255,7 @@ void AbstractClipItem::drawKeyFrames(QPainter *painter, QRectF /*exposedRect*/)
     double maxh = br.height() / 100.0 * m_keyframeFactor;
     double start = cropStart().frames(m_fps);
     double x1, y1, x2, y2;
+    bool antialiasing = painter->renderHints() & QPainter::Antialiasing;
 
     // draw line showing default value
     bool active = isSelected() || (parentItem() && parentItem()->isSelected());
@@ -269,6 +270,7 @@ void AbstractClipItem::drawKeyFrames(QPainter *painter, QRectF /*exposedRect*/)
         painter->setPen(QColor(108, 108, 108, 180));
         painter->drawLine(l2.translated(0, 1));
         painter->setPen(QColor(Qt::white));
+        painter->setRenderHint(QPainter::Antialiasing);
     }
 
     // draw keyframes
@@ -321,6 +323,8 @@ void AbstractClipItem::drawKeyFrames(QPainter *painter, QRectF /*exposedRect*/)
         const QRectF frame(l2.x2() - 3, l2.y2() - 3, 6, 6);
         painter->fillRect(frame, color);
     }
+
+    painter->setRenderHint(QPainter::Antialiasing, antialiasing);
 }
 
 int AbstractClipItem::mouseOverKeyFrames(QPointF pos, double maxOffset)