From 5ead3d423052a07ba386378c22d6a54e537defb9 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sun, 9 Nov 2008 23:08:44 +0000 Subject: [PATCH] Fixed a bug related to resizing the audio display, that caused the video display to stretch, ruining its aspect ratio. Originally committed to SVN as r2438. --- aegisub/video_box.cpp | 3 ++- aegisub/video_display.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/aegisub/video_box.cpp b/aegisub/video_box.cpp index 8e591334b..a7e9beac5 100644 --- a/aegisub/video_box.cpp +++ b/aegisub/video_box.cpp @@ -144,9 +144,10 @@ VideoBox::VideoBox(wxWindow *parent) videoBottomSizer->Add(VideoPosition,1,wxLEFT|wxALIGN_CENTER,5); videoBottomSizer->Add(VideoSubsPos,1,wxALIGN_CENTER,0); VideoSizer = new wxBoxSizer(wxVERTICAL); - VideoSizer->Add(topSizer,1,wxEXPAND,0); + VideoSizer->Add(topSizer,0,wxEXPAND,0); VideoSizer->Add(videoSliderSizer,0,wxEXPAND,0); VideoSizer->Add(videoBottomSizer,0,wxEXPAND,0); + VideoSizer->AddStretchSpacer(1); SetSizer(VideoSizer); } diff --git a/aegisub/video_display.cpp b/aegisub/video_display.cpp index 90e274e66..d626a307a 100644 --- a/aegisub/video_display.cpp +++ b/aegisub/video_display.cpp @@ -408,6 +408,8 @@ void VideoDisplay::UpdateSize() { // Layout box->GetParent()->Layout(); SetClientSize(w,h); + GetSize(&_w,&_h); + SetMaxSize(wxSize(_w,_h)); // Refresh locked = false;