merge r4003 (options dialogue layout fixes)

Originally committed to SVN as r4021.
This commit is contained in:
Amar Takhar 2010-01-21 00:28:07 +00:00
parent 89e2428dbe
commit f43bff1e97

View file

@ -110,7 +110,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
SetIcon(BitmapToIcon(GETIMAGE(options_button_24)));
// Create book
book = new wxTreebook(this,-1,wxDefaultPosition,wxSize(400,300));
book = new wxTreebook(this,-1,wxDefaultPosition,wxDefaultSize);
needsRestart = false;
// Panels
@ -154,8 +154,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
genMainSizer->Add(genSizer1,0,wxEXPAND | wxBOTTOM,5);
genMainSizer->Add(genSizer2,0,wxEXPAND,0);
genMainSizer->AddStretchSpacer(1);
genMainSizer->Fit(generalPage);
generalPage->SetSizer(genMainSizer);
generalPage->SetSizerAndFit(genMainSizer);
}
// File save/load page
@ -214,8 +213,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
fileMainSizer->Add(fileSizer3,0,wxEXPAND | wxTOP,5);
fileMainSizer->Add(fileSizer5,0,wxEXPAND | wxTOP,5);
fileMainSizer->AddStretchSpacer(1);
fileMainSizer->Fit(filePage);
filePage->SetSizer(fileMainSizer);
filePage->SetSizerAndFit(fileMainSizer);
}
// Edit box page
@ -288,8 +286,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
editMainSizer->Add(editSizer1,0,wxEXPAND | wxALL,0);
editMainSizer->Add(editSizer3,0,wxEXPAND | wxTOP,5);
editMainSizer->AddStretchSpacer(1);
editMainSizer->Fit(editPage);
editPage->SetSizer(editMainSizer);
editPage->SetSizerAndFit(editMainSizer);
}
// Grid page
@ -357,8 +354,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
gridMainSizer->Add(gridSizer1,0,wxEXPAND | wxALL,0);
gridMainSizer->Add(gridSizer2,0,wxEXPAND | wxTOP,5);
gridMainSizer->AddStretchSpacer(1);
gridMainSizer->Fit(gridPage);
gridPage->SetSizer(gridMainSizer);
gridPage->SetSizerAndFit(gridMainSizer);
}
// Video page
@ -435,8 +431,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
videoMainSizer->Add(videoSizer1,0,wxEXPAND | wxALL,0);
videoMainSizer->Add(videoSizer2,0,wxEXPAND | wxTOP,5);
videoMainSizer->AddStretchSpacer(1);
videoMainSizer->Fit(videoPage);
videoPage->SetSizer(videoMainSizer);
videoPage->SetSizerAndFit(videoMainSizer);
}
// Audio page
@ -470,8 +465,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
audioSizer1->Add(audioSizer4,1,wxEXPAND | wxALL,5);
audioMainSizer->Add(audioSizer1,0,wxEXPAND | wxALL,0);
audioMainSizer->AddStretchSpacer(1);
audioMainSizer->Fit(audioPage);
audioPage->SetSizer(audioMainSizer);
audioPage->SetSizerAndFit(audioMainSizer);
}
// Audio display page
@ -522,8 +516,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
displayMainSizer->Add(displaySizer1,0,wxEXPAND | wxALL,0);
displayMainSizer->Add(displaySizer2,0,wxEXPAND | wxTOP,5);
displayMainSizer->AddStretchSpacer(1);
displayMainSizer->Fit(displayPage);
displayPage->SetSizer(displayMainSizer);
displayPage->SetSizerAndFit(displayMainSizer);
}
// Audio advanced page
@ -558,8 +551,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
audioAdvSizer2->Add(audioAdvSizer1,1,wxEXPAND | wxALL,5);
audioAdvSizer3->Add(audioAdvSizer2,0,wxEXPAND);
audioAdvSizer3->AddStretchSpacer(1);
audioAdvSizer3->Fit(audioAdvPage);
audioAdvPage->SetSizer(audioAdvSizer3);
audioAdvPage->SetSizerAndFit(audioAdvSizer3);
}
// Automation page
@ -585,8 +577,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
autoSizer1->Add(autoSizer2,1,wxEXPAND | wxALL,5);
autoMainSizer->Add(autoSizer1,0,wxEXPAND | wxALL,0);
autoMainSizer->AddStretchSpacer(1);
autoMainSizer->Fit(autoPage);
autoPage->SetSizer(autoMainSizer);
autoPage->SetSizerAndFit(autoMainSizer);
}
// Hotkeys page
@ -596,7 +587,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
origKeys = Hotkeys.key;
// List of shortcuts
Shortcuts = new wxListView(hotkeysPage,HOTKEY_LIST,wxDefaultPosition,wxSize(250,150),wxLC_REPORT | wxLC_SINGLE_SEL);
Shortcuts = new wxListView(hotkeysPage,HOTKEY_LIST,wxDefaultPosition,wxDefaultSize,wxLC_REPORT | wxLC_SINGLE_SEL);
Shortcuts->InsertColumn(0,_("Function"),wxLIST_FORMAT_LEFT,200);
Shortcuts->InsertColumn(1,_("Key"),wxLIST_FORMAT_LEFT,120);
@ -621,8 +612,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
wxSizer *hotkeysSizer = new wxBoxSizer(wxVERTICAL);
hotkeysSizer->Add(Shortcuts,1,wxLEFT|wxRIGHT|wxTOP|wxEXPAND,5);
hotkeysSizer->Add(buttons,0,wxALL|wxEXPAND,5);
hotkeysSizer->Fit(hotkeysPage);
hotkeysPage->SetSizer(hotkeysSizer);
hotkeysPage->SetSizerAndFit(hotkeysSizer);
}
// List book
@ -639,6 +629,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
#ifdef wxUSE_TREEBOOK
book->ChangeSelection(Options.AsInt(_T("Options page")));
#endif
book->Fit();
// Buttons Sizer
wxStdDialogButtonSizer *stdButtonSizer = new wxStdDialogButtonSizer();
@ -658,7 +649,7 @@ DialogOptions::DialogOptions(wxWindow *parent)
mainSizer->Add(book,1,wxEXPAND | wxALL,5);
mainSizer->Add(buttonSizer,0,wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM,5);
mainSizer->SetSizeHints(this);
SetSizer(mainSizer);
SetSizerAndFit(mainSizer);
CenterOnParent();
// Read
@ -1161,7 +1152,7 @@ void DialogOptions::OnDefaultAllHotkey(wxCommandEvent &event) {
/// @param shorts
///
DialogInputHotkey::DialogInputHotkey(wxWindow *parent, HotkeyType *_key, wxString name, wxListView *shorts)
: wxDialog(parent, -1, _("Press Key"), wxDefaultPosition, wxSize(200,50), wxCAPTION | wxWANTS_CHARS , _T("Press key"))
: wxDialog(parent, -1, _("Press Key"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxWANTS_CHARS)
{
// Key
key = _key;