Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use palette highlight text colour for highlighted items so we dont ha…
…ve dark text on dark bg

git-svn-id: http://svn.osgeo.org/qgis/trunk@10025 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 26, 2009
1 parent b60e737 commit 071f3cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/qgsdetaileditemdelegate.cpp
Expand Up @@ -122,8 +122,14 @@ void QgsDetailedItemDelegate::paintManually( QPainter * thepPainter,
if ( theOption.state & QStyle::State_Selected ) if ( theOption.state & QStyle::State_Selected )
{ {
drawHighlight( theOption, thepPainter, height( theOption, theData ) ); drawHighlight( theOption, thepPainter, height( theOption, theData ) );
thepPainter->setPen(theOption.palette.highlightedText().color());
}
else
{
thepPainter->setPen(theOption.palette.text().color());
} }



// //
// Draw the checkbox // Draw the checkbox
// //
Expand Down Expand Up @@ -191,7 +197,6 @@ void QgsDetailedItemDelegate::paintAsWidget( QPainter * thepPainter,
mpWidget->setAutoFillBackground( true ); mpWidget->setAutoFillBackground( true );
//mpWidget->setAttribute(Qt::WA_OpaquePaintEvent); //mpWidget->setAttribute(Qt::WA_OpaquePaintEvent);
mpWidget->repaint(); mpWidget->repaint();

if ( theOption.state & QStyle::State_Selected ) if ( theOption.state & QStyle::State_Selected )
{ {
drawHighlight( theOption, thepPainter, height( theOption, theData ) ); drawHighlight( theOption, thepPainter, height( theOption, theData ) );
Expand Down

0 comments on commit 071f3cc

Please sign in to comment.