summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@nokia.com>2010-08-25 11:49:29 (GMT)
committerJens Bache-Wiig <jens.bache-wiig@nokia.com>2010-08-25 11:53:22 (GMT)
commit37e1bea301d3e4c4346fad16244067d62a093af6 (patch)
tree908a70224d1c9e919f9ab3a4e6f16d2c4d20d4be /src/gui/styles
parent41532e38ff2b5153b79374032112d435b42e48a2 (diff)
downloadQt-37e1bea301d3e4c4346fad16244067d62a093af6.zip
Qt-37e1bea301d3e4c4346fad16244067d62a093af6.tar.gz
Qt-37e1bea301d3e4c4346fad16244067d62a093af6.tar.bz2
Fixed item view background color in Gtk style
Autotests were modified to check for 50% color coverage as well. Before they were not really testing the bgcolor since they would accept only the red grid color as a valid test pass. Task-number: QTBUG-13125 Reviewed-by: ogoffart
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qgtkstyle.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index c989bd3..c5429dd 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -836,7 +836,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element,
case PE_PanelItemViewItem:
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) {
- if (vopt->backgroundBrush.style() != Qt::NoBrush) {
+ uint resolve_mask = vopt->palette.resolve();
+ if (vopt->backgroundBrush.style() != Qt::NoBrush
+ || (resolve_mask & (1 << QPalette::Base)))
+ {
QPointF oldBO = painter->brushOrigin();
painter->setBrushOrigin(vopt->rect.topLeft());
painter->fillRect(vopt->rect, vopt->backgroundBrush);