It may be used under the terms of the GNU General Public License. */\r
\r
using System;\r
+using System.Drawing;\r
using System.Windows.Forms;\r
\r
namespace Handbrake.Functions\r
mainWindow.PictureSettings.crop_right.Value = right;\r
}\r
}\r
-\r
+ \r
// Set the anamorphic mode 0,1,2,3\r
mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = presetQuery.AnamorphicMode;\r
\r
// Aspect Ratio\r
mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.keepDisplayAsect ? CheckState.Checked : CheckState.Unchecked;\r
-\r
- // Reset maxWidth and MaxHeight to 0\r
- mainWindow.PictureSettings.maxWidth = 0;\r
- mainWindow.PictureSettings.maxHeight = 0;\r
\r
// Set the Width and height as Required.\r
if (presetQuery.Width != 0)\r
\r
// Max Width/Height override Width/Height\r
if (presetQuery.MaxWidth != 0)\r
- {\r
mainWindow.PictureSettings.text_width.Value = presetQuery.MaxWidth;\r
- mainWindow.PictureSettings.maxWidth = presetQuery.MaxWidth;\r
- }\r
\r
if (presetQuery.MaxHeight != 0)\r
- {\r
mainWindow.PictureSettings.text_height.Value = presetQuery.MaxHeight;\r
- mainWindow.PictureSettings.maxHeight = presetQuery.MaxHeight;\r
- }\r
+\r
+ mainWindow.PictureSettings.PresetMaximumResolution = new Size(presetQuery.MaxWidth, presetQuery.MaxHeight);\r
\r
// Case where both height and max height are 0 - For built-in presets\r
if (presetQuery.MaxHeight == 0 && presetQuery.Height == 0)\r
if (mainWindow.selectedTitle != null && mainWindow.selectedTitle.Resolution.Width != 0)\r
mainWindow.PictureSettings.text_width.Value = mainWindow.selectedTitle.Resolution.Width;\r
\r
- mainWindow.PictureSettings.setMax();\r
-\r
// Custom Anamorphic Controls\r
- mainWindow.PictureSettings.txt_displayWidth.Text = presetQuery.displayWidthValue.ToString();\r
- mainWindow.PictureSettings.txt_parWidth.Text = presetQuery.pixelAspectWidth.ToString();\r
- mainWindow.PictureSettings.txt_parHeight.Text = presetQuery.pixelAspectHeight.ToString();\r
- mainWindow.PictureSettings.drop_modulus.SelectedItem = presetQuery.AnamorphicModulus;\r
+ mainWindow.PictureSettings.updownDisplayWidth.Text = presetQuery.displayWidthValue.ToString();\r
+ mainWindow.PictureSettings.updownParHeight.Text = presetQuery.pixelAspectWidth.ToString();\r
+ mainWindow.PictureSettings.updownParWidth.Text = presetQuery.pixelAspectHeight.ToString();\r
+ mainWindow.PictureSettings.drp_modulus.SelectedItem = presetQuery.AnamorphicModulus;\r
\r
#endregion\r
\r
mainWindow.x264Panel.x264Query = presetQuery.H264Query;\r
\r
// Set the preset name\r
- mainWindow.groupBox_output.Text = "Output Settings (Preset: " + name + ")";\r
+ mainWindow.labelPreset.Text = "Output Settings (Preset: " + name + ")";\r
#endregion\r
}\r
}\r