Skip to content

Commit

Permalink
Rely on app palette colors when painting in color swatch delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Dec 28, 2018
1 parent 084fda1 commit 687fb50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgscolorschemelist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,11 +687,11 @@ void QgsColorSwatchDelegate::paint( QPainter *painter, const QStyleOptionViewIte
painter->setPen( QPen( Qt::NoPen ) );
if ( option.state & QStyle::State_Active )
{
painter->setBrush( QBrush( QPalette().highlight() ) );
painter->setBrush( QBrush( option.widget->palette().highlight() ) );
}
else
{
painter->setBrush( QBrush( QPalette().color( QPalette::Inactive,
painter->setBrush( QBrush( option.widget->palette().color( QPalette::Inactive,
QPalette::Highlight ) ) );
}
painter->drawRect( option.rect );
Expand Down

0 comments on commit 687fb50

Please sign in to comment.