Save window maximized state

This commit is contained in:
Charles J. Cliffe
2015-07-16 18:57:03 -04:00
parent 291ec7038a
commit 9c9e82cffc
3 changed files with 37 additions and 0 deletions
+6
View File
@@ -313,6 +313,11 @@ AppFrame::AppFrame() :
SetClientSize(1280, 600);
Centre();
}
bool max = wxGetApp().getConfig()->getWindowMaximized();
if (max) {
this->Maximize();
}
ThemeMgr::mgr.setTheme(wxGetApp().getConfig()->getTheme());
@@ -520,6 +525,7 @@ void AppFrame::OnMenu(wxCommandEvent& event) {
void AppFrame::OnClose(wxCloseEvent& event) {
wxGetApp().getConfig()->setWindow(this->GetPosition(), this->GetClientSize());
wxGetApp().getConfig()->setWindowMaximized(this->IsMaximized());
wxGetApp().getConfig()->setTheme(ThemeMgr::mgr.getTheme());
wxGetApp().getConfig()->save();
event.Skip();