Sorry, only for windows, don't know how to do it for other platforms.
I think it is worth making a setting that can be set for all sources automatically on opening input file.
Please let me know what you think about this.
Code: Select all
Index: win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
===================================================================
--- win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs (revision 5835)
+++ win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs (working copy)
@@ -807,6 +807,18 @@
#region Methods
+ public void SetCropWidescreen()
+ {
+ CropLeft = (sourceResolution.Width - sourceResolution.Height * 16 / 10) / 2;
+ CropRight = (sourceResolution.Width - sourceResolution.Height * 16 / 10) / 2;
+ }
+
+ public void SetCropUWidescreen()
+ {
+ CropLeft = (sourceResolution.Width - sourceResolution.Height * 16 / 9) / 2;
+ CropRight = (sourceResolution.Width - sourceResolution.Height * 16 / 9) / 2;
+ }
+
/// <summary>
/// The crop adjust.
/// </summary>
Index: win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml
===================================================================
--- win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml (revision 5835)
+++ win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml (working copy)
@@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
+ xmlns:cal="http://www.caliburnproject.org"
xmlns:controls="clr-namespace:HandBrakeWPF.Controls">
<UserControl.Resources>
@@ -106,6 +107,10 @@
<Label Content="Cropping" FontWeight="Bold" />
<RadioButton Content="Automatic" IsChecked="{Binding IsCustomCrop, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="10,0,0,0"/>
<RadioButton Content="Custom" IsChecked="{Binding IsCustomCrop}" Margin="10,5,0,0" />
+ <StackPanel Height="30" Width="100" Orientation="Horizontal" IsEnabled="{Binding IsCustomCrop}">
+ <Button Content="16:10" Width="50" Margin="0,0,0,0" cal:Message.Attach="[Event Click] = [Action SetCropWidescreen]" />
+ <Button Content="16:9" Width="50" Margin="0,0,0,0" cal:Message.Attach="[Event Click] = [Action SetCropUWidescreen]"/>
+ </StackPanel>
<Grid Margin="0,10,0,0">
<Grid.RowDefinitions>