mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 07:43:54 +02:00
Bug2105: Enable TAB to sliders on Mac...
... I think this is a defect in wxWidgets, but one we can work around with a simple wrapper class around wxSlider overriding one method. To make the fix complete, change all occurrences of "safenew wxSlider" but the one in ShuttleGui.cpp covers most cases
This commit is contained in:
committed by
James Crook
parent
3f6b5be500
commit
c8d95e1117
@@ -17,6 +17,7 @@
|
||||
#include "Audacity.h"
|
||||
|
||||
#include <vector>
|
||||
#include <wx/slider.h> // to inherit
|
||||
#include "MemoryX.h"
|
||||
|
||||
#include "WrappedType.h"
|
||||
@@ -76,6 +77,19 @@ class Shuttle;
|
||||
|
||||
class WrappedType;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
/// 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
|
||||
{
|
||||
public:
|
||||
using wxSlider::wxSlider;
|
||||
void SetFocus() override;
|
||||
};
|
||||
#else
|
||||
using wxSliderWrapper = wxSlider;
|
||||
#endif
|
||||
|
||||
class AUDACITY_DLL_API ShuttleGuiBase /* not final */
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user