\r
namespace HandBrakeWPF.Helpers\r
{\r
- using System.Diagnostics;\r
-\r
using HandBrake.ApplicationServices.Interop.HbLib;\r
using HandBrake.ApplicationServices.Interop.Model;\r
using HandBrake.ApplicationServices.Interop.Model.Encoding;\r
}\r
\r
/// <summary>\r
- /// Looks up a localized string similar to PAR Height:.\r
+ /// Looks up a localized string similar to PAR:.\r
/// </summary>\r
- public static string PictureSettingsView_ParH {\r
+ public static string PictureSettingsView_PAR {\r
get {\r
- return ResourceManager.GetString("PictureSettingsView_ParH", resourceCulture);\r
- }\r
- }\r
- \r
- /// <summary>\r
- /// Looks up a localized string similar to PAR Width:.\r
- /// </summary>\r
- public static string PictureSettingsView_ParW {\r
- get {\r
- return ResourceManager.GetString("PictureSettingsView_ParW", resourceCulture);\r
+ return ResourceManager.GetString("PictureSettingsView_PAR", resourceCulture);\r
}\r
}\r
\r
<data name="PictureSettingsView_Output" xml:space="preserve">\r
<value>Output</value>\r
</data>\r
- <data name="PictureSettingsView_ParH" xml:space="preserve">\r
- <value>PAR Height:</value>\r
- </data>\r
- <data name="PictureSettingsView_ParW" xml:space="preserve">\r
- <value>PAR Width:</value>\r
+ <data name="PictureSettingsView_PAR" xml:space="preserve">\r
+ <value>PAR:</value>\r
</data>\r
<data name="PictureSettingsView_Right" xml:space="preserve">\r
<value>Right</value>\r
{\r
get\r
{\r
- return new List<Anamorphic> { Anamorphic.None, Anamorphic.Automatic, Anamorphic.Loose }; // , Anamorphic.Custom TODO Re-enable one the UI is re-worked.\r
+ return new List<Anamorphic> { Anamorphic.None, Anamorphic.Automatic, Anamorphic.Loose, Anamorphic.Custom };\r
}\r
}\r
\r
Height = this.sourceResolution.Height,\r
ParW = this.sourceParValues.Width,\r
ParH = this.sourceParValues.Height,\r
- Aspect = 0 // TODO\r
};\r
\r
return title;\r
MaxHeight = this.MaxHeight,\r
KeepDisplayAspect = this.MaintainAspectRatio,\r
AnamorphicMode = this.SelectedAnamorphicMode,\r
- DarWidth = 0,\r
- DarHeight = 0,\r
Crop = new Cropping(this.CropTop, this.CropBottom, this.CropLeft, this.CropRight),\r
};\r
\r
job.ParH = sourceParValues.Height;\r
}\r
\r
+ if (SelectedAnamorphicMode == Anamorphic.Custom)\r
+ {\r
+ job.ParW = this.DisplayWidth; // num\r
+ job.ParH = this.Width; // den\r
+ }\r
+\r
return job;\r
}\r
\r
? string.Empty\r
: string.Format(Resources.PictureSettingsViewModel_StorageDisplayLabel, dispWidth, result.OutputHeight, this.ParWidth, this.ParHeight);\r
\r
+ if (changedField != ChangedPictureField.DisplayWidth)\r
+ {\r
+ this.Task.DisplayWidth = (int)dispWidth;\r
+ }\r
+\r
// Step 4, Force an update on all the UI elements.\r
this.NotifyOfPropertyChange(() => this.Width);\r
this.NotifyOfPropertyChange(() => this.Height);\r
+ this.NotifyOfPropertyChange(() => this.DisplayWidth);\r
this.NotifyOfPropertyChange(() => this.ParWidth);\r
this.NotifyOfPropertyChange(() => this.ParHeight);\r
this.NotifyOfPropertyChange(() => this.CropTop);\r
this.HeightControlEnabled = true;\r
this.ShowCustomAnamorphicControls = true;\r
this.ShowModulus = true;\r
- this.ShowDisplaySize = false;\r
- this.ShowKeepAR = false;\r
+ this.ShowDisplaySize = true;\r
+ this.ShowKeepAR = true;\r
break;\r
}\r
}\r
</Grid.ColumnDefinitions>\r
\r
<Label Content="{x:Static Properties:ResourcesUI.PictureSettingsView_DisplayWitdh}" Grid.Row="0" Grid.Column="0" />\r
- <Label Content="{x:Static Properties:ResourcesUI.PictureSettingsView_ParW}" Grid.Row="1" Grid.Column="0" />\r
- <Label Content="{x:Static Properties:ResourcesUI.PictureSettingsView_ParH}" Grid.Row="2" Grid.Column="0" />\r
+ <Label Content="{x:Static Properties:ResourcesUI.PictureSettingsView_PAR}" Grid.Row="1" Grid.Column="0" />\r
\r
<controls:NumberBox Width="60" Number="{Binding DisplayWidth, Mode=TwoWay}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5" \r
AllowEmpty="False" />\r
- <controls:NumberBox Width="60" Number="{Binding ParWidth, Mode=TwoWay}" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" AllowEmpty="False"\r
- IsEnabled="{Binding MaintainAspectRatio, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,0,5"\r
- ToolTip="{x:Static Properties:ResourcesTooltips.PictureSettingsView_PAR}"/>\r
- <controls:NumberBox Width="60" Number="{Binding ParHeight, Mode=TwoWay}" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left" AllowEmpty="False"\r
- IsEnabled="{Binding MaintainAspectRatio, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,0,5"\r
- ToolTip="{x:Static Properties:ResourcesTooltips.PictureSettingsView_PAR}"/>\r
+ <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1">\r
+ <controls:NumberBox Width="60" Number="{Binding ParWidth, Mode=TwoWay}" HorizontalAlignment="Left" AllowEmpty="False"\r
+ IsEnabled="{Binding MaintainAspectRatio, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,0,5"\r
+ ToolTip="{x:Static Properties:ResourcesTooltips.PictureSettingsView_PAR}"/>\r
+ <TextBlock Text="X" Margin="10,0,10,0" />\r
+ <controls:NumberBox Width="60" Number="{Binding ParHeight, Mode=TwoWay}" HorizontalAlignment="Left" AllowEmpty="False"\r
+ IsEnabled="{Binding MaintainAspectRatio, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="0,0,0,5"\r
+ ToolTip="{x:Static Properties:ResourcesTooltips.PictureSettingsView_PAR}"/>\r
+ </StackPanel>\r
</Grid>\r
\r
</StackPanel>\r