diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl.cxx | 4 | ||||
| -rw-r--r-- | src/Fl_Screen_Driver.cxx | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index dcf4be3bc..43115cc6a 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -2010,6 +2010,8 @@ bool Fl::option(Fl_Option opt) options_[OPTION_SHOW_SCALING] = tmp; opt_prefs.get("UseZenity", tmp, 1); // default: on options_[OPTION_FNFC_USES_ZENITY] = tmp; + opt_prefs.get("SimpleZoomShortcut", tmp, 0); // default: off + options_[OPTION_SIMPLE_ZOOM_SHORTCUT] = tmp; } { // next, check the user preferences // override system options only, if the option is set ( >= 0 ) @@ -2036,6 +2038,8 @@ bool Fl::option(Fl_Option opt) if (tmp >= 0) options_[OPTION_SHOW_SCALING] = tmp; opt_prefs.get("UseZenity", tmp, -1); if (tmp >= 0) options_[OPTION_FNFC_USES_ZENITY] = tmp; + opt_prefs.get("SimpleZoomShortcut", tmp, -1); + if (tmp >= 0) options_[OPTION_SIMPLE_ZOOM_SHORTCUT] = tmp; } { // now, if the developer has registered this app, we could ask for per-application preferences } 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 |
