mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-06 23:02:42 +02:00
Make tabbing between toolbar buttons work on Mac
This commit is contained in:
parent
fe509ed412
commit
d31e96aa57
@ -242,6 +242,15 @@ void AButton::UseDisabledAsDownHiliteImage(bool 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,
|
||||
wxImage up,
|
||||
wxImage over,
|
||||
|
@ -59,6 +59,8 @@ class AButton final : public wxWindow {
|
||||
bool AcceptsFocus() const override { return s_AcceptsFocus; }
|
||||
bool AcceptsFocusFromKeyboard() const override { return true; }
|
||||
|
||||
void SetFocusFromKbd() override;
|
||||
|
||||
// Associate a set of four images (button up, highlight, button down,
|
||||
// disabled) with one nondefault state of the button
|
||||
void SetAlternateImages(unsigned idx,
|
||||
|
Loading…
x
Reference in New Issue
Block a user