1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-25 07:35:44 +01:00

Fix some tabbing issues on Linux

This commit is contained in:
Leland Lucius
2015-08-04 22:22:49 -05:00
parent b070053e0f
commit 7e49dc45d1
4 changed files with 22 additions and 43 deletions

View File

@@ -46,6 +46,8 @@ BEGIN_EVENT_TABLE(AButton, wxWindow)
EVT_ERASE_BACKGROUND(AButton::OnErase)
END_EVENT_TABLE()
// LL: An alternative to this might be to just use the wxEVT_KILL_FOCUS
// or wxEVT_ACTIVATE events.
class AButton::Listener
: public wxEvtHandler
{
@@ -464,16 +466,10 @@ void AButton::OnKeyDown(wxKeyEvent & event)
switch( event.GetKeyCode() )
{
case WXK_RIGHT:
Navigate();
NavigateIn(wxNavigationKeyEvent::IsForward);
break;
case WXK_LEFT:
Navigate(wxNavigationKeyEvent::IsBackward);
break;
case WXK_TAB:
if (event.ShiftDown())
Navigate(wxNavigationKeyEvent::IsBackward);
else
Navigate();
NavigateIn(wxNavigationKeyEvent::IsBackward);
break;
case WXK_RETURN:
case WXK_NUMPAD_ENTER:
@@ -510,16 +506,18 @@ bool AButton::WasControlDown()
void AButton::Enable()
{
wxWindow::Enable(true);
mEnabled = true;
this->Refresh(false);
Refresh(false);
}
void AButton::Disable()
{
wxWindow::Enable(false);
mEnabled = false;
if (GetCapture()==this)
ReleaseMouse();
this->Refresh(false);
Refresh(false);
}
void AButton::PushDown()