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 0f8e291 commit 60d2616
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgscolorschemelist.cpp
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 60d2616

Please sign in to comment.