Made the dialogs resizeable.

This commit is contained in:
skidau 2015-05-26 02:09:28 +00:00
parent a6d2ce5434
commit 811893c250
6 changed files with 19 additions and 2 deletions

View File

@ -1956,6 +1956,13 @@ EVT_HANDLER_MASK(Disassemble, "Disassemble...", CMDEN_GB | CMDEN_GBA)
EVT_HANDLER_MASK(Logging, "Logging...", CMDEN_GBA)
{
wxDialog* dlg = wxGetApp().frame->logdlg;
dlg->SetWindowStyle(wxCAPTION | wxRESIZE_BORDER);
if (gopts.keep_on_top)
dlg->SetWindowStyle(dlg->GetWindowStyle() | wxSTAY_ON_TOP);
else
dlg->SetWindowStyle(dlg->GetWindowStyle() & ~wxSTAY_ON_TOP);
dlg->Show();
dlg->Raise();
}

View File

@ -321,6 +321,7 @@ public:
int ncheats = isgb ? gbCheatNumber : cheatsNumber;
ce_codes = wxEmptyString;
wxDialog* subdlg = GetXRCDialog("CheatEdit");
dlg->SetWindowStyle(wxCAPTION | wxRESIZE_BORDER);
if (gopts.keep_on_top)
subdlg->SetWindowStyle(subdlg->GetWindowStyle() | wxSTAY_ON_TOP);
@ -586,6 +587,7 @@ public:
}
wxDialog* subdlg = GetXRCDialog("CheatEdit");
dlg->SetWindowStyle(wxCAPTION | wxRESIZE_BORDER);
if (gopts.keep_on_top)
subdlg->SetWindowStyle(subdlg->GetWindowStyle() | wxSTAY_ON_TOP);
@ -1145,6 +1147,7 @@ public:
ca_val = list->OnGetItemText(idx, 2); // sugest "New" value
SetValVal(ca_val_tc);
wxDialog* subdlg = GetXRCDialog("CheatAdd");
dlg->SetWindowStyle(wxCAPTION | wxRESIZE_BORDER);
if (gopts.keep_on_top)
subdlg->SetWindowStyle(subdlg->GetWindowStyle() | wxSTAY_ON_TOP);

View File

@ -729,6 +729,8 @@ public:
~PrintDialog();
int ShowModal()
{
dlg->SetWindowStyle(wxCAPTION | wxRESIZE_BORDER);
if (gopts.keep_on_top)
dlg->SetWindowStyle(dlg->GetWindowStyle() | wxSTAY_ON_TOP);
else

View File

@ -716,6 +716,7 @@ public:
selreg_lenlab->Disable();
s.Printf(addrlen == 4 ? wxT("%04X") : wxT("%08X"), len);
selreg_len->SetValue(s);
selregion->SetWindowStyle(wxCAPTION | wxRESIZE_BORDER);
if (gopts.keep_on_top)
selregion->SetWindowStyle(selregion->GetWindowStyle() | wxSTAY_ON_TOP);
@ -739,6 +740,7 @@ public:
selreg_len->Enable();
selreg_lenlab->Enable();
selreg_len->SetValue(wxEmptyString);
selregion->SetWindowStyle(wxCAPTION | wxRESIZE_BORDER);
if (gopts.keep_on_top)
selregion->SetWindowStyle(selregion->GetWindowStyle() | wxSTAY_ON_TOP);

View File

@ -57,8 +57,9 @@ protected:
#define LoadXRCViewer(t) do { \
wxDialog *d = new Viewers::t##Viewer; \
if(d) \
d->Show(); \
if(d) { \
d->SetWindowStyle(wxCAPTION | wxRESIZE_BORDER); \
d->Show(); } \
} while(0)
// a list box with no horizontal scrollbar and a funky vertical scrollbar:

View File

@ -853,6 +853,8 @@ void MainFrame::MenuPopped(wxMenuEvent &evt)
// uses dialog_opened as a nesting counter
int MainFrame::ShowModal(wxDialog* dlg)
{
dlg->SetWindowStyle(wxCAPTION | wxRESIZE_BORDER);
if (gopts.keep_on_top)
dlg->SetWindowStyle(dlg->GetWindowStyle() | wxSTAY_ON_TOP);
else