Fix #491: Let the detached video dialogue take a parameter indicating the initial video size.

Originally committed to SVN as r3023.
This commit is contained in:
Niels Martin Hansen 2009-06-06 02:57:42 +00:00
parent d56b5b1bf6
commit 6e144e6589
3 changed files with 4 additions and 3 deletions

View File

@ -51,7 +51,7 @@
///////////////
// Constructor
DialogDetachedVideo::DialogDetachedVideo(FrameMain *par)
DialogDetachedVideo::DialogDetachedVideo(FrameMain *par, const wxSize &initialDisplaySize)
//: wxFrame(par,-1,_("Detached Video"))
: wxDialog(par,-1,_T("Detached Video"),wxDefaultPosition,wxSize(400,300),wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX | wxWANTS_CHARS)
{
@ -77,6 +77,7 @@ DialogDetachedVideo::DialogDetachedVideo(FrameMain *par)
// Video area;
videoBox = new VideoBox(panel, true);
videoBox->videoDisplay->freeSize = true;
videoBox->videoDisplay->SetClientSize(initialDisplaySize);
videoBox->videoSlider->grid = par->SubsBox;
// Set sizer

View File

@ -58,7 +58,7 @@ private:
void OnMove(wxMoveEvent &event);
public:
DialogDetachedVideo(FrameMain *parent);
DialogDetachedVideo(FrameMain *parent, const wxSize &initialDisplaySize);
~DialogDetachedVideo();
DECLARE_EVENT_TABLE()

View File

@ -1178,7 +1178,7 @@ void FrameMain::OpenHelp(wxString page) {
void FrameMain::DetachVideo(bool detach) {
if (detach) {
if (!detachedVideo) {
detachedVideo = new DialogDetachedVideo(this);
detachedVideo = new DialogDetachedVideo(this, videoBox->videoDisplay->GetClientSize());
detachedVideo->Show();
}
}