- content.setAttribute("font-color", colorToString(t->defaultTextColor()));
-
- // Only save when necessary.
- if (t->data(OriginXLeft).toInt() == AxisInverted) {
- content.setAttribute("kdenlive-axis-x-inverted", t->data(OriginXLeft).toInt());
- }
- if (t->data(OriginYTop).toInt() == AxisInverted) {
- content.setAttribute("kdenlive-axis-y-inverted", t->data(OriginYTop).toInt());
- }
+ {
+ QTextCursor cursor(t->document());
+ cursor.select(QTextCursor::Document);
+ 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()) {
+ 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();
+ QString effectName = effectParams.takeFirst();
+ content.setAttribute("textwidth", t->sceneBoundingRect().width());
+ content.setAttribute(effectName, effectParams.join(";"));
+ }
+
+ // Only save when necessary.
+ if (t->data(OriginXLeft).toInt() == AxisInverted) {
+ content.setAttribute("kdenlive-axis-x-inverted", t->data(OriginXLeft).toInt());
+ }
+ if (t->data(OriginYTop).toInt() == AxisInverted) {
+ content.setAttribute("kdenlive-axis-y-inverted", t->data(OriginYTop).toInt());
+ }