mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix ThrobbingButton init with Python 3.10
It is no longer possible to pass floats to C functions where ints are expected, so explicitly convert to int in this case.
This commit is contained in:
parent
83ede77029
commit
82fecc9e0d
@ -33,7 +33,7 @@ class ThrobbingButton(QToolButton):
|
|||||||
QToolButton.setIcon(self, QIcon(I('donate.png')))
|
QToolButton.setIcon(self, QIcon(I('donate.png')))
|
||||||
self.setText('\xa0')
|
self.setText('\xa0')
|
||||||
self.animation = QPropertyAnimation(self, b'icon_size', self)
|
self.animation = QPropertyAnimation(self, b'icon_size', self)
|
||||||
self.animation.setDuration(60/72.*1000)
|
self.animation.setDuration(int(60/72.*1000))
|
||||||
self.animation.setLoopCount(4)
|
self.animation.setLoopCount(4)
|
||||||
self.animation.valueChanged.connect(self.value_changed)
|
self.animation.valueChanged.connect(self.value_changed)
|
||||||
self.setCursor(Qt.CursorShape.PointingHandCursor)
|
self.setCursor(Qt.CursorShape.PointingHandCursor)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user