]> git.sesse.net Git - kdenlive/commitdiff
Fix compilation with KDE < 4.5 and Title outline transparency broken
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 7 Dec 2011 08:02:13 +0000 (09:02 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 7 Dec 2011 08:08:29 +0000 (09:08 +0100)
ChangeLog
src/titledocument.cpp
src/titlewidget.cpp

index 7ab7cc49b3440bda00fa903c3707512de1990ef2..bdf56479e66249781f6414dec0b3b37f06f1bbce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+0.8.2.1
+    * Fix title text oultine transparency not working
+    * Make titler window fit on smaller resolutions (1024x768)
+    * Fix corruption when undoing and redoing a transition add + move
+    * Fix possible crash in thumbnails
+    * Fix possible crashes in clip transcoding and improve feedback when failing
+    * Various small optimizations (unnecessary clip reloads)
+    * Fix timecode widget hard to edit and sometimes giving random values
+    * Workaround locale issue ahappening when system C locale and Qt's locale did not give the same numeric separator
+    * Fix audio thumbnail concurrency issue
+    * Fix various video thumbnails issues (don't load several times the same thumb, load all of them, ...)
+    * Fix crash when opening a file dialog on KDE < 4.5
+    * Fix various proxy issues (missing extension, concurrency, disabling broken proxy, ...)
+    * Fix startup crash caused by invalid parsing of v4l data
+    * Fix project tree disabled after loading some projects / creating new one
+    * Fix corrupted timeline / monitor timecode
+    * Fix search path for Luma files when missing
+
 0.8.2
     * Load zone thumbnails from disk if available.
     * Optimise document loading.
index 0ebc42fd0992fedbbd2e91d63b42af00d48e559b..dc198f2e6d0132820fb4e1a593a5caf4fc5ec906 100644 (file)
@@ -171,7 +171,11 @@ QDomDocument TitleDocument::xml(QGraphicsRectItem* startv, QGraphicsRectItem* en
                 QColor fontcolor = cursor.charFormat().foreground().color();
                 content.setAttribute("font-color", colorToString(fontcolor));
                 if (!t->data(101).isNull()) content.setAttribute("font-outline", t->data(101).toDouble());
-                if (!t->data(102).isNull()) content.setAttribute("font-outline-color", colorToString(QColor(t->data(102).toString())));
+                if (!t->data(102).isNull()) {
+                    QVariant variant = t->data(102);
+                    QColor outlineColor = variant.value<QColor>();
+                    content.setAttribute("font-outline-color", colorToString(outlineColor));
+                }
             }
             if (!t->data(100).isNull()) {
                 QStringList effectParams = t->data(100).toStringList();
index 777d0325223f8b5734563f85a493b42a7be1a71a..e82db1259ea47431e83f01596f5867abf8c986bc 100644 (file)
@@ -92,11 +92,6 @@ TitleWidget::TitleWidget(KUrl url, Timecode tc, QString projectTitlePath, Render
     delete textOutlineAlpha;
     
 #else
-    rectBColor->setAlphaChannelEnabled(false);
-    rectFColor->setAlphaChannelEnabled(false);
-    fontColorButton->setAlphaChannelEnabled(false);
-    textOutlineColor->setAlphaChannelEnabled(false);
-
     rectBAlpha->setMinimum(0);
     rectBAlpha->setMaximum(255);
     rectBAlpha->setDecimals(0);
@@ -1971,23 +1966,23 @@ void TitleWidget::writeChoices()
     titleConfig.writeEntry("font_alpha", textAlpha->value());
     titleConfig.writeEntry("font_outline_alpha", textOutlineAlpha->value());
 #endif
+   
     titleConfig.writeEntry("font_outline", textOutline->value());
     titleConfig.writeEntry("font_weight", font_weight_box->itemData(font_weight_box->currentIndex()).toInt());
     titleConfig.writeEntry("font_italic", buttonItalic->isChecked());
     titleConfig.writeEntry("font_underlined", buttonUnder->isChecked());
 
-    titleConfig.writeEntry("rect_foreground_color", rectFColor->color());
-#if KDE_IS_VERSION(4,5,0)
-    titleConfig.writeEntry("rect_foreground_alpha", rectFColor->color().alpha());
-#else
-    titleConfig.writeEntry("rect_foreground_alpha", rectFAlpha->value());
-#endif
     titleConfig.writeEntry("rect_background_color", rectBColor->color());
+    titleConfig.writeEntry("rect_foreground_color", rectFColor->color());
+
 #if KDE_IS_VERSION(4,5,0)
     titleConfig.writeEntry("rect_background_alpha", rectBColor->color().alpha());
+    titleConfig.writeEntry("rect_foreground_alpha", rectFColor->color().alpha());
 #else
     titleConfig.writeEntry("rect_background_alpha", rectBAlpha->value());
+    titleConfig.writeEntry("rect_foreground_alpha", rectFAlpha->value());
 #endif
+
     titleConfig.writeEntry("rect_line_width", rectLineWidth->value());
 
     titleConfig.writeEntry("background_color", backgroundColor->color());
@@ -2007,12 +2002,17 @@ void TitleWidget::readChoices()
     font_family->setCurrentFont(titleConfig.readEntry("font_family", font_family->currentFont()));
     font_size->setValue(titleConfig.readEntry("font_pixel_size", font_size->value()));
     m_scene->slotUpdateFontSize(font_size->value());
-    fontColorButton->setColor(titleConfig.readEntry("font_color", fontColorButton->color()));
-#if not KDE_IS_VERSION(4,5,0)    
+    QColor fontColor = QColor(titleConfig.readEntry("font_color", fontColorButton->color()));
+    QColor outlineColor = QColor(titleConfig.readEntry("font_outline_color", textOutlineColor->color()));
+#if KDE_IS_VERSION(4,5,0)
+    fontColor.setAlpha(titleConfig.readEntry("font_alpha", fontColor.alpha()));
+    outlineColor.setAlpha(titleConfig.readEntry("font_outline_alpha", outlineColor.alpha()));
+#else
     textAlpha->setValue(titleConfig.readEntry("font_alpha", textAlpha->value()));
     textOutlineAlpha->setValue(titleConfig.readEntry("font_outline_alpha", textOutlineAlpha->value()));
 #endif
-    textOutlineColor->setColor(titleConfig.readEntry("font_outline_color", textOutlineColor->color()));
+    fontColorButton->setColor(fontColor);
+    textOutlineColor->setColor(outlineColor);
     textOutline->setValue(titleConfig.readEntry("font_outline", textOutline->value()));
 
     int weight;
@@ -2023,20 +2023,18 @@ void TitleWidget::readChoices()
     buttonUnder->setChecked(titleConfig.readEntry("font_underlined", buttonUnder->isChecked()));
 
     QColor fgColor = QColor(titleConfig.readEntry("rect_foreground_color", rectFColor->color()));
-#if KDE_IS_VERSION(4,5,0)
-    fgColor.setAlpha(titleConfig.readEntry("rect_background_alpha", rectFColor->color().alpha()));
-#else
-    rectFAlpha->setValue(titleConfig.readEntry("rect_foreground_alpha", rectFAlpha->value()));
-#endif
-    rectFColor->setColor(fgColor);
-    
     QColor bgColor = QColor(titleConfig.readEntry("rect_background_color", rectBColor->color()));
+
 #if KDE_IS_VERSION(4,5,0)
-    bgColor.setAlpha(titleConfig.readEntry("rect_background_alpha", rectBColor->color().alpha()));
+    fgColor.setAlpha(titleConfig.readEntry("rect_background_alpha", fgColor.alpha()));
+    bgColor.setAlpha(titleConfig.readEntry("rect_background_alpha", bgColor.alpha()));
 #else
+    rectFAlpha->setValue(titleConfig.readEntry("rect_foreground_alpha", rectFAlpha->value()));
     rectBAlpha->setValue(titleConfig.readEntry("rect_background_alpha", rectBAlpha->value()));
 #endif
+    rectFColor->setColor(fgColor);
     rectBColor->setColor(bgColor);
+
     rectLineWidth->setValue(titleConfig.readEntry("rect_line_width", rectLineWidth->value()));
 
     backgroundColor->setColor(titleConfig.readEntry("background_color", backgroundColor->color()));
@@ -2623,7 +2621,8 @@ void TitleWidget::prepareTools(QGraphicsItem *referenceItem)
             }
             if (!i->data(102).isNull()) {
                 textOutlineColor->blockSignals(true);
-                color = QColor(i->data(102).toString());
+                QVariant variant = i->data(102);
+                color = variant.value<QColor>();
 #if not KDE_IS_VERSION(4,5,0)
                 textOutlineAlpha->blockSignals(true);
                 textOutlineAlpha->setValue(color.alpha());