Skip to content

Commit

Permalink
Force minimum y sizing of the main window.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiw committed Dec 3, 2023
1 parent ec735f3 commit e5bc107
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ void MainFrame::loadConfiguration_()

Move(x, y);
Fit();
wxSize size = GetBestSize();
wxSize size = GetMinSize();

if (w < size.GetWidth()) w = size.GetWidth();
if (h < size.GetHeight()) h = size.GetHeight();
Expand Down
7 changes: 4 additions & 3 deletions src/topFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_textCodec2Var = new wxStaticText(statsBox, wxID_ANY, wxT("Var: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
sbSizer_ber->Add(m_textCodec2Var, 0, wxALL | wxALIGN_LEFT, 1);

leftSizer->Add(sbSizer_ber,0, wxALL|wxEXPAND, 2);
leftSizer->Add(sbSizer_ber,0, wxALL|wxEXPAND|wxFIXED_MINSIZE, 2);

//------------------------------
// Help button: goes to Help page on website
Expand All @@ -532,7 +532,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_btnHelp->SetToolTip(_("Get help with FreeDV."));
helpSizer->Add(m_btnHelp, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
leftSizer->SetMinSize(wxSize(-1, 375));
leftOuterSizer->Add(leftSizer, 2, wxALL | wxEXPAND, 1);
leftOuterSizer->Add(leftSizer, 2, wxALL | wxEXPAND | wxFIXED_MINSIZE, 1);
leftOuterSizer->Add(helpSizer, 0, wxFIXED_MINSIZE | wxALL | wxEXPAND, 1);

bSizer1->Add(leftOuterSizer, 0, wxALL|wxEXPAND, 5);
Expand Down Expand Up @@ -777,7 +777,8 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
this->Layout();

m_statusBar1 = this->CreateStatusBar(1, wxSTB_DEFAULT_STYLE, wxID_ANY);

this->SetMinSize(wxSize(-1, 435));

//=====================================================
// End of layout
//=====================================================
Expand Down

0 comments on commit e5bc107

Please sign in to comment.