From 02e6431ec0ca85a6725fe0c3604193771181bdde Mon Sep 17 00:00:00 2001 From: ritsuka Date: Sat, 26 Jul 2008 08:41:49 +0000 Subject: MacGui: Fixed the flying picture sheet, removed the last references to the opengl view. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1583 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/PictureController.mm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'macosx/PictureController.mm') diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm index a4785abee..2f2f51ccc 100644 --- a/macosx/PictureController.mm +++ b/macosx/PictureController.mm @@ -687,7 +687,7 @@ are maintained across different sources */ // -[PictureController(Private) optimalViewSizeForImageSize:] // // Given the size of the preview image to be shown, returns the best possible -// size for the OpenGL view. +// size for the view. // - (NSSize)optimalViewSizeForImageSize: (NSSize)imageSize { @@ -735,7 +735,7 @@ are maintained across different sources */ // // -[PictureController(Private) resizePanelForViewSize:animate:] // -// Resizes the entire sheet to accomodate an OpenGL view of a particular size. +// Resizes the entire sheet to accomodate a view of a particular size. // - (void)resizeSheetForViewSize: (NSSize)viewSize { @@ -761,8 +761,11 @@ are maintained across different sources */ // But now the sheet is off-center, so also shift the origin to center it and // keep the top aligned. - frame.origin.x -= (deltaX / 2.0); - frame.origin.y -= deltaY; + if( frame.size.width != [[self window] frame].size.width ) + frame.origin.x -= (deltaX / 2.0); + + if( frame.size.height != [[self window] frame].size.height ) + frame.origin.y -= deltaY; [[self window] setFrame:frame display:YES animate:YES]; } @@ -770,7 +773,7 @@ are maintained across different sources */ // // -[PictureController(Private) setViewSize:] // -// Changes the OpenGL view's size and centers it vertially inside of its area. +// Changes the view's size and centers it vertically inside of its area. // Assumes resizeSheetForViewSize: has already been called. // - (void)setViewSize: (NSSize)viewSize -- cgit v1.2.3