mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-19 23:21:33 +01:00
Make tabbing between toolbar buttons work on Mac
This commit is contained in:
@@ -242,6 +242,15 @@ void AButton::UseDisabledAsDownHiliteImage(bool flag)
|
|||||||
mUseDisabledAsDownHiliteImage = flag;
|
mUseDisabledAsDownHiliteImage = flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This compensates for a but in wxWidgets 3.0.2 for mac:
|
||||||
|
// Couldn't set focus from keyboard when AcceptsFocus returns false;
|
||||||
|
// this bypasses that limitation
|
||||||
|
void AButton::SetFocusFromKbd()
|
||||||
|
{
|
||||||
|
auto temp = AButton::TemporarilyAllowFocus();
|
||||||
|
SetFocus();
|
||||||
|
}
|
||||||
|
|
||||||
void AButton::SetAlternateImages(unsigned idx,
|
void AButton::SetAlternateImages(unsigned idx,
|
||||||
wxImage up,
|
wxImage up,
|
||||||
wxImage over,
|
wxImage over,
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ class AButton final : public wxWindow {
|
|||||||
bool AcceptsFocus() const override { return s_AcceptsFocus; }
|
bool AcceptsFocus() const override { return s_AcceptsFocus; }
|
||||||
bool AcceptsFocusFromKeyboard() const override { return true; }
|
bool AcceptsFocusFromKeyboard() const override { return true; }
|
||||||
|
|
||||||
|
void SetFocusFromKbd() override;
|
||||||
|
|
||||||
// Associate a set of four images (button up, highlight, button down,
|
// Associate a set of four images (button up, highlight, button down,
|
||||||
// disabled) with one nondefault state of the button
|
// disabled) with one nondefault state of the button
|
||||||
void SetAlternateImages(unsigned idx,
|
void SetAlternateImages(unsigned idx,
|
||||||
|
|||||||
Reference in New Issue
Block a user