From 36c492156e64b4199eae63a841d5cb343739fecc Mon Sep 17 00:00:00 2001 From: dynaflash Date: Sat, 20 Feb 2010 15:51:17 +0000 Subject: [PATCH] MacGui: In preview only set the origin of the hud control panel for the preview window when setting the title, after that the origin will animate much smoother along with the window. - Avoids the nasty resetting of the hud controller when the preview window resizes. git-svn-id: svn://localhost/HandBrake/trunk@3128 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBPreviewController.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index 71634fcf..c6421d09 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -210,6 +210,12 @@ MaxOutputWidth = title->width - job->crop[2] - job->crop[3]; 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]; } @@ -1189,11 +1195,6 @@ [fPictureView setFrameOrigin:origin]; - /* 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]; } -- 2.11.0