OSDN Git Service

MacGui: In preview only set the origin of the hud control panel for the preview windo...
authordynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 20 Feb 2010 15:51:17 +0000 (15:51 +0000)
committerdynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 20 Feb 2010 15:51:17 +0000 (15:51 +0000)
- 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

index 71634fc..c6421d0 100644 (file)
     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];
 
 }
 
     
     [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];
 }