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 // Constructor
DialogDetachedVideo::DialogDetachedVideo(FrameMain *par) DialogDetachedVideo::DialogDetachedVideo(FrameMain *par, const wxSize &initialDisplaySize)
//: wxFrame(par,-1,_("Detached Video")) //: 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) : 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; // Video area;
videoBox = new VideoBox(panel, true); videoBox = new VideoBox(panel, true);
videoBox->videoDisplay->freeSize = true; videoBox->videoDisplay->freeSize = true;
videoBox->videoDisplay->SetClientSize(initialDisplaySize);
videoBox->videoSlider->grid = par->SubsBox; videoBox->videoSlider->grid = par->SubsBox;
// Set sizer // Set sizer

View file

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

View file

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