summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordynaflash <[email protected]>2008-11-18 17:24:44 +0000
committerdynaflash <[email protected]>2008-11-18 17:24:44 +0000
commit1ea0fa911340c4792b6a5daaa35cab9f7341caf1 (patch)
treec85b9ff26e11c43b1fad680f21d746d9746f5221
parentf79cf588ca98c7f34f38194501725891b82feeb5 (diff)
MacGui: Fix issue where proper width was not observed in preview image when using loose anamorphic.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1926 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/PictureController.mm13
1 files changed, 7 insertions, 6 deletions
diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm
index c32a12036..d63107496 100644
--- a/macosx/PictureController.mm
+++ b/macosx/PictureController.mm
@@ -182,10 +182,7 @@ are maintained across different sources */
@"Source: %dx%d, Output: %dx%d, Anamorphic: %dx%d",
fTitle->width, fTitle->height, output_width, output_height, display_width, output_height]];
- /* FIXME: use the original aspect ratio to calculate the displaySize,
- probably the size will not be the right one,
- but at least the windows does not resize every time. */
- displaySize.width *= ( ( CGFloat )fTitle->job->pixel_aspect_width) / ( ( CGFloat )fTitle->job->pixel_aspect_height );
+ displaySize.width = display_width;
}
else // No Anamorphic
{
@@ -197,8 +194,12 @@ are maintained across different sources */
NSSize viewSize = [self optimalViewSizeForImageSize:displaySize];
if( [self viewNeedsToResizeToSize:viewSize] )
{
- [self resizeSheetForViewSize:viewSize];
- [self setViewSize:viewSize];
+ /* In the case of loose anamorphic, do not resize the window when scaling down */
+ if (fTitle->job->pixel_ratio != 2 || [fWidthField intValue] == fTitle->width)
+ {
+ [self resizeSheetForViewSize:viewSize];
+ [self setViewSize:viewSize];
+ }
}
// Show the scaled text (use the height to check since the width can vary