diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-03-02 17:25:10 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-03-02 17:25:10 +0100 |
| commit | b74099c5fdb3fcbe7a6b89fc05069e219f7fb36c (patch) | |
| tree | 4977b4ee5324f96576c03e74345145738ae86db4 /src/Fl_Screen_Driver.cxx | |
| parent | a76229972e1c502690cdf584f157db2ba612d5c2 (diff) | |
Add OPTION_SIMPLE_ZOOM_SHORTCUT to fine tune zoom-in shortcut
Diffstat (limited to 'src/Fl_Screen_Driver.cxx')
| -rw-r--r-- | src/Fl_Screen_Driver.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx index e0a9f0f71..455c2c5fd 100644 --- a/src/Fl_Screen_Driver.cxx +++ b/src/Fl_Screen_Driver.cxx @@ -483,9 +483,11 @@ int Fl_Screen_Driver::scale_handler(int event) if (Fl::test_shortcut(FL_COMMAND+'+')) zoom = zoom_in; else if (Fl::test_shortcut(FL_COMMAND+'-')) zoom = zoom_out; else if (Fl::test_shortcut(FL_COMMAND+'0')) zoom = zoom_reset; - // kludge to recognize shortcut FL_COMMAND+'+' without pressing SHIFT - else if ((Fl::event_state()&(FL_META|FL_ALT|FL_CTRL|FL_SHIFT)) == FL_COMMAND && + if (Fl::option(Fl::OPTION_SIMPLE_ZOOM_SHORTCUT)) { + // kludge to recognize shortcut FL_COMMAND+'+' without pressing SHIFT + if ((Fl::event_state()&(FL_META|FL_ALT|FL_CTRL|FL_SHIFT)) == FL_COMMAND && Fl::event_key() == '=') zoom = zoom_in; + } if (zoom != none) { int i, count; if (Fl::grab()) return 0; // don't rescale when menu windows are on |
