diff options
| author | Hatem ElKharashy <[email protected]> | 2024-05-16 16:14:34 +0300 |
|---|---|---|
| committer | Hatem ElKharashy <[email protected]> | 2024-05-19 18:09:38 +0300 |
| commit | 595b365f1bca6368b6d7355d793e32699f5926f0 (patch) | |
| tree | ad18e562263b756b82a3409dc9ee1f6eb557a690 | |
| parent | f6c03e330ebbc039a1d243806331ba0e6eaee3a0 (diff) | |
VectorImage: Fix wrong stroke-width and stroke-color
the value assigned to -qt-stroke-width was assigned without the "px"
identifier which lead the parser to treat it as an invalid value.
Moreover, the function returning the rgba value for the color had
the blue and green channels swapped leading to assigning wrong color
to -qt-stroke-color.
Change-Id: Ifccb2125fd30b355bac1b09906d18de913c0448a
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
| -rw-r--r-- | src/quickvectorimage/generator/qsvgvisitorimpl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quickvectorimage/generator/qsvgvisitorimpl.cpp b/src/quickvectorimage/generator/qsvgvisitorimpl.cpp index ed6dfdf5ea..a3aafb65cd 100644 --- a/src/quickvectorimage/generator/qsvgvisitorimpl.cpp +++ b/src/quickvectorimage/generator/qsvgvisitorimpl.cpp @@ -361,8 +361,8 @@ QString QSvgVisitorImpl::colorCssDescription(QColor color) QString cssDescription; cssDescription += QStringLiteral("rgba("); cssDescription += QString::number(color.red()) + QStringLiteral(","); - cssDescription += QString::number(color.blue()) + QStringLiteral(","); cssDescription += QString::number(color.green()) + QStringLiteral(","); + cssDescription += QString::number(color.blue()) + QStringLiteral(","); cssDescription += QString::number(color.alphaF()) + QStringLiteral(")"); return cssDescription; @@ -426,7 +426,7 @@ void QSvgVisitorImpl::visitTextNode(const QSvgText *node) QString strokeColor = colorCssDescription(styleResolver->currentStrokeColor()); if (!strokeColor.isEmpty()) { styleTagContent += QStringLiteral("-qt-stroke-color:%1;").arg(strokeColor); - styleTagContent += QStringLiteral("-qt-stroke-width:%1;").arg(styleResolver->currentStrokeWidth()); + styleTagContent += QStringLiteral("-qt-stroke-width:%1px;").arg(styleResolver->currentStrokeWidth()); #if QT_CONFIG(texthtmlparser) needsPathNode = true; #endif |
