Fixed improperly sized dialog boxes

This commit is contained in:
wowzaman12 2015-03-28 14:11:03 +00:00
parent ad13e1fb45
commit 4257ae5be1
1 changed files with 17 additions and 0 deletions

View File

@ -2277,6 +2277,7 @@ bool MainFrame::InitMore(void)
if(!wxDynamicCast(prev->GetParent(), wxScrolledWindow))
throw std::runtime_error("Unable to load a dialog control from the builtin xrc file: Preview");
SafeXRCCTRL<wxControlWithItems>(d, "Magnification");
d->Fit();
}
//// File menu
@ -2292,6 +2293,7 @@ bool MainFrame::InitMore(void)
getlab("DeviceType");
getlab("Version");
getlab("CRC");
d->Fit();
d=LoadXRCDialog("GBROMInfo");
// just verify fields present
@ -2308,16 +2310,19 @@ bool MainFrame::InitMore(void)
getlab("DestCode");
getlab("LicCode");
getlab("Checksum");
d->Fit();
d=LoadXRCDialog("CodeSelect");
// just verify list present
vfld(d, "CodeList", wxControlWithItems);
d->Fit();
d=LoadXRCDialog("ExportSPS");
// just verify text fields present
vfld(d, "Title", wxTextCtrl);
vfld(d, "Description", wxTextCtrl);
vfld(d, "Notes", wxTextCtrl);
d->Fit();
//// Emulation menu
#ifndef NO_LINK
@ -2414,6 +2419,7 @@ bool MainFrame::InitMore(void)
d->Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED,
wxCommandEventHandler(NetLink_t::NetConnect),
NULL, &net_link_handler);
d->Fit();
}
#endif
@ -2489,6 +2495,7 @@ bool MainFrame::InitMore(void)
d->Connect(wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
wxListEventHandler(CheatList_t::Edit),
NULL, &cheat_list_handler);
d->Fit();
}
d=LoadXRCDialog("CheatEdit");
@ -2504,6 +2511,7 @@ bool MainFrame::InitMore(void)
tc->SetMaxLength(sizeof(cheatsList[0].desc) - 1);
gettc("Codes", cheat_list_handler.ce_codes);
cheat_list_handler.ce_codes_tc = tc;
d->Fit();
}
d=LoadXRCDialog("CheatCreate");
@ -2592,6 +2600,7 @@ bool MainFrame::InitMore(void)
cheat_find_handler.ca_fmt = lab;
getlab("Address");
cheat_find_handler.ca_addr = lab;
d->Fit();
}
//// config menu
@ -2625,6 +2634,7 @@ bool MainFrame::InitMore(void)
NULL, &throttle_ctrl);
d->Connect(wxEVT_SHOW, wxShowEventHandler(ThrottleCtrl_t::Init),
NULL, &throttle_ctrl);
d->Fit();
}
#define getcbbe(n, o) getbe(n, o, cb, wxCheckBox, CB)
@ -2725,6 +2735,7 @@ bool MainFrame::InitMore(void)
wxCommandEventHandler(GBColorConfig_t::ColorButton),
NULL, &GBColorConfigHandler[i]);
}
d->Fit();
}
d=LoadXRCropertySheetDialog("GameBoyAdvanceConfig");
@ -2777,6 +2788,7 @@ bool MainFrame::InitMore(void)
vfld(d, "OvSaveType", wxChoice);
vfld(d, "OvFlashSize", wxChoice);
vfld(d, "OvMirroring", wxChoice);
d->Fit();
}
d=LoadXRCropertySheetDialog("DisplayConfig");
@ -2846,6 +2858,7 @@ bool MainFrame::InitMore(void)
wxCommandEventHandler(PluginEnable_t::ToggleChoice),
NULL, &PluginEnableHandler);
getch(d, "IFB", gopts.ifb);
d->Fit();
}
d=LoadXRCropertySheetDialog("SoundConfig");
@ -2921,6 +2934,7 @@ bool MainFrame::InitMore(void)
/// Game Boy Advance
getcbb("GBASoundInterpolation", soundInterpolation);
getsl("GBASoundFiltering", gopts.gba_sound_filter);
d->Fit();
}
wxDirPickerCtrl *dp;
@ -2936,6 +2950,7 @@ bool MainFrame::InitMore(void)
getdp("StateSaves", gopts.state_dir);
getdp("Screenshots", gopts.scrshot_dir);
getdp("Recordings", gopts.recording_dir);
d->Fit();
}
wxPropertySheetDialog * joyDialog = LoadXRCropertySheetDialog("JoypadConfig");
@ -2993,6 +3008,7 @@ bool MainFrame::InitMore(void)
addbe(lab);
getsc("LinkTimeout", gopts.linktimeout);
addbe(sc);
d->Fit();
}
#endif
@ -3090,6 +3106,7 @@ bool MainFrame::InitMore(void)
d->Connect(XRCID("Shortcut"), wxEVT_COMMAND_TEXT_UPDATED,
wxCommandEventHandler(AccelConfig_t::CheckKey),
NULL, &accel_config_handler);
d->Fit();
}
}
catch (std::exception& e)