Fix fc2dconfig minimum window size
This commit is contained in:
parent
ad23fb6a1e
commit
6ced9f4d67
|
@ -52,16 +52,14 @@ ConfigurationFrame::ConfigurationFrame() : wxFrame(NULL, wxID_ANY, "Configure "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxPanel* panel = new wxPanel(this, wxID_ANY);
|
|
||||||
|
|
||||||
// define all controls and labels
|
// define all controls and labels
|
||||||
useHaarCheckBox = new wxCheckBox(panel, wxID_ANY, "Disable DNN face detection");
|
useHaarCheckBox = new wxCheckBox(this , wxID_ANY, "Disable DNN face detection");
|
||||||
showCameraCheckBox = new wxCheckBox(panel, wxID_ANY, "Show camera feed");
|
showCameraCheckBox = new wxCheckBox(this , wxID_ANY, "Show camera feed");
|
||||||
noEyesCheckBox = new wxCheckBox(panel, wxID_ANY, "Disable eye tracking");
|
noEyesCheckBox = new wxCheckBox(this , wxID_ANY, "Disable eye tracking");
|
||||||
wxStaticText* modelNameText = new wxStaticText(panel, wxID_ANY, "Model name:");
|
wxStaticText* modelNameText = new wxStaticText(this, wxID_ANY, "Model name:");
|
||||||
modelNameChoice = new wxChoice(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, modelVec.size(), modelArray);
|
modelNameChoice = new wxChoice(this , wxID_ANY, wxDefaultPosition, wxDefaultSize, modelVec.size(), modelArray);
|
||||||
wxStaticText* cameraText = new wxStaticText(panel, wxID_ANY, "Camera ID:");
|
wxStaticText* cameraText = new wxStaticText(this , wxID_ANY, "Camera ID:");
|
||||||
cameraSpinCtrl = new wxSpinCtrl(panel);
|
cameraSpinCtrl = new wxSpinCtrl(this);
|
||||||
|
|
||||||
wxBoxSizer* modelSizer = new wxBoxSizer(wxHORIZONTAL); // need to put label next to dropdown
|
wxBoxSizer* modelSizer = new wxBoxSizer(wxHORIZONTAL); // need to put label next to dropdown
|
||||||
modelSizer->Add(modelNameText, 0, wxALIGN_CENTER | wxALL, 5);
|
modelSizer->Add(modelNameText, 0, wxALIGN_CENTER | wxALL, 5);
|
||||||
|
@ -80,19 +78,19 @@ ConfigurationFrame::ConfigurationFrame() : wxFrame(NULL, wxID_ANY, "Configure "
|
||||||
|
|
||||||
|
|
||||||
// General section
|
// General section
|
||||||
wxStaticBoxSizer* generalBoxSizer = new wxStaticBoxSizer(new wxStaticBox(panel, wxID_ANY, "General"), wxVERTICAL);
|
wxStaticBoxSizer* generalBoxSizer = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, "General"), wxVERTICAL);
|
||||||
generalBoxSizer->Add(modelSizer, 0, wxALL, 5);
|
generalBoxSizer->Add(modelSizer, 0, wxALL, 5);
|
||||||
generalBoxSizer->Add(cameraSizer, 0, wxALL, 5);
|
generalBoxSizer->Add(cameraSizer, 0, wxALL, 5);
|
||||||
generalBoxSizer->Add(showCameraCheckBox, 0, wxALL, 5);
|
generalBoxSizer->Add(showCameraCheckBox, 0, wxALL, 5);
|
||||||
|
|
||||||
// Performance section
|
// Performance section
|
||||||
wxStaticBoxSizer* performanceBoxSizer = new wxStaticBoxSizer(new wxStaticBox(panel, wxID_ANY, "Performance"), wxVERTICAL);
|
wxStaticBoxSizer* performanceBoxSizer = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, "Performance"), wxVERTICAL);
|
||||||
performanceBoxSizer->Add(useHaarCheckBox, 0, wxALL, 5);
|
performanceBoxSizer->Add(useHaarCheckBox, 0, wxALL, 5);
|
||||||
performanceBoxSizer->Add(noEyesCheckBox, 0, wxALL, 5);
|
performanceBoxSizer->Add(noEyesCheckBox, 0, wxALL, 5);
|
||||||
|
|
||||||
// define bottom buttons (Cancel and Apply) and their sizer
|
// define bottom buttons (Cancel and Apply) and their sizer
|
||||||
wxButton* cancelButton = new wxButton(panel, wxID_CANCEL, "Cancel");
|
wxButton* cancelButton = new wxButton(this, wxID_CANCEL, "Cancel");
|
||||||
wxButton* applyButton = new wxButton(panel, wxID_APPLY, "Apply settings");
|
wxButton* applyButton = new wxButton(this, wxID_APPLY, "Apply settings");
|
||||||
wxBoxSizer* bottomButtonSizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer* bottomButtonSizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
bottomButtonSizer->Add(cancelButton, 0, wxALL, 5);
|
bottomButtonSizer->Add(cancelButton, 0, wxALL, 5);
|
||||||
bottomButtonSizer->Add(applyButton, 0, wxALL, 5);
|
bottomButtonSizer->Add(applyButton, 0, wxALL, 5);
|
||||||
|
@ -104,7 +102,7 @@ ConfigurationFrame::ConfigurationFrame() : wxFrame(NULL, wxID_ANY, "Configure "
|
||||||
sizer->AddStretchSpacer(1);
|
sizer->AddStretchSpacer(1);
|
||||||
sizer->Add(bottomButtonSizer, 0, wxALIGN_RIGHT | wxALL, 10);
|
sizer->Add(bottomButtonSizer, 0, wxALIGN_RIGHT | wxALL, 10);
|
||||||
|
|
||||||
panel->SetSizerAndFit(sizer);
|
SetSizerAndFit(sizer);
|
||||||
|
|
||||||
Bind(wxEVT_BUTTON, &ConfigurationFrame::OnApply, this, wxID_APPLY);
|
Bind(wxEVT_BUTTON, &ConfigurationFrame::OnApply, this, wxID_APPLY);
|
||||||
Bind(wxEVT_BUTTON, &ConfigurationFrame::OnExit, this, wxID_CANCEL);
|
Bind(wxEVT_BUTTON, &ConfigurationFrame::OnExit, this, wxID_CANCEL);
|
||||||
|
|
Loading…
Reference in a new issue