From d9ddb2e10d4ee57deddecb777941d77dbd8f00c8 Mon Sep 17 00:00:00 2001 From: sefgit Date: Sat, 2 Dec 2023 19:15:01 +0700 Subject: [PATCH 1/2] *.py unix line ending --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index a0f45762..2f54066a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,7 +5,7 @@ # to native line endings on checkout. *.c text *.h text -*.py text +*.py text eol=lf # Declare files that will always have CRLF line endings on checkout. *.sln text eol=crlf From d41dfeae0e275f904551e0f64cb10ce44df22f47 Mon Sep 17 00:00:00 2001 From: sefgit Date: Tue, 5 Dec 2023 14:01:25 +0700 Subject: [PATCH 2/2] add mousewheel support to pan workarea mousewheel scroll for vertical movement, hold SHIFT for horizontal movement. TODO: Looking for ways to implement workarea zoom while holding CTRL. --- nodezator/winman/states/loadedfile.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nodezator/winman/states/loadedfile.py b/nodezator/winman/states/loadedfile.py index e1cafc58..0012bf6e 100644 --- a/nodezator/winman/states/loadedfile.py +++ b/nodezator/winman/states/loadedfile.py @@ -41,6 +41,7 @@ MOUSEMOTION, MOUSEBUTTONUP, MOUSEBUTTONDOWN, + MOUSEWHEEL, ) @@ -73,6 +74,14 @@ def loaded_file_event_handling(self): if event.type == QUIT: raise QuitAppException + ### MOUSEWHEEL + elif event.type == MOUSEWHEEL: + mod = SERVICES_NS.get_pressed_mod_keys() + if mod & KMOD_SHIFT: #KMOD_CTRL: + APP_REFS.ea.scroll(event.y*50, event.x*50) + else: + APP_REFS.ea.scroll(event.x*50, event.y*50) + ### MOUSEMOTION elif event.type == MOUSEMOTION: