Skip to content

Commit

Permalink
update: icon_widget.py
Browse files Browse the repository at this point in the history
  • Loading branch information
omamkaz committed Jan 23, 2024
1 parent ecb96ed commit 40ee0d3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Qtica/widgets/icon_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ def paintEvent(self, event: QPaintEvent) -> None:
| QPainter.RenderHint.TextAntialiasing)

if isinstance(self.icon, QMovie):
painter.drawPixmap(self.rect(),
painter.drawPixmap(self.rect(),
self.icon.currentPixmap())
else:
painter.drawPixmap(self.rect(),
self._icon.pixmap(self.rect().size(),
self._mode,
painter.drawPixmap(self.rect(),
self._icon.pixmap(self.rect().size(),
self._mode,
self._state))

def setIcon(self, icon) -> None:
self._icon = Icon(icon)
self.update()

0 comments on commit 40ee0d3

Please sign in to comment.