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 0f8e291 commit 60d2616ee14fdc116e0c09da664ebe8112043f53
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 60d2616

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