mirror of https://github.com/odrling/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
d56b5b1bf6
commit
6e144e6589
|
@ -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 New Issue