Implemented blinking icon to highlight a searched field

This commit is contained in:
YuSanka 2020-04-07 12:09:58 +02:00
parent 2317437ede
commit 752083cbe6
6 changed files with 59 additions and 18 deletions

View file

@ -69,6 +69,13 @@ Tab::Tab(wxNotebook* parent, const wxString& title, Preset::Type type) :
page->layout_valid = false;
evt.Skip();
}));
this->m_highlighting_timer.SetOwner(this, 0);
this->Bind(wxEVT_TIMER, [this](wxTimerEvent&)
{
if (!m_highlighter.blink())
m_highlighting_timer.Stop();
});
}
void Tab::set_type()
@ -992,8 +999,11 @@ void Tab::activate_option(const std::string& opt_key, const wxString& category)
tap_panel->SetSelection(page_id);
// focused selected field
if (field)
if (field) {
field->getWindow()->SetFocus();
m_highlighting_timer.Start(500, false);
m_highlighter.init(field);
}
}