summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions/PresetLoader.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-07-14 23:11:09 +0000
committersr55 <[email protected]>2009-07-14 23:11:09 +0000
commitf5108ef3ae828197e68cb2f03f37ef90679f02c5 (patch)
tree0d8bfd9d30c8cafcf3975700e46210d09689f191 /win/C#/Functions/PresetLoader.cs
parent524118a019b8dcc4df759655742c170edcac45ab (diff)
WinGui:
- Updates Picture Settings code. A mix/match of old/new/libhb code. - Custom anamorphic mode widgets are not hooked up yet, but if the user sets them manually, they will work just fine. - Some of the logic has been simplified so that it works better however it's not bullet proof in terms of allowing users to misbehave. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2692 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/PresetLoader.cs')
-rw-r--r--win/C#/Functions/PresetLoader.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 051f3092c..136641474 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -5,6 +5,7 @@
It may be used under the terms of the GNU General Public License. */
using System;
+using System.Drawing;
using System.Windows.Forms;
namespace Handbrake.Functions
@@ -82,7 +83,7 @@ namespace Handbrake.Functions
mainWindow.PictureSettings.crop_right.Value = right;
}
}
-
+
// Set the anamorphic mode 0,1,2,3
mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = presetQuery.AnamorphicMode;
@@ -98,16 +99,12 @@ namespace Handbrake.Functions
// Max Width/Height override Width/Height
if (presetQuery.MaxWidth != 0)
- {
mainWindow.PictureSettings.text_width.Value = presetQuery.MaxWidth;
- mainWindow.PictureSettings.MaximumWidth = presetQuery.MaxWidth;
- }
if (presetQuery.MaxHeight != 0)
- {
mainWindow.PictureSettings.text_height.Value = presetQuery.MaxHeight;
- mainWindow.PictureSettings.MaximumHeight = presetQuery.MaxHeight;
- }
+
+ mainWindow.PictureSettings.PresetMaximumResolution = new Size(presetQuery.MaxWidth, presetQuery.MaxHeight);
// Case where both height and max height are 0 - For built-in presets
if (presetQuery.MaxHeight == 0 && presetQuery.Height == 0)
@@ -117,8 +114,6 @@ namespace Handbrake.Functions
if (mainWindow.selectedTitle != null && mainWindow.selectedTitle.Resolution.Width != 0)
mainWindow.PictureSettings.text_width.Value = mainWindow.selectedTitle.Resolution.Width;
- mainWindow.PictureSettings.setMax();
-
// Custom Anamorphic Controls
mainWindow.PictureSettings.updownDisplayWidth.Text = presetQuery.displayWidthValue.ToString();
mainWindow.PictureSettings.updownParHeight.Text = presetQuery.pixelAspectWidth.ToString();