diff options
author | ritsuka <[email protected]> | 2008-07-26 08:41:49 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2008-07-26 08:41:49 +0000 |
commit | 02e6431ec0ca85a6725fe0c3604193771181bdde (patch) | |
tree | 261812914ad587a4a9d9d47fb1d956357fef7fd0 | |
parent | b3bc6dccde26b1b072a583bce8f5726e85ca2fd0 (diff) |
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
-rw-r--r-- | macosx/PictureController.mm | 13 |
1 files changed, 8 insertions, 5 deletions
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 |