summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-04-12 13:52:14 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2010-04-12 14:31:38 (GMT)
commitd3c1dea37f95ba2bb75a2a264e4d806c4c0c36f3 (patch)
tree647190e184b37f339edf30f6065dfca62dba523e /src/gui/text
parent059bf03f30c0e27830d311ae9a664eb0376fcd1f (diff)
downloadQt-d3c1dea37f95ba2bb75a2a264e4d806c4c0c36f3.zip
Qt-d3c1dea37f95ba2bb75a2a264e4d806c4c0c36f3.tar.gz
Qt-d3c1dea37f95ba2bb75a2a264e4d806c4c0c36f3.tar.bz2
CSS: fixes border only affecting the first widget.
Rules like "Foo { border: 2px solid; }" does not specify the border color. When the border color is not specified, it is assumed to be black. When reading the brush value from the cache, we should take that into account. Note that this logic cannot be moved into brushFromData() as it is different for the background. (when no color is specified, it is assumed to be transparent) Reviewed-by: jbache Task-number: QTBUG-9674 (part one)
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qcssparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 938decd..b3d2526 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -895,7 +895,7 @@ void ValueExtractor::borderValue(const Declaration &decl, int *width, QCss::Bord
BorderData data = qvariant_cast<BorderData>(decl.d->parsed);
*width = lengthValueFromData(data.width, f);
*style = data.style;
- *color = brushFromData(data.color, pal);
+ *color = data.color.type != BrushData::Invalid ? brushFromData(data.color, pal) : QBrush(QColor());
return;
}