Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > c6df48aa6f24f13ac83670ff4f6d6ea9 > files > 9

qt4-4.3.4-6mdv2008.1.src.rpm

qt-bugs@ issue : 178507
Trolltech task ID : 179170 (status: fixed for Qt 4.4.0)
applied: no
author: Matthew Woehlke <mw_triad@users.sourceforge.net>

This patch fixes incorrect setting of the palette color group in
QListView that resulted in alternate rows being drawn with the Active
AlternateBase color even for inactive widgets (while the rest of the
widget is drawn correctly). Please let me know if QListView is not
the only culprit. (QTreeView was fixed by TT already.)

--- src/gui/itemviews/qlistview.cpp
+++ src/gui/itemviews/qlistview.cpp
@@ -1071,7 +1071,7 @@
                 option.state &= ~QStyle::State_Enabled;
                 cg = QPalette::Disabled;
             } else {
-                cg = QPalette::Normal;
+                cg = window()->isActiveWindow() ? QPalette::Active : QPalette::Inactive;
             }
             option.palette.setCurrentColorGroup(cg);
         }