implement snap back

Only works on Windows. In Linux this is disabled.
This commit is contained in:
2024-04-21 17:37:35 +02:00
parent 811e3c7f82
commit 9c1b8298be

View File

@@ -118,6 +118,7 @@ class BigScrollBar(QWidget):
if self.pressedControl == QStyle.SubControl.SC_ScrollBarSlider: if self.pressedControl == QStyle.SubControl.SC_ScrollBarSlider:
self.click_offset = click.y() - sr.y() self.click_offset = click.y() - sr.y()
self.snap_back_position = self.value
if (self.pressedControl == QStyle.SubControl.SC_ScrollBarAddPage if (self.pressedControl == QStyle.SubControl.SC_ScrollBarAddPage
or self.pressedControl == QStyle.SubControl.SC_ScrollBarSubPage) \ or self.pressedControl == QStyle.SubControl.SC_ScrollBarSubPage) \