]> git.sesse.net Git - kdenlive/commitdiff
small changes in clip painting (effect names and markers)
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 2 Jun 2008 20:11:38 +0000 (20:11 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 2 Jun 2008 20:11:38 +0000 (20:11 +0000)
svn path=/branches/KDE4/; revision=2215

src/clipitem.cpp

index ec34d03e42eb29ea0443545f640ff10fc62c64fd..06049d54cf2c26323c3a5b7a767a51029c589877 100644 (file)
@@ -273,7 +273,7 @@ void ClipItem::paint(QPainter *painter,
             QLineF l(br.x() + framepos, br.y() + 5, br.x() + framepos, br.y() + br.height() - 5);
             painter->drawLine(l);
             if (KdenliveSettings::showmarkers()) {
-                const QRectF txtBounding = painter->boundingRect(br.x() + framepos + 1, br.y() + 5, br.width() - framepos - 2, br.height() - 10, Qt::AlignLeft | Qt::AlignTop, " " + (*it).comment() + " ");
+                const QRectF txtBounding = painter->boundingRect(br.x() + framepos + 1, br.y() + 10, br.width() - framepos - 2, br.height() - 10, Qt::AlignLeft | Qt::AlignTop, " " + (*it).comment() + " ");
                 QPainterPath path;
                 path.addRoundedRect(txtBounding, 3, 3);
                 painter->fillPath(path, markerBrush);
@@ -324,16 +324,15 @@ void ClipItem::paint(QPainter *painter,
     // Draw effects names
     QString effects = effectNames().join(" / ");
     if (!effects.isEmpty()) {
-        painter->setPen(pen);
         QFont font = painter->font();
         QFont smallFont = font;
         smallFont.setPointSize(8);
         painter->setFont(smallFont);
         QRectF txtBounding = painter->boundingRect(br, Qt::AlignLeft | Qt::AlignTop, " " + effects + " ");
+        painter->setPen(Qt::white);
         painter->fillRect(txtBounding, QBrush(QColor(0, 0, 0, 150)));
         painter->drawText(txtBounding, Qt::AlignCenter, effects);
-        pen.setColor(Qt::black);
-        painter->setPen(pen);
+        painter->setPen(Qt::black);
         painter->setFont(font);
     }