diff options
author | sr55 <[email protected]> | 2016-12-10 21:13:00 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2016-12-10 21:13:00 +0000 |
commit | ce1090e397de99794ec4d6b6bc2ecb380e223c72 (patch) | |
tree | 34cb7f2df9b29334561aff41e206fabe5fb8221c /win | |
parent | 5fad4b45d7dfee9ac086ee20b08509d3d1c9f315 (diff) |
WinGui: Further Fixes to the Picture Settings screen when handling new sources.
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index 35260356f..e4e8e0075 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -758,33 +758,29 @@ namespace HandBrakeWPF.ViewModels {
// We have no instructions, so simply set it to the source.
this.Task.Width = this.GetModulusValue(this.sourceResolution.Width - this.CropLeft - this.CropRight);
+ this.Task.Height = this.GetModulusValue(this.sourceResolution.Height - this.CropTop - this.CropBottom);
this.MaintainAspectRatio = true;
}
else
{
- // Set the Max Width / Height available to the user controls
+ // Set the Max Width / Height available to the user controls.
+ this.MaxWidth = preset.Task.MaxWidth ?? this.sourceResolution.Width;
if (this.sourceResolution.Width < this.MaxWidth)
{
this.MaxWidth = this.sourceResolution.Width;
}
- else if (this.sourceResolution.Width > this.MaxWidth)
- {
- this.MaxWidth = preset.Task.MaxWidth ?? this.sourceResolution.Width;
- }
+ this.MaxHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height;
if (this.sourceResolution.Height < this.MaxHeight)
{
this.MaxHeight = this.sourceResolution.Height;
}
- else if (this.sourceResolution.Height > this.MaxHeight)
- {
- this.MaxHeight = preset.Task.MaxHeight ?? this.sourceResolution.Height;
- }
// Set the Width, and Maintain Aspect ratio. That should calc the Height for us.
if (this.SelectedAnamorphicMode == Anamorphic.None)
{
- this.Task.Width = preset.Task.Width ?? (this.MaxWidth - this.CropLeft - this.CropRight);
+ this.Task.Width = preset.Task.Width ?? this.GetModulusValue(this.MaxWidth - this.CropLeft - this.CropRight);
+ this.Task.Height = this.GetModulusValue(this.MaxHeight - this.CropTop - this.CropBottom);
// Note: This will be auto-corrected in the property if it's too large.
}
else
|