]> git.sesse.net Git - mlt/commitdiff
Titler: add support for background property
authorj-b-m <jb@kdenlive.org>
Sun, 16 Aug 2009 09:40:15 +0000 (11:40 +0200)
committerj-b-m <jb@kdenlive.org>
Sun, 16 Aug 2009 09:40:15 +0000 (11:40 +0200)
modified:   src/modules/qimage/kdenlivetitle_wrapper.cpp

src/modules/qimage/kdenlivetitle_wrapper.cpp

index 3f7618a139864df881bb3ee28599a405d3ea8343..70f05dad1f62b4aa46294c6b60ca46459e816f27 100644 (file)
@@ -245,17 +245,11 @@ void loadFromXml( mlt_producer producer, QGraphicsScene *scene, const char *temp
        }
        QDomNode n = doc.documentElement().firstChildElement("background");
        if (!n.isNull()) {
-         QColor color = QColor( stringToColor( n.attributes().namedItem( "color" ).nodeValue() ) );
-                               //color.setAlpha(items.item(i).attributes().namedItem("alpha").nodeValue().toInt());
-                               QList<QGraphicsItem *> items = scene->items();
-                               for ( int i = 0; i < items.size(); i++ )
-                               {
-                                       if ( items.at( i )->zValue() == -1100 )
-                                       {
-                                               (( QGraphicsRectItem * )items.at( i ) )->setBrush( QBrush( color ) );
-                                               break;
-                                       }
-                               }
+               QColor color = QColor( stringToColor( n.attributes().namedItem( "color" ).nodeValue() ) );
+               QList<QGraphicsItem *> items = scene->items();
+               QGraphicsRectItem *rec = scene->addRect(0, 0, scene->width(), scene->height() , QPen( Qt::NoPen ), QBrush( color ) );
+               rec->setZValue(-1100);
+               scene->addItem(rec);
          
        }