diff --git a/src/widgets/AButton.cpp b/src/widgets/AButton.cpp index 4d64460d7..2097af780 100644 --- a/src/widgets/AButton.cpp +++ b/src/widgets/AButton.cpp @@ -35,7 +35,7 @@ #include "../Project.h" #include -BEGIN_EVENT_TABLE(AButton, wxButton) +BEGIN_EVENT_TABLE(AButton, wxWindow) EVT_MOUSE_EVENTS(AButton::OnMouseEvent) EVT_MOUSE_CAPTURE_LOST(AButton::OnCaptureLost) EVT_KEY_DOWN(AButton::OnKeyDown) @@ -161,7 +161,7 @@ AButton::AButton(wxWindow * parent, wxImage down, wxImage dis, bool toggle): - wxButton() + wxWindow() { Init(parent, id, pos, size, ImageRoll(up), ImageRoll(over), @@ -178,7 +178,7 @@ AButton::AButton(wxWindow * parent, ImageRoll down, ImageRoll dis, bool toggle): - wxButton() + wxWindow() { Init(parent, id, pos, size, up, over, down, dis, @@ -205,7 +205,7 @@ void AButton::Init(wxWindow * parent, // a navigation event - move to next control. As a workaround, the style wxWANTS_CHARS // results in all characters being available in the OnKeyDown function below. Note // that OnKeyDown now has to handle navigation. - Create(parent, id, wxEmptyString, pos, size, wxWANTS_CHARS | wxBORDER_NONE); + Create(parent, id, pos, size, wxWANTS_CHARS); mWasShiftDown = false; mWasControlDown = false; diff --git a/src/widgets/AButton.h b/src/widgets/AButton.h index 9274adffb..0b9ae77f5 100644 --- a/src/widgets/AButton.h +++ b/src/widgets/AButton.h @@ -19,13 +19,12 @@ #include #endif -#include #include #include #include "ImageRoll.h" -class AButton final : public wxButton { +class AButton final : public wxWindow { friend class AButtonAx; class Listener;