[QGIS Commit] r10024 - branches/Version-1_0/src/gui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Jan 26 16:50:31 EST 2009


Author: timlinux
Date: 2009-01-26 16:50:31 -0500 (Mon, 26 Jan 2009)
New Revision: 10024

Modified:
   branches/Version-1_0/src/gui/qgsdetaileditemdelegate.cpp
Log:
Use palette highlight text colour for highlighted items so we dont have dark text on dark bg

Modified: branches/Version-1_0/src/gui/qgsdetaileditemdelegate.cpp
===================================================================
--- branches/Version-1_0/src/gui/qgsdetaileditemdelegate.cpp	2009-01-26 19:09:51 UTC (rev 10023)
+++ branches/Version-1_0/src/gui/qgsdetaileditemdelegate.cpp	2009-01-26 21:50:31 UTC (rev 10024)
@@ -122,8 +122,14 @@
   if ( theOption.state & QStyle::State_Selected )
   {
     drawHighlight( theOption, thepPainter, height( theOption, theData ) );
+    thepPainter->setPen(theOption.palette.highlightedText().color());
   }
+  else
+  {
+    thepPainter->setPen(theOption.palette.text().color());
+  }
 
+
   //
   // Draw the checkbox
   //
@@ -191,7 +197,6 @@
   mpWidget->setAutoFillBackground( true );
   //mpWidget->setAttribute(Qt::WA_OpaquePaintEvent);
   mpWidget->repaint();
-
   if ( theOption.state & QStyle::State_Selected )
   {
     drawHighlight( theOption, thepPainter, height( theOption, theData ) );



More information about the QGIS-commit mailing list