ConfigWizard: Bugfixes

This commit is contained in:
Vojtech Kral 2019-02-07 15:55:47 +01:00
parent b0f54e5709
commit 7d969a6f36
6 changed files with 96 additions and 56 deletions

View file

@ -26,6 +26,22 @@ wxTopLevelWindow* find_toplevel_parent(wxWindow *window)
return nullptr;
}
void on_window_geometry(wxTopLevelWindow *tlw, std::function<void()> callback)
{
tlw->Bind(wxEVT_CREATE, [=](wxWindowCreateEvent &event) {
#ifdef __linux__
// On Linux, the geometry is only available after wxEVT_CREATE + CallAfter
// cf. https://groups.google.com/forum/?pli=1#!topic/wx-users/fERSXdpVwAI
tlw->CallAfter([=]() {
#endif
callback();
#ifdef __linux__
});
#endif
event.Skip();
});
}
CheckboxFileDialog::ExtraPanel::ExtraPanel(wxWindow *parent)
: wxPanel(parent, wxID_ANY)