From f4939c082a195f74d5bf02488a3635a9ff70a314 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Wed, 3 Jun 2009 23:08:40 +0000 Subject: [PATCH] Really fix detached video, closes #853. Originally committed to SVN as r3009. --- aegisub/src/video_box.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aegisub/src/video_box.cpp b/aegisub/src/video_box.cpp index b67606aa9..72b017f99 100644 --- a/aegisub/src/video_box.cpp +++ b/aegisub/src/video_box.cpp @@ -147,11 +147,15 @@ VideoBox::VideoBox(wxWindow *parent, bool isDetached) videoBottomSizer->Add(AutoScroll,0,wxTOP|wxBOTTOM|wxALIGN_CENTER|wxEXPAND,2); videoBottomSizer->Add(VideoPosition,1,wxLEFT|wxALIGN_CENTER,5); videoBottomSizer->Add(VideoSubsPos,1,wxALIGN_CENTER,0); + + // If we're detached we do want to fill out as much space we can. + // But if we're in the main window, the subs grid needs space more than us. VideoSizer = new wxBoxSizer(wxVERTICAL); - VideoSizer->Add(topSizer,0,wxEXPAND,0); + VideoSizer->Add(topSizer,isDetached?1:0,wxEXPAND,0); VideoSizer->Add(videoSliderSizer,0,wxEXPAND,0); VideoSizer->Add(videoBottomSizer,0,wxEXPAND,0); - VideoSizer->AddStretchSpacer(1); + if (!isDetached) + VideoSizer->AddStretchSpacer(1); SetSizer(VideoSizer); }