diff options
author | Alex <a1ex@dismail.de> | 2024-04-08 21:15:43 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-04-09 19:59:55 +0200 |
commit | 633da750d19c3ca726c912aa5e45fd6b01327bd3 (patch) | |
tree | 337735b2f61d80bbac0dbf1fc9072efc9715002c /src/uicmd.cc | |
parent | 3eb3739980bc50705acbdeff6f175d4c0201bf31 (diff) |
Control the direction of tab scrolling
Adds the scroll_switches_tabs_reverse option in dillorc to allows
reversing the direction of tab switching based on the movement of the
mouse wheel.
See: https://lists.mailman3.com/hyperkitty/list/dillo-dev@mailman3.com/thread/F2EF4NHF3CBMJ3XZII2TFIE6MSXEE5AD/
Fixes: https://github.com/dillo-browser/dillo/issues/122
Reviewed-by: Rodrigo Arias Mallo <rodarima@gmail.com>
Diffstat (limited to 'src/uicmd.cc')
-rw-r--r-- | src/uicmd.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/uicmd.cc b/src/uicmd.cc index 02d2a141..88bc9b7d 100644 --- a/src/uicmd.cc +++ b/src/uicmd.cc @@ -254,6 +254,9 @@ int CustTabs::handle(int e) int dy = Fl::event_dy(); int dir = dy ? dy : dx; + if (prefs.scroll_switches_tabs_reverse) + dir = -dir; + if (dir > 0) next_tab(); else if (dir < 0) |