diff options
author | dynaflash <[email protected]> | 2010-06-02 16:49:18 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2010-06-02 16:49:18 +0000 |
commit | c9fbc84b470a17232b0ad70b6f416e9f1ddf56cc (patch) | |
tree | 9cac7bb7ba9f17ebc50d65fa0b38817f8d9ede64 /macosx/HBPreviewController.m | |
parent | aac38742be635b68acc2831acbc75c99bb7980b1 (diff) |
MacGui: Set the hud control panels origin based on the size of the actual preview window anchored at the bottom instead of setting it at the middle of the window.
- Should not block the actual preview as much.
- Move the origin setting code from -SetTitle into -displayPreview so that it is recalculated any time a new preview is generated, which includes changing encode size.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3349 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreviewController.m')
-rw-r--r-- | macosx/HBPreviewController.m | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index 5ad59761c..4b60d7e4a 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -223,13 +223,6 @@ MaxOutputHeight = title->height - job->crop[0] - job->crop[1]; [self SettingsChanged: nil]; - - /* set the top of the hud controller boxes centered vertically with the origin of our window */ - NSPoint hudControlBoxOrigin = [fPictureControlBox frame].origin; - hudControlBoxOrigin.y = ([[self window] frame].size.height / 2) - [fPictureControlBox frame].size.height; - [fPictureControlBox setFrameOrigin:hudControlBoxOrigin]; - [fEncodingControlBox setFrameOrigin:hudControlBoxOrigin]; - [fMoviePlaybackControlBox setFrameOrigin:hudControlBoxOrigin]; } @@ -393,6 +386,15 @@ } [self setViewSize:viewSize]; + + /* relocate our hud origins as per setViewSize */ + NSPoint hudControlBoxOrigin = [fPictureControlBox frame].origin; + hudControlBoxOrigin.y = ([[self window] frame].size.height / 2) - (viewSize.height / 2); + hudControlBoxOrigin.x = ([[self window] frame].size.width / 2) - ([fPictureControlBox frame].size.width / 2); + [fPictureControlBox setFrameOrigin:hudControlBoxOrigin]; + [fEncodingControlBox setFrameOrigin:hudControlBoxOrigin]; + [fMoviePlaybackControlBox setFrameOrigin:hudControlBoxOrigin]; + NSString *scaleString; CGFloat scale = ( ( CGFloat )[fPictureView frame].size.width) / ( ( CGFloat )imageScaledSize.width); |