Backward-compatible fixes to use of sizers for wxWidgets 3.1.5

This commit is contained in:
Charlie Fenton 2021-09-30 23:49:41 -07:00
parent 83afef6cc2
commit 05a9ddab3b
2 changed files with 7 additions and 9 deletions

View File

@ -169,13 +169,10 @@ CDlgExclusiveApps::CDlgExclusiveApps(wxWindow* parent) :
ReadPreferenceSettings();
// CAF SetSizerAndFit(dialogSizer);
Layout();
dialogSizer->Fit( this );
SetSizer( dialogSizer );
Layout();
SetSizerAndFit(dialogSizer);
// CAF Fit();
Centre();
Centre(); // Center the dialog over the main window
}
/* destructor */

View File

@ -1000,10 +1000,9 @@ CSimpleGUIPanel::CSimpleGUIPanel(wxWindow* parent) :
mainSizer->Add( buttonsSizer, 0, wxLEFT | wxRIGHT | wxEXPAND, 2 * SIDEMARGINS );
mainSizer->AddSpacer(ADJUSTFORYDPI(10));
SetSizer(mainSizer);
Layout();
mainSizer->Fit(GetParent());
SetSizerAndFit(mainSizer);
parent->SetSizerAndFit(mainSizer);
SetBackgroundBitmap();
@ -1031,6 +1030,8 @@ CSimpleGUIPanel::~CSimpleGUIPanel()
delete checkForNewNoticesTimer;
m_bmpBg = wxNullBitmap; // Deletes old bitmap via reference counting
GetParent()->SetSizer(NULL, false); // Avoid trying to delete mainSizer twice
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleGUIPanel::CSimpleGUIPanel - Destructor Function End"));
}