From 153dab9a4faefa3ab56322e0359c7f3b4721095d Mon Sep 17 00:00:00 2001 From: twanvl Date: Fri, 22 Dec 2006 23:34:21 +0000 Subject: [PATCH] tweaking git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@153 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/gui/new_window.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/gui/new_window.cpp b/src/gui/new_window.cpp index e2005f03..3a45251e 100644 --- a/src/gui/new_window.cpp +++ b/src/gui/new_window.cpp @@ -25,7 +25,7 @@ SetP new_set_window(Window* parent) { } NewSetWindow::NewSetWindow(Window* parent) - : wxDialog(parent, wxID_ANY, _("New set"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) + : wxDialog(parent, wxID_ANY, _("New set"), wxDefaultPosition, wxSize(530,320), wxDEFAULT_DIALOG_STYLE) { // init controls game_list = new PackageList (this, ID_GAME_LIST); @@ -35,14 +35,17 @@ NewSetWindow::NewSetWindow(Window* parent) // init sizer wxSizer* s = new wxBoxSizer(wxVERTICAL); s->Add(game_text, 0, wxALL, 4); - s->Add(game_list, 1, wxEXPAND | wxALL & ~wxTOP, 4); + s->Add(game_list, 0, wxEXPAND | wxALL & ~wxTOP, 4); s->Add(stylesheet_text, 0, wxALL, 4); - s->Add(stylesheet_list, 1, wxEXPAND | wxALL & ~wxTOP, 4); + s->Add(stylesheet_list, 0, wxEXPAND | wxALL & ~wxTOP, 4); s->Add(CreateButtonSizer(wxOK | wxCANCEL) , 0, wxEXPAND | wxALL, 8); s->SetSizeHints(this); SetSizer(s); - // force refresh of gameList, otherwise a grey background shows (win XP) - SetSize(wxSize(530,320)); + // Resize + SetSize(630,-1); + Layout(); + GetSizer()->SetSizeHints(this); + SetSize(630,-1); // init lists game_list->showData(); game_list->select(settings.default_game); @@ -56,6 +59,13 @@ void NewSetWindow::onGameSelect(wxCommandEvent&) { stylesheet_list->showData(game->name() + _("-*")); stylesheet_list->select(gs.default_stylesheet); UpdateWindowUI(wxUPDATE_UI_RECURSE); + // resize (yuck) + SetSize(630,-1); + Layout(); + GetSizer()->SetSizeHints(this); + Layout(); + GetSizer()->SetSizeHints(this); + SetSize(630,-1); } void NewSetWindow::onStyleSheetSelect(wxCommandEvent&) {