1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-25 07:43:54 +02:00

Fix Tab key navigation on Mac in presence of static boxes

This commit is contained in:
Paul Licameli
2019-04-30 19:12:06 -04:00
committed by James Crook
parent 2ba17c78d6
commit ad26c35d3c
3 changed files with 19 additions and 4 deletions

View File

@@ -78,6 +78,21 @@ class Shuttle;
class WrappedType;
#ifdef __WXMAC__
#include <wx/statbox.h> // to inherit
class wxStaticBoxWrapper
: public wxStaticBox // inherit to get access to m_container
{
public:
template< typename... Args >
wxStaticBoxWrapper( Args &&...args )
: wxStaticBox( std::forward<Args>(args)... )
{
m_container.EnableSelfFocus();
}
};
/// Fix a defect in TAB key navigation to sliders, known to happen in wxWidgets
/// 3.1.1 and maybe in earlier versions
class wxSliderWrapper : public wxSlider
@@ -87,6 +102,7 @@ public:
void SetFocus() override;
};
#else
using wxStaticBoxWrapper = wxStaticBox;
using wxSliderWrapper = wxSlider;
#endif