From 90a947b7b208c13d39c85b40a3a30587176498aa Mon Sep 17 00:00:00 2001 From: Louis Moureaux Date: Tue, 2 Aug 2022 00:33:56 +0200 Subject: [PATCH] Scroll the messages window per pixel Scrolling per item results in jumpy behavior, especially with messages of varying height. This in turn results in scrolling being hard on imprecise devices that generate many scroll events, like touchpads. This was found to be the underlying issue in a request to add arrows to scroll bars, #1162. Closes #1162. --- client/messagewin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/client/messagewin.cpp b/client/messagewin.cpp index 1358d2cda2..6aaab27cd4 100644 --- a/client/messagewin.cpp +++ b/client/messagewin.cpp @@ -52,6 +52,7 @@ message_widget::message_widget(QWidget *parent) mesg_table = new QListWidget; mesg_table->setEditTriggers(QAbstractItemView::NoEditTriggers); mesg_table->setSelectionMode(QAbstractItemView::SingleSelection); + mesg_table->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); mesg_table->setTextElideMode(Qt::ElideNone); mesg_table->setWordWrap(true); layout->addWidget(mesg_table, 1, 0, 1, 3);