Fix compilation with KDE < 4.5 and Title outline transparency broken

parent 418c2384
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.
......
......@@ -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();
......
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment