From: Volodymyr Poltavets Date: Thu, 13 May 2021 19:41:42 +0000 (+0200) Subject: * Fixed inconsistent mouse wheel scrolling behavior X-Git-Tag: v0.3~64 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=23b09e101a44f0f3875b825cf440d56d49d25c58;p=ffpreview.git * Fixed inconsistent mouse wheel scrolling behavior --- diff --git a/ffpreview.py b/ffpreview.py index b8b2baf..83ee736 100755 --- a/ffpreview.py +++ b/ffpreview.py @@ -426,8 +426,7 @@ class tScrollArea(QScrollArea): if tlwidth < 1 or tlheight < 1: return rows = int(self.viewport().height() / tlheight + 0.5) - self.verticalScrollBar().setPageStep(tlheight) - self.verticalScrollBar().setSingleStep(tlheight) + self.verticalScrollBar().setPageStep(self.verticalScrollBar().maximum() / rows * tlheight) cfg['grid_rows'] = rows cols = int((self.viewport().width()) / tlwidth) if cols < 1: