From 6e5d5d947f5f5f14e93ff7a7b03c3bc5368cc3f8 Mon Sep 17 00:00:00 2001 From: Vsevolod Kremianskii Date: Sun, 2 May 2021 18:31:58 +0700 Subject: [PATCH] launcher: Determine window size from its contents --- launcher/frame.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/launcher/frame.cpp b/launcher/frame.cpp index d83a5126..aa035f4d 100644 --- a/launcher/frame.cpp +++ b/launcher/frame.cpp @@ -47,9 +47,6 @@ LauncherFrame::LauncherFrame() : wxFrame(nullptr, wxID_ANY, "reone", wxDefaultPo SetIcon(wxIcon(kIconName)); #endif - SetSize(g_windowSize); - - LoadConfiguration(); // Setup controls @@ -162,6 +159,7 @@ LauncherFrame::LauncherFrame() : wxFrame(nullptr, wxID_ANY, "reone", wxDefaultPo debugSizer->Add(_checkBoxLogFile, 0, wxEXPAND, 0); auto topSizer = new wxBoxSizer(wxVERTICAL); + topSizer->SetMinSize(400, 100); topSizer->Add(gameSizer, 0, wxEXPAND, 0); topSizer->Add(_checkBoxDev, 0, wxEXPAND | wxALL, 3); topSizer->Add(graphicsSizer, 0, wxEXPAND | wxALL, 3); @@ -169,7 +167,7 @@ LauncherFrame::LauncherFrame() : wxFrame(nullptr, wxID_ANY, "reone", wxDefaultPo topSizer->Add(new wxButton(this, WindowID::launch, "Launch"), 0, wxEXPAND | wxALL, 3); topSizer->Add(new wxButton(this, WindowID::saveConfig, "Save Configuration"), 0, wxEXPAND | wxALL, 3); - SetSizer(topSizer); + SetSizerAndFit(topSizer); } void LauncherFrame::LoadConfiguration() {