[QGIS Commit] r10025 - trunk/qgis/src/gui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Jan 26 17:00:19 EST 2009
Author: timlinux
Date: 2009-01-26 17:00:19 -0500 (Mon, 26 Jan 2009)
New Revision: 10025
Modified:
trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp
Log:
Use palette highlight text colour for highlighted items so we dont have dark text on dark bg
Modified: trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp
===================================================================
--- trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp 2009-01-26 21:50:31 UTC (rev 10024)
+++ trunk/qgis/src/gui/qgsdetaileditemdelegate.cpp 2009-01-26 22:00:19 UTC (rev 10025)
@@ -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