diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-03-29 22:27:35 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-03-29 22:38:28 +0200 |
| commit | 5baecb091f5f3f956be002668ce74291c7826b95 (patch) | |
| tree | b9583297ce05ddf133ed441dac946b439b8d0fb2 /src/wx/dcpomatic_spin_ctrl.h | |
| parent | 25142b529304096d22baf885c45ba41bce480b72 (diff) | |
Fix strange problems with spin entries on macOS (#1944).
SetRange() with minimum > 0 seems to stop entry of numbers by selecting
the existing one and typing new. Also we can make Enter work properly
by adding a handler.
Diffstat (limited to 'src/wx/dcpomatic_spin_ctrl.h')
| -rw-r--r-- | src/wx/dcpomatic_spin_ctrl.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/wx/dcpomatic_spin_ctrl.h b/src/wx/dcpomatic_spin_ctrl.h new file mode 100644 index 000000000..556cf6347 --- /dev/null +++ b/src/wx/dcpomatic_spin_ctrl.h @@ -0,0 +1,41 @@ +/* + Copyright (C) 2021 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + + +#ifndef DCPOMATIC_SPIN_CTRL_H +#define DCPOMATIC_SPIN_CTRL_H + + +#include "lib/warnings.h" +DCPOMATIC_DISABLE_WARNINGS +#include <wx/spinctrl.h> +#include <wx/wx.h> +DCPOMATIC_ENABLE_WARNINGS + + +class SpinCtrl : public wxSpinCtrl +{ +public: + SpinCtrl (wxWindow* parent, int width); +}; + + +#endif + |
