Commit fecb675a authored by twanvl's avatar twanvl

tweaking

parent 2ac0ffef
...@@ -25,7 +25,7 @@ SetP new_set_window(Window* parent) { ...@@ -25,7 +25,7 @@ SetP new_set_window(Window* parent) {
} }
NewSetWindow::NewSetWindow(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 // init controls
game_list = new PackageList (this, ID_GAME_LIST); game_list = new PackageList (this, ID_GAME_LIST);
...@@ -35,14 +35,17 @@ NewSetWindow::NewSetWindow(Window* parent) ...@@ -35,14 +35,17 @@ NewSetWindow::NewSetWindow(Window* parent)
// init sizer // init sizer
wxSizer* s = new wxBoxSizer(wxVERTICAL); wxSizer* s = new wxBoxSizer(wxVERTICAL);
s->Add(game_text, 0, wxALL, 4); 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_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->Add(CreateButtonSizer(wxOK | wxCANCEL) , 0, wxEXPAND | wxALL, 8);
s->SetSizeHints(this); s->SetSizeHints(this);
SetSizer(s); SetSizer(s);
// force refresh of gameList, otherwise a grey background shows (win XP) // Resize
SetSize(wxSize(530,320)); SetSize(630,-1);
Layout();
GetSizer()->SetSizeHints(this);
SetSize(630,-1);
// init lists // init lists
game_list->showData<Game>(); game_list->showData<Game>();
game_list->select(settings.default_game); game_list->select(settings.default_game);
...@@ -56,6 +59,13 @@ void NewSetWindow::onGameSelect(wxCommandEvent&) { ...@@ -56,6 +59,13 @@ void NewSetWindow::onGameSelect(wxCommandEvent&) {
stylesheet_list->showData<StyleSheet>(game->name() + _("-*")); stylesheet_list->showData<StyleSheet>(game->name() + _("-*"));
stylesheet_list->select(gs.default_stylesheet); stylesheet_list->select(gs.default_stylesheet);
UpdateWindowUI(wxUPDATE_UI_RECURSE); UpdateWindowUI(wxUPDATE_UI_RECURSE);
// resize (yuck)
SetSize(630,-1);
Layout();
GetSizer()->SetSizeHints(this);
Layout();
GetSizer()->SetSizeHints(this);
SetSize(630,-1);
} }
void NewSetWindow::onStyleSheetSelect(wxCommandEvent&) { void NewSetWindow::onStyleSheetSelect(wxCommandEvent&) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment