Main book list: Scroll per pixel rather than per item by default. Can be returned to previous behavior via Preferences->Tweaks->Control behavior of book list.

Fixes #1450 (Use Pixel-Based Scrolling in the Main Library View)
This commit is contained in:
Kovid Goyal 2021-06-12 07:57:05 +05:30
parent 5279a3b5cd
commit 68bc3cb2cb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 3 deletions

View File

@ -382,11 +382,12 @@ cover_trim_fuzz_value = 10
# has the side effect of disabling editing a field using a single click.
# Default: open_viewer.
# Example: doubleclick_on_library_view = 'do_nothing'
# You can also control whether the book list scrolls horizontal per column or
# per pixel. Default is per column.
# You can also control whether the book list scrolls per item or
# per pixel. Default is per item.
doubleclick_on_library_view = 'open_viewer'
enter_key_behavior = 'do_nothing'
horizontal_scrolling_per_column = True
horizontal_scrolling_per_column = False
vertical_scrolling_per_row = False
#: Language to use when sorting
# Setting this tweak will force sorting to use the

View File

@ -237,6 +237,8 @@ class BooksView(QTableView): # {{{
for wv in self, self.pin_view:
if not tweaks['horizontal_scrolling_per_column']:
wv.setHorizontalScrollMode(QAbstractItemView.ScrollMode.ScrollPerPixel)
if not tweaks['vertical_scrolling_per_row']:
wv.setVerticalScrollMode(QAbstractItemView.ScrollMode.ScrollPerPixel)
wv.setEditTriggers(QAbstractItemView.EditTrigger.EditKeyPressed)
tval = tweaks['doubleclick_on_library_view']