Skip to content

Commit 1d527ce

Browse files
author
timlinux
committedJan 26, 2009
Use palette highlight text colour for highlighted items so we dont have dark text on dark bg
git-svn-id: http://svn.osgeo.org/qgis/branches/Version-1_0@10024 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent faae187 commit 1d527ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎src/gui/qgsdetaileditemdelegate.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,14 @@ void QgsDetailedItemDelegate::paintManually( QPainter * thepPainter,
122122
if ( theOption.state & QStyle::State_Selected )
123123
{
124124
drawHighlight( theOption, thepPainter, height( theOption, theData ) );
125+
thepPainter->setPen(theOption.palette.highlightedText().color());
126+
}
127+
else
128+
{
129+
thepPainter->setPen(theOption.palette.text().color());
125130
}
126131

132+
127133
//
128134
// Draw the checkbox
129135
//
@@ -191,7 +197,6 @@ void QgsDetailedItemDelegate::paintAsWidget( QPainter * thepPainter,
191197
mpWidget->setAutoFillBackground( true );
192198
//mpWidget->setAttribute(Qt::WA_OpaquePaintEvent);
193199
mpWidget->repaint();
194-
195200
if ( theOption.state & QStyle::State_Selected )
196201
{
197202
drawHighlight( theOption, thepPainter, height( theOption, theData ) );

0 commit comments

Comments
 (0)
Please sign in to comment.