diff options
author | dynaflash <[email protected]> | 2008-12-05 18:20:05 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2008-12-05 18:20:05 +0000 |
commit | e8fc4aab3b2188244c884855272f731c2e69b3b4 (patch) | |
tree | b8d047bef1f9ace5779a503f458db3ac07ff006e /macosx | |
parent | 69979d068cb96f56487a22d10090183535207c84 (diff) |
MacGui: Live Preview fixes
- Fix proper sizing when max source size and loose anamorphic is selected in presets
- Fix vertical alignment issue when the move height is >= the still preview height.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2011 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.mm | 21 | ||||
-rw-r--r-- | macosx/PictureController.mm | 15 |
2 files changed, 22 insertions, 14 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 3ac95d006..1da9162ce 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -3515,10 +3515,7 @@ fWorkingCount = 0; hb_job_t * job = title->job; fTitle = title; - /* Reset the new title in fPictureController */ - [fPictureController SetTitle:title]; - - /*Set Source Size Field Here */ + /*Set Source Size Field Here */ [fPicSettingsSrc setStringValue: [NSString stringWithFormat: @"%d x %d", fTitle->width, fTitle->height]]; /* Set Auto Crop to on upon selecting a new title */ @@ -3533,10 +3530,8 @@ fWorkingCount = 0; AutoCropLeft = job->crop[2]; AutoCropRight = job->crop[3]; - /* Run Through encoderPopUpChanged to see if there - needs to be any pic value modifications based on encoder settings */ - //[self encoderPopUpChanged: NULL]; - /* END Get and set the initial pic size for display */ + /* Reset the new title in fPictureController */ + [fPictureController SetTitle:title]; /* Update subtitle popups */ hb_subtitle_t * subtitle; @@ -4027,9 +4022,9 @@ the user is using "Custom" settings by determining the sender*/ - (IBAction) revertPictureSizeToMax: (id) sender { hb_job_t * job = fTitle->job; - /* Here we apply the max source storage width and height */ - job->width = fTitle->width-fTitle->job->crop[2]-fTitle->job->crop[3]; - job->height = fTitle->height-fTitle->job->crop[0]-fTitle->job->crop[1]; + /* Here we apply the title source and height */ + job->width = fTitle->width; + job->height = fTitle->height; [self calculatePictureSizing: sender]; /* We call method to change UI to reflect whether a preset is used or not*/ @@ -5766,9 +5761,9 @@ return YES; [fPictureController setDecomb:0]; } } - [self calculatePictureSizing:nil]; /* we call SetTitle: in fPictureController so we get an instant update in the Picture Settings window */ - [fPictureController SetTitle:fTitle]; + [fPictureController SetTitle:fTitle]; + [self calculatePictureSizing:nil]; } } diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm index c0f5771af..08d5c3e8e 100644 --- a/macosx/PictureController.mm +++ b/macosx/PictureController.mm @@ -776,15 +776,28 @@ are maintained across different sources */ } // lets reposition the movie if need be + NSPoint origin = [fPictureViewArea frame].origin; origin.x += trunc(([fPictureViewArea frame].size.width - [fMovieView frame].size.width) / 2.0); - /* Since we are adding 15 to the height to allow for the controller bar + /* We need to detect whether or not we are currently less than the available height.*/ + if (movieBounds.size.height < [fPictureView frame].size.height) + { + /* If we are, we are adding 15 to the height to allow for the controller bar so * we need to subtract half of that for the origin.y to get the controller bar * below the movie to it lines up vertically with where our still preview was */ origin.y += trunc((([fPictureViewArea frame].size.height - [fMovieView frame].size.height) / 2.0) - 7.5); + } + else + { + /* if we are >= to the height of the picture view area, the controller bar + * gets taken care of with picture resizing, so we do not want to offset the height + */ + origin.y += trunc(([fPictureViewArea frame].size.height - + [fMovieView frame].size.height) / 2.0); + } [fMovieView setFrameOrigin:origin]; [fMovieView setMovie:aMovie]; |