diff options
| author | dannye <33dannye@gmail.com> | 2024-12-05 16:49:49 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-05 23:49:49 +0100 |
| commit | 85f5887625c7c1d193da5f521786b7dfce1091ed (patch) | |
| tree | 3c103f62f3b35003f0d7246fc4df81b33d550dc4 /src/Fl_Button.cxx | |
| parent | 4317f6a15f68cf9395141d83d60100283ab48590 (diff) | |
Fix button down state when triggered by shortcut (#1145)
The visual feedback is really important. I was not aware that my patch suppressed that. And for the state values, I find it best to get back to what 1.3 did at this point. `value` is essential for check boxes and radio and toggle buttons. On push buttons, it has really not much of a meaning.
Diffstat (limited to 'src/Fl_Button.cxx')
| -rw-r--r-- | src/Fl_Button.cxx | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx index 05f0fad4c..308bb9bf3 100644 --- a/src/Fl_Button.cxx +++ b/src/Fl_Button.cxx @@ -192,17 +192,14 @@ int Fl_Button::handle(int event) { do_callback(FL_REASON_RELEASED); } else { simulate_key_action(); - value(1); if (when() & FL_WHEN_CHANGED) { set_changed(); Fl_Widget_Tracker wp(this); do_callback(FL_REASON_CHANGED); if (wp.deleted()) return 1; - value(0); set_changed(); do_callback(FL_REASON_RELEASED); } else if (when() & FL_WHEN_RELEASE) { - value(0); set_changed(); do_callback(FL_REASON_RELEASED); } |
