Skip to content

Commit

Permalink
fix: QPushButton icon color follow theme
Browse files Browse the repository at this point in the history
Change-Id: Iba641ea92f375b1d8d86a4cc72d8e6d83ad5347a
  • Loading branch information
BLumia committed Dec 12, 2018
1 parent 8dc19af commit e1f6d37
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dstyleplugin/pushbuttonhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,7 @@ bool Style::drawPushButtonLabel(const QStyleOption *option, QPainter *painter, c
else if( mouseOver && flat ) iconMode = QIcon::Active;
else iconMode = QIcon::Normal;

const QPixmap pixmap = buttonOption->icon.pixmap( iconSize, iconMode, iconState );
widget->style()->drawItemPixmap( painter, iconRect, Qt::AlignCenter, pixmap );

buttonOption->icon.paint(painter, iconRect, Qt::AlignCenter, iconMode, iconState);
}

// render text
Expand Down

0 comments on commit e1f6d37

Please sign in to comment.