diff options
author | Marius Bugge Monsen <mmonsen@trolltech.com> | 2009-06-24 12:01:28 (GMT) |
---|---|---|
committer | Marius Bugge Monsen <mmonsen@trolltech.com> | 2009-06-24 12:12:43 (GMT) |
commit | 127e68d3dc4ff83293d7e364af870e019fe7cd17 (patch) | |
tree | 17d534e7f8feb78ddb5326ec6ec985cf27c03153 /src/gui/styles | |
parent | 353dcfd307853da289fdd245410e2e07358624a0 (diff) | |
download | Qt-127e68d3dc4ff83293d7e364af870e019fe7cd17.zip Qt-127e68d3dc4ff83293d7e364af870e019fe7cd17.tar.gz Qt-127e68d3dc4ff83293d7e364af870e019fe7cd17.tar.bz2 |
Fix the painting of item view background when items are disabled.
Change QTableView to use the style to draw the background. Change QCommonStyle to draw the background correctly when the item is disabled.
Task-number: 250682
Reviewed-by: Jens Bache-Wiig
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qcommonstyle.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index c5c6973..24ff792 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -770,6 +770,8 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Highlight)); else if (vopt->features & QStyleOptionViewItemV2::Alternate) p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::AlternateBase)); + else if (!(vopt->state & QStyle::State_Enabled)) + p->fillRect(vopt->rect, vopt->palette.brush(cg, QPalette::Base)); } break; case PE_PanelItemViewItem: |