-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Hey, I'm not sure how difficult it would be, but I have a peeve with how smooth scroll is implemented in Logitech's driver. Namely, it introduces a delay in the scroll. Instead of applying the delta that comes from the mouse immediately, it "smooths" it out, by a series of small deltas.
Or at least I'm pretty sure it does, but I seriously doubt that the deltas trickling is done in hardware.
Here's a little Python script that demonstrates it. Try scrolling with and without smooth scrolling enabled. Obviously there's going to be neat 120 deltas without smooth scrolling, but more interestingly, you will see a trickle of 1 values over a fraction of a second with smooth scrolling enabled.
import sys
from PySide6.QtWidgets import QApplication, QWidget, QVBoxLayout, QTextEdit
from PySide6.QtCore import Qt
MAX_ENTRIES = 100
class ScrollLogger(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("Scroll Delta Logger")
self.resize(350, 250)
self.log = QTextEdit()
self.log.setReadOnly(True)
layout = QVBoxLayout()
layout.addWidget(self.log)
self.setLayout(layout)
def wheelEvent(self, event):
d = event.angleDelta()
self.add_entry(f"x={d.x()}, y={d.y()}")
def add_entry(self, text):
lines = self.log.toPlainText().splitlines()
lines.append(text)
if len(lines) > MAX_ENTRIES:
lines = lines[-MAX_ENTRIES:]
self.log.setPlainText("\n".join(lines))
self.log.verticalScrollBar().setValue(self.log.verticalScrollBar().maximum())
if __name__ == "__main__":
app = QApplication(sys.argv)
w = ScrollLogger()
w.show()
sys.exit(app.exec())This "smoothing" is very jarring to me. Is there a chance you could make a patch that applies the deltas directly?