From 63f451035ce1a099f4d7d0b8207ea268dcaba483 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 10 Feb 2018 20:41:30 +0000 Subject: WinGui: Fixes to Anamorphic handling on the picture tab and in static preview #1169 --- .../HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'win/CS/HandBrakeWPF') diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index 828ddfe19..4474938c5 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -807,17 +807,11 @@ namespace HandBrakeWPF.ViewModels { // Custom // Set the Width, and Maintain Aspect ratio. That should calc the Height for us. - this.Task.Width = this.GetModulusValue(this.MaxWidth - this.CropLeft - this.CropRight); - + this.Task.Width = this.GetModulusValue(this.sourceResolution.Width - this.CropLeft - this.CropRight); + if (this.SelectedAnamorphicMode != Anamorphic.Loose) { - this.Task.Height = this.GetModulusValue(this.MaxHeight - this.CropTop - this.CropBottom); - } - - // If our height is too large, let it downscale the width for us by setting the height to the lower value. - if (!this.MaintainAspectRatio && this.Height > this.MaxHeight) - { - this.Task.Height = this.MaxHeight; + this.Task.Height = this.GetModulusValue(this.sourceResolution.Height - this.CropTop - this.CropBottom); } } @@ -829,6 +823,7 @@ namespace HandBrakeWPF.ViewModels title.ParVal.Width, title.ParVal.Height); + // Force a re-calc. This will handle MaxWidth / Height corrections. this.RecaulcatePictureSettingsProperties(ChangedPictureField.Width); } @@ -912,7 +907,7 @@ namespace HandBrakeWPF.ViewModels ParH = this.ParHeight, MaxWidth = this.MaxWidth, MaxHeight = this.MaxHeight, - KeepDisplayAspect = this.MaintainAspectRatio, + KeepDisplayAspect = false, //this.MaintainAspectRatio, AnamorphicMode = this.SelectedAnamorphicMode, Crop = new Cropping(this.CropTop, this.CropBottom, this.CropLeft, this.CropRight), }; -- cgit v1.2.3