Work on fixing detached video, still broken but works a little better now. Updates #853.

Originally committed to SVN as r3008.
This commit is contained in:
Niels Martin Hansen 2009-06-03 23:01:03 +00:00
parent 614f2ef559
commit 6dc3015962
4 changed files with 8 additions and 6 deletions

View File

@ -75,7 +75,7 @@ DialogDetachedVideo::DialogDetachedVideo(FrameMain *par)
wxPanel *panel = new wxPanel(this,-1,wxDefaultPosition,wxDefaultSize,wxTAB_TRAVERSAL | wxCLIP_CHILDREN);
// Video area;
videoBox = new VideoBox(panel);
videoBox = new VideoBox(panel, true);
videoBox->videoDisplay->freeSize = true;
videoBox->videoSlider->grid = par->SubsBox;

View File

@ -535,7 +535,7 @@ void FrameMain::InitContents() {
BottomSizer = new wxBoxSizer(wxHORIZONTAL);
// Video area;
videoBox = new VideoBox(Panel);
videoBox = new VideoBox(Panel, false);
TopSizer->Add(videoBox,0,wxEXPAND,0);
videoBox->videoDisplay->zoomBox = ZoomBox;

View File

@ -65,7 +65,7 @@
///////////////
// Constructor
VideoBox::VideoBox(wxWindow *parent)
VideoBox::VideoBox(wxWindow *parent, bool isDetached)
: wxPanel (parent,-1)
{
// Parent
@ -125,11 +125,13 @@ VideoBox::VideoBox(wxWindow *parent)
visualToolBar->Realize();
// Top sizer
// Detached and attached video needs different flags, see bugs #742 and #853
int highSizerFlags = isDetached ? wxEXPAND : 0;
wxSizer *topTopSizer = new wxBoxSizer(wxHORIZONTAL);
wxSizer *topSizer = new wxBoxSizer(wxVERTICAL);
visualSubToolBar->Show(false);
topTopSizer->Add(visualToolBar,0,0,0);
topTopSizer->Add(videoDisplay,1,0,0);
topTopSizer->Add(visualToolBar,0,highSizerFlags,0);
topTopSizer->Add(videoDisplay,1,highSizerFlags,0);
topSizer->Add(topTopSizer,1,wxEXPAND,0);
topSizer->Add(visualSubToolBar,0,wxEXPAND | wxBOTTOM,4);
topSizer->Add(new wxStaticLine(videoPage),0,wxEXPAND,0);

View File

@ -83,7 +83,7 @@ public:
VideoDisplay *videoDisplay;
VideoSlider *videoSlider;
VideoBox (wxWindow *parent);
VideoBox (wxWindow *parent, bool isDetached);
DECLARE_EVENT_TABLE()
};