This PR adds an option to disable zooming the edit view. There is currently no other way to disable zooming with the scroll wheel. Even when the zoom keybindings are disabled, the scrollwheel still zooms. The default is disabled (zooming is enabled), which is the current default.
I have the editor font sent to a comfortable size. Many shortcuts consist of combining the Control key with others. And of course, the touchpad is used for moving the cursor. So very frequently (multiple times per day), I accidentally engage the scrolling function of the touchpad while the control key is pressed. This causes the editor view to zoom, which is disruptive. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2954
-- Commit Summary --
* <a href="https://github.com/geany/geany/pull/2954/commits/34859e7d189516580e0a70fa2169e0d0104f8f1b">Add option to disable editor zooming</a>
-- File Changes --
M doc/geany.txt (3) M src/editor.c (5) M src/editor.h (1) M src/keyfile.c (2) M src/plugindata.h (2)
-- Patch Links --
https://github.com/geany/geany/pull/2954.patch https://github.com/geany/geany/pull/2954.diff
@elextr commented on this pull request.
Havn't tested and won't for some time, but looks ok apart from the comments.
@@ -138,6 +138,7 @@ typedef struct GeanyEditorPrefs
gint autocompletion_update_freq; gint scroll_lines_around_cursor; gint ime_interaction; /* input method editor's candidate window behaviour */ + gboolean zoom_disable;
alignment
@@ -58,7 +58,7 @@ G_BEGIN_DECLS
* @warning You should not test for values below 200 as previously * @c GEANY_API_VERSION was defined as an enum value, not a macro. */ -#define GEANY_API_VERSION 240 +#define GEANY_API_VERSION 241
Nothing has changed in the plugin API so no need.
To answer the obvious question, the GeanyEditorPrefs type is visible, but as none of the members are documented it should be treated as an opaque type as far as plugins are concerned.
@xiota commented on this pull request.
@@ -58,7 +58,7 @@ G_BEGIN_DECLS
* @warning You should not test for values below 200 as previously * @c GEANY_API_VERSION was defined as an enum value, not a macro. */ -#define GEANY_API_VERSION 240 +#define GEANY_API_VERSION 241
Thank you.
@xiota pushed 1 commit.
46eeb66d161f656e50a413f94e129353aeb41b07 Fix alignment and revert GEANY_API_VERSION
Havn't tested and won't for some time, but looks ok apart from the comments.
@elextr Thanks for letting me know. I've fixed the issues you mentioned.
@xiota pushed 1 commit.
8724e3695f70961a3b9fe3bf401204b76cc7229d Allow zoom via keybindings
@xiota pushed 3 commits.
83f324cfccb7610f617255ed81f71b3363e5997b Add option to disable editor zooming via scrollwheel 02d72e33dd7d776aa85bfc38c1827c61c92eb75b Expand range of zoom keybindings a5a66e3a20be890cbe24b151a9c4ed77d3a0d58f When scrollwheel zoom is disabled, keep current zoom level instead of resetting
@xiota pushed 4 commits.
2e9d4a4ad54de1a0ba4ff6508bebbcd0d8ca1bf6 Add option to disable editor zooming via scrollwheel d018a0ed862182f76e8095288c41f3f76c5b27aa Expand range of zoom keybindings 63d771312831c1aa0ffdf4990e874f0993bfe14a When scrollwheel zoom is disabled, keep current zoom level instead of resetting 6995bd3de8b8eb65149143915b596cdc2eb37c2d remove unnecessary timeout callback
@xiota pushed 1 commit.
41d461e5ea969cfa66995b5097922195edcc19e6 remove redundant zoom-out font size check
@xiota pushed 5 commits.
afbdded2bf74d25227d026eecc33fcebd79d9f9b Add option to disable editor zooming via scrollwheel 9087197633a090a522d3d2a73734af6e90222dfa Expand range of zoom keybindings 60ecaadfc1c328c39ed844504aba1d126fa1efa0 When scrollwheel zoom is disabled, keep current zoom level instead of resetting 22e65eb847213cb10c20d06e9dae0a50678f4ad9 remove unnecessary timeout callback 4f04bba71d5ad1ccf021cf13b199f9c44e8e9328 remove redundant zoom-out font size check
Force push to rebase and guarantee no conflicts with recent session-split commit.
@elextr Probability of getting this reviewed/merged if I rebase and update for current git head?
Just thinking about it again, rather than waiting for Scintilla to get the ctrl+scroll and then resetting it, a better way would be to intercept the event in Geany [here](https://github.com/geany/geany/blob/dbaf99e3528a2f9007c4ab0ced416bdd87c22574...) and not propagate it to Scintilla in the first place.
@elextr I'll look into your suggestion. Assuming it works well, should it go into a new PR or modify this one?
Probably cleaner to make a new one
@elextr Should unlocking zoom levels to be in a separate PR, or okay to bundle with the option to turn off scroll-wheel zooming?
Closed #2954.
github-comments@lists.geany.org