summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-07-04 19:34:25 +0000
committersr55 <[email protected]>2009-07-04 19:34:25 +0000
commit39236e31497de99fe8e29458bab51d7a9d28a27d (patch)
tree208d81d44cfb8be24d1992903a840bcfd575672e /win/C#/Functions
parent499dbe37cfa932362827622bb04132ecd2371f96 (diff)
WinGui:
- Some fixes to the Picture settings panel and preset loader. - Small UI tweak to options. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2664 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/PresetLoader.cs39
1 files changed, 20 insertions, 19 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 28cec6805..0b72d2915 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -62,11 +62,11 @@ namespace Handbrake.Functions
#endregion
#region Picture
-
+
if (pictureSettings) // only Load picture settings if the perset requires it
{
mainWindow.PictureSettings.check_autoCrop.Checked = true;
-
+
if (presetQuery.CropValues != null)
{
int top, bottom, left, right;
@@ -83,25 +83,19 @@ namespace Handbrake.Functions
}
}
+ // Set the anamorphic mode 0,1,2,3
+ mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = presetQuery.AnamorphicMode;
+
+ // Aspect Ratio
+ mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.keepDisplayAsect ? CheckState.Checked : CheckState.Unchecked;
+
// Reset maxWidth and MaxHeight to 0
mainWindow.PictureSettings.maxWidth = 0;
mainWindow.PictureSettings.maxHeight = 0;
-
- // Set the width and height
+
+ // Set the Width and height as Required.
if (presetQuery.Width != 0)
mainWindow.PictureSettings.text_width.Value = presetQuery.Width;
- else if (presetQuery.MaxWidth == 0)
- {
- if (mainWindow.selectedTitle != null)
- if (mainWindow.selectedTitle.Resolution.Width != 0)
- {
- mainWindow.PictureSettings.text_width.Value = mainWindow.selectedTitle.Resolution.Width;
- if (presetQuery.Height == 0 && presetQuery.MaxHeight == 0)
- mainWindow.PictureSettings.check_KeepAR.Checked = true;
- }
- else
- mainWindow.PictureSettings.text_width.Value = 0;
- }
if (presetQuery.Height != 0)
mainWindow.PictureSettings.text_height.Value = presetQuery.Height;
@@ -118,13 +112,20 @@ namespace Handbrake.Functions
mainWindow.PictureSettings.text_height.Value = presetQuery.MaxHeight;
mainWindow.PictureSettings.maxHeight = presetQuery.MaxHeight;
}
+
+ // Case where both height and max height are 0 - For built-in presets
+ if (presetQuery.MaxHeight == 0 && presetQuery.Height == 0)
+ mainWindow.PictureSettings.text_height.Value = 0;
+
+ if (presetQuery.MaxWidth == 0 && presetQuery.Width == 0)
+ if (mainWindow.selectedTitle != null && mainWindow.selectedTitle.Resolution.Width != 0)
+ mainWindow.PictureSettings.text_width.Value = mainWindow.selectedTitle.Resolution.Width;
+
mainWindow.PictureSettings.setMax();
- // Set the anamorphic mode 0,1,2,3
- mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = presetQuery.AnamorphicMode;
+
// Custom Anamorphic Controls
- mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.keepDisplayAsect ? CheckState.Checked : CheckState.Unchecked;
mainWindow.PictureSettings.txt_displayWidth.Text = presetQuery.displayWidthValue.ToString();
mainWindow.PictureSettings.txt_parWidth.Text = presetQuery.pixelAspectWidth.ToString();
mainWindow.PictureSettings.txt_parHeight.Text = presetQuery.pixelAspectHeight.ToString();