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:
committed by
James Crook
parent
2ba17c78d6
commit
ad26c35d3c
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user