Skip to content

Commit

Permalink
Scroll the messages window per pixel
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lmoureaux authored and jwrober committed Aug 2, 2022
1 parent 19d3d53 commit 30ae545
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/messagewin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 30ae545

Please sign in to comment.