As you can see, the labels on the static box have a white background, which looks pretty terrible, but the main problem is that they are overlapped by the box's contents. This is despite adding spacers to the sizer, which seems to have no effect on Windows.
Code: Select all
wxStaticBox* ParamsPage::constructRenderParamsPanel(wxWindow* parent) {
auto box = new wxStaticBox(parent, wxID_ANY, wxGetTranslation("General"));
auto grid = new wxFlexGridSizer(2);
box->SetSizer(grid);
auto lblMaxI = constructLabel(box, wxGetTranslation("Max iterations"));
string strMaxI = std::to_string(DEFAULT_MAX_ITERATIONS);
m_txtMaxIterations = constructTextBox(box, strMaxI);
m_txtMaxIterations->SetValidator(wxTextValidator(wxFILTER_DIGITS));
auto lblZoomAmount = constructLabel(box,
wxGetTranslation("Zoom amount"));
m_txtZoomAmount = constructTextBox(box, std::to_string(DEFAULT_ZOOM));
m_txtZoomAmount->SetValidator(wxTextValidator(wxFILTER_NUMERIC));
grid->AddSpacer(10);
grid->AddSpacer(10);
grid->Add(lblMaxI, 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
grid->Add(m_txtMaxIterations, 0, wxEXPAND | wxRIGHT, 10);
grid->Add(lblZoomAmount, 0, wxEXPAND | wxLEFT | wxRIGHT, 10);
grid->Add(m_txtZoomAmount, 0, wxEXPAND | wxRIGHT, 10);
grid->AddGrowableCol(0);
return box;
}