Skip to content
Permalink
Browse files

Rely on app palette colors when painting in color swatch delegate

  • Loading branch information
nirvn committed Dec 28, 2018
1 parent 084fda1 commit 687fb504a40219491aaa9c67a65cab2825319970
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/gui/qgscolorschemelist.cpp
@@ -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 );

0 comments on commit 687fb50

Please sign in to comment.
You can’t perform that action at this time.