FIX: stop keyboard tab navigation in StaticLine/SpinInput

Change-Id: Id0287418acc36bf9f74a62df79ecf99354f01cc9
This commit is contained in:
chunmao.guo 2022-07-28 09:46:30 +08:00 committed by Lane.Wei
parent 807cc2236d
commit 173b43d2bd
2 changed files with 2 additions and 1 deletions

View file

@ -239,7 +239,7 @@ Button *SpinInput::createButton(bool inc)
{
auto btn = new Button(this, "", inc ? "spin_inc" : "spin_dec", wxBORDER_NONE, 6);
btn->SetCornerRadius(0);
btn->SetCanFocus(false);
btn->DisableFocusFromKeyboard();
btn->Bind(wxEVT_LEFT_DOWN, [=](auto &e) {
delta = inc ? 1 : -1;
SetValue(val + delta);

View file

@ -16,6 +16,7 @@ StaticLine::StaticLine(wxWindow* parent, bool vertical, const wxString& label)
{
wxWindow::SetBackgroundColour(parent->GetBackgroundColour());
this->pen = wxPen(wxColour("#C4C4C4"));
DisableFocusFromKeyboard();
SetFont(Label::Body_14);
SetLabel(label);
}