qt-copy patch: fix alternate rows in Q{List,Tree}Widget

Matthew Woehlke mw_triad at users.sourceforge.net
Tue Sep 18 23:33:11 BST 2007


I'd like to add the following patch to qt-copy. Can I update the 
existing patch 0191 or do I need to create a new patch?

Index: src/gui/itemviews/qitemdelegate.cpp
===================================================================
--- src/gui/itemviews/qitemdelegate.cpp (revision 713489)
+++ src/gui/itemviews/qitemdelegate.cpp (working copy)
@@ -635,10 +635,10 @@

      QPen pen = painter->pen();
      QPalette::ColorGroup cg = option.state & QStyle::State_Enabled
-                              ? QPalette::Normal : QPalette::Disabled;
-    if (cg == QPalette::Normal
-          && !(option.state & QStyle::State_Active))
-        cg = QPalette::Inactive;
+                              ? option.palette.currentColorGroup()
+                              : QPalette::Disabled;
      if (option.state & QStyle::State_Selected) {
+       if (cg == QPalette::Normal
+             && !(option.state & QStyle::State_Active))
+           cg = QPalette::Inactive;
          painter->fillRect(rect, option.palette.brush(cg,
                            QPalette::Highlight));
          painter->setPen(option.palette.color(cg,
                          QPalette::HighlightedText));
      } else {
===================================================================

(Yes, I have already sent this to qt-bugs.)

-- 
Matthew
"Non sequitor. Your facts are out of order." -- Nomad





More information about the kde-core-devel mailing list