Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Backport fix for titler text gradient

parent c2af5c47
......@@ -213,10 +213,17 @@ void MyTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option
} else {
int outline = data(TitleDocument::OutlineWidth).toInt();
QString gradientData = data(TitleDocument::Gradient).toString();
QTextCursor cursor(document());;
QColor fontcolor = cursor.charFormat().foreground().color();
painter->fillPath(m_path, QBrush(fontcolor));
QBrush paintBrush;
if (gradientData.isEmpty()) {
paintBrush = QBrush(cursor.charFormat().foreground().color());
} else {
QRectF rect = boundingRect();
paintBrush = QBrush(GradientWidget::gradientFromString(gradientData, rect.width(), rect.height()));
painter->fillPath(m_path, paintBrush);
if (outline > 0) {
QVariant variant = data(TitleDocument::OutlineColor);
QColor outlineColor = variant.value<QColor>();
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