summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-06-28 19:53:53 +0100
committersr55 <[email protected]>2017-06-28 19:53:53 +0100
commiteb56fbecb9d3b249df1de801ace5141a8d5178ed (patch)
tree44b5a2e44b05421b8754257c50c699633893e689 /win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
parentda26ad0dfae416d0cdbd546cae4c067af317c5c5 (diff)
WinGui: Adding support for Custom Anamorphic back. Implements #504
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs21
1 files changed, 15 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
index 97de36a3c..42cbf0943 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
@@ -147,7 +147,7 @@ namespace HandBrakeWPF.ViewModels
{
get
{
- return new List<Anamorphic> { Anamorphic.None, Anamorphic.Automatic, Anamorphic.Loose }; // , Anamorphic.Custom TODO Re-enable one the UI is re-worked.
+ return new List<Anamorphic> { Anamorphic.None, Anamorphic.Automatic, Anamorphic.Loose, Anamorphic.Custom };
}
}
@@ -855,7 +855,6 @@ namespace HandBrakeWPF.ViewModels
Height = this.sourceResolution.Height,
ParW = this.sourceParValues.Width,
ParH = this.sourceParValues.Height,
- Aspect = 0 // TODO
};
return title;
@@ -881,8 +880,6 @@ namespace HandBrakeWPF.ViewModels
MaxHeight = this.MaxHeight,
KeepDisplayAspect = this.MaintainAspectRatio,
AnamorphicMode = this.SelectedAnamorphicMode,
- DarWidth = 0,
- DarHeight = 0,
Crop = new Cropping(this.CropTop, this.CropBottom, this.CropLeft, this.CropRight),
};
@@ -892,6 +889,12 @@ namespace HandBrakeWPF.ViewModels
job.ParH = sourceParValues.Height;
}
+ if (SelectedAnamorphicMode == Anamorphic.Custom)
+ {
+ job.ParW = this.DisplayWidth; // num
+ job.ParH = this.Width; // den
+ }
+
return job;
}
@@ -948,9 +951,15 @@ namespace HandBrakeWPF.ViewModels
? string.Empty
: string.Format(Resources.PictureSettingsViewModel_StorageDisplayLabel, dispWidth, result.OutputHeight, this.ParWidth, this.ParHeight);
+ if (changedField != ChangedPictureField.DisplayWidth)
+ {
+ this.Task.DisplayWidth = (int)dispWidth;
+ }
+
// Step 4, Force an update on all the UI elements.
this.NotifyOfPropertyChange(() => this.Width);
this.NotifyOfPropertyChange(() => this.Height);
+ this.NotifyOfPropertyChange(() => this.DisplayWidth);
this.NotifyOfPropertyChange(() => this.ParWidth);
this.NotifyOfPropertyChange(() => this.ParHeight);
this.NotifyOfPropertyChange(() => this.CropTop);
@@ -1006,8 +1015,8 @@ namespace HandBrakeWPF.ViewModels
this.HeightControlEnabled = true;
this.ShowCustomAnamorphicControls = true;
this.ShowModulus = true;
- this.ShowDisplaySize = false;
- this.ShowKeepAR = false;
+ this.ShowDisplaySize = true;
+ this.ShowKeepAR = true;
break;
}
}