forked from mia/Aegisub
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:
parent
ba3df8b4e5
commit
e3d10e1896
3 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -58,7 +58,7 @@ private:
|
|||
void OnMove(wxMoveEvent &event);
|
||||
|
||||
public:
|
||||
DialogDetachedVideo(FrameMain *parent);
|
||||
DialogDetachedVideo(FrameMain *parent, const wxSize &initialDisplaySize);
|
||||
~DialogDetachedVideo();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue