summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2021-01-30 18:33:56 +0000
committersr55 <[email protected]>2021-01-30 18:33:56 +0000
commit047b684310107ec84d16bb767a9345c7c7fe1afe (patch)
tree3bc4622ce970f6d6ef03d0e191ad9d949e4314c3
parent64e15a878106652f723bd0d72c3a32a3e7e184c8 (diff)
WinGui: Add support for Chroma Smooth filter.
-rw-r--r--win/CS/HandBrake.Interop/Interop/Json/Presets/HBPreset.cs6
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.Designer.cs9
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.resx3
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesTooltips.Designer.cs9
-rw-r--r--win/CS/HandBrakeWPF/Properties/ResourcesTooltips.resx3
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs12
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs11
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs15
-rw-r--r--win/CS/HandBrakeWPF/ViewModelItems/Filters/ChromaSmoothFilter.cs191
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs11
-rw-r--r--win/CS/HandBrakeWPF/Views/FiltersView.xaml53
11 files changed, 306 insertions, 17 deletions
diff --git a/win/CS/HandBrake.Interop/Interop/Json/Presets/HBPreset.cs b/win/CS/HandBrake.Interop/Interop/Json/Presets/HBPreset.cs
index 4e42409b8..e31d3dcb4 100644
--- a/win/CS/HandBrake.Interop/Interop/Json/Presets/HBPreset.cs
+++ b/win/CS/HandBrake.Interop/Interop/Json/Presets/HBPreset.cs
@@ -191,6 +191,12 @@ namespace HandBrake.Interop.Interop.Json.Presets
public string PictureColorspaceCustom { get; set; }
+ public string PictureChromaSmoothPreset { get; set; }
+
+ public string PictureChromaSmoothTune { get; set; }
+
+ public string PictureChromaSmoothCustom { get; set; }
+
/// <summary>
/// Gets or sets a value indicating whether picture itu par.
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
index 115f5befe..ca70b1b43 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
@@ -971,6 +971,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Chroma Smooth:.
+ /// </summary>
+ public static string FiltersView_ChromaSmooth {
+ get {
+ return ResourceManager.GetString("FiltersView_ChromaSmooth", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Colourspace:.
/// </summary>
public static string FiltersView_ColourSpace {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx
index 76cd45b47..00069e88c 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.resx
@@ -2417,6 +2417,9 @@ Fields are limited to:
<data name="OptionsView_RequiresRestart" xml:space="preserve">
<value>(Requires Restart)</value>
</data>
+ <data name="FiltersView_ChromaSmooth" xml:space="preserve">
+ <value>Chroma Smooth:</value>
+ </data>
<data name="FiltersView_ColourSpace" xml:space="preserve">
<value>Colourspace:</value>
</data>
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesTooltips.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesTooltips.Designer.cs
index 2e053e9f7..01a4f44a8 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesTooltips.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesTooltips.Designer.cs
@@ -61,6 +61,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Chroma Smooth Filter.
+ /// </summary>
+ public static string FiltersView_ChromaSmooth {
+ get {
+ return ResourceManager.GetString("FiltersView_ChromaSmooth", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Colourspace Filter..
/// </summary>
public static string FiltersView_ColourSpace {
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesTooltips.resx b/win/CS/HandBrakeWPF/Properties/ResourcesTooltips.resx
index 8690319ae..cfc83b6c5 100644
--- a/win/CS/HandBrakeWPF/Properties/ResourcesTooltips.resx
+++ b/win/CS/HandBrakeWPF/Properties/ResourcesTooltips.resx
@@ -468,4 +468,7 @@ When disabled, it will use the path in the destination box on the main window if
<data name="FiltersView_ColourSpace" xml:space="preserve">
<value>Colourspace Filter.</value>
</data>
+ <data name="FiltersView_ChromaSmooth" xml:space="preserve">
+ <value>Chroma Smooth Filter</value>
+ </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs
index faba29387..cac804d38 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs
@@ -499,6 +499,18 @@ namespace HandBrakeWPF.Services.Encode.Factories
}
}
+ if (job.ChromaSmooth != null && job.ChromaSmooth.Key != "off")
+ {
+ string unparsedJson = HandBrakeFilterHelpers.GenerateFilterSettingJson((int)hb_filter_ids.HB_FILTER_CHROMA_SMOOTH, job.ChromaSmooth.Key, job.ChromaSmoothTune?.Key, job.CustomChromaSmooth);
+ if (!string.IsNullOrEmpty(unparsedJson))
+ {
+ JsonDocument settings = JsonDocument.Parse(unparsedJson);
+
+ Filter filterItem = new Filter { ID = (int)hb_filter_ids.HB_FILTER_CHROMA_SMOOTH, Settings = settings };
+ filter.FilterList.Add(filterItem);
+ }
+ }
+
// Grayscale
if (job.Grayscale)
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
index bd50f19cf..3f1835888 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
@@ -93,6 +93,9 @@ namespace HandBrakeWPF.Services.Encode.Model
this.Padding = task.Padding;
this.Colourspace = task.Colourspace;
this.CustomColourspace = task.CustomColourspace;
+ this.ChromaSmooth = task.ChromaSmooth;
+ this.ChromaSmoothTune = task.ChromaSmoothTune;
+ this.CustomChromaSmooth = task.CustomChromaSmooth;
this.DisplayWidth = task.DisplayWidth;
this.EndPoint = task.EndPoint;
@@ -243,7 +246,13 @@ namespace HandBrakeWPF.Services.Encode.Model
public FilterPreset Colourspace { get; set; }
public string CustomColourspace { get; set; }
-
+
+ public FilterPreset ChromaSmooth { get; set; }
+
+ public FilterTune ChromaSmoothTune { get; set; }
+
+ public string CustomChromaSmooth { get; set; }
+
/* Video */
public VideoEncodeRateType VideoEncodeRateType { get; set; }
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
index bf116c183..d54330c81 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
@@ -97,6 +97,17 @@ namespace HandBrakeWPF.Services.Presets.Factories
{
preset.Task.Colourspace = new FilterPreset("Off", "off");
}
+
+ if (!string.IsNullOrEmpty(importedPreset.PictureChromaSmoothPreset))
+ {
+ preset.Task.ChromaSmooth = new FilterPreset(HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_CHROMA_SMOOTH).FirstOrDefault(s => s.ShortName == importedPreset.PictureChromaSmoothPreset));
+ preset.Task.ChromaSmoothTune = new FilterTune(HandBrakeFilterHelpers.GetFilterTunes((int)hb_filter_ids.HB_FILTER_CHROMA_SMOOTH).FirstOrDefault(s => s.ShortName == importedPreset.PictureChromaSmoothTune));
+ preset.Task.CustomChromaSmooth = importedPreset.PictureChromaSmoothCustom;
+ }
+ else
+ {
+ preset.Task.ChromaSmooth = new FilterPreset("Off", "off");
+ }
if (!string.IsNullOrEmpty(importedPreset.PictureDeblockPreset))
{
@@ -648,6 +659,10 @@ namespace HandBrakeWPF.Services.Presets.Factories
preset.PictureColorspacePreset = export.Task.Colourspace?.Key;
preset.PictureColorspaceCustom = export.Task.CustomColourspace;
+ preset.PictureChromaSmoothPreset = export.Task.ChromaSmooth?.Key;
+ preset.PictureChromaSmoothTune = export.Task.ChromaSmoothTune?.Key;
+ preset.PictureChromaSmoothCustom = export.Task.CustomChromaSmooth;
+
// Video
preset.VideoEncoder = EnumHelper<VideoEncoder>.GetShortName(export.Task.VideoEncoder);
preset.VideoFramerate = export.Task.Framerate.HasValue ? export.Task.Framerate.ToString() : null;
diff --git a/win/CS/HandBrakeWPF/ViewModelItems/Filters/ChromaSmoothFilter.cs b/win/CS/HandBrakeWPF/ViewModelItems/Filters/ChromaSmoothFilter.cs
new file mode 100644
index 000000000..3895b6648
--- /dev/null
+++ b/win/CS/HandBrakeWPF/ViewModelItems/Filters/ChromaSmoothFilter.cs
@@ -0,0 +1,191 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="ChromaSmoothFilter.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Defines the Chroma Smooth Filter type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.ViewModelItems.Filters
+{
+ using System.ComponentModel;
+ using System.Linq;
+
+ using Caliburn.Micro;
+
+ using HandBrake.Interop.Interop;
+ using HandBrake.Interop.Interop.HbLib;
+ using HandBrake.Interop.Interop.Model.Encoding;
+
+ using HandBrakeWPF.Model.Filters;
+ using HandBrakeWPF.Services.Encode.Model;
+ using HandBrakeWPF.Services.Presets.Model;
+ using HandBrakeWPF.Services.Scan.Model;
+
+ using Action = System.Action;
+
+ public class ChromaSmoothFilter : PropertyChangedBase
+ {
+ public static readonly string Off = "off";
+ public static readonly string Custom = "custom";
+
+ private readonly Action triggerTabChanged;
+
+ public ChromaSmoothFilter(EncodeTask currentTask, Action triggerTabChanged)
+ {
+ this.triggerTabChanged = triggerTabChanged;
+ this.CurrentTask = currentTask;
+
+ this.SetPresets();
+ this.SetTunes();
+ }
+
+ public EncodeTask CurrentTask { get; private set; }
+
+ public BindingList<FilterPreset> Presets { get; set; }
+
+ public BindingList<FilterTune> Tunes { get; set; }
+
+ public bool ShowTune => this.SelectedPreset != null && this.SelectedPreset.Key != Off && this.SelectedPreset.Key != Custom;
+
+ public bool ShowCustom => this.SelectedPreset != null && this.SelectedPreset.Key == Custom;
+
+ public FilterPreset SelectedPreset
+ {
+ get => this.CurrentTask.ChromaSmooth;
+
+ set
+ {
+ if (Equals(value, this.CurrentTask.ChromaSmooth))
+ {
+ return;
+ }
+
+ this.CurrentTask.ChromaSmooth = value;
+
+ this.NotifyOfPropertyChange(() => this.SelectedPreset);
+ this.NotifyOfPropertyChange(() => this.ShowTune);
+ this.NotifyOfPropertyChange(() => this.ShowCustom);
+
+ if (this.SelectedTune == null)
+ {
+ this.SelectedTune = this.Tunes.FirstOrDefault();
+ }
+
+ this.triggerTabChanged();
+ }
+ }
+
+ public FilterTune SelectedTune
+ {
+ get => this.CurrentTask.ChromaSmoothTune;
+
+ set
+ {
+ if (Equals(value, this.CurrentTask.ChromaSmoothTune))
+ {
+ return;
+ }
+
+ this.CurrentTask.ChromaSmoothTune = value;
+
+ this.NotifyOfPropertyChange(() => this.SelectedTune);
+ this.triggerTabChanged();
+ }
+ }
+
+ public string CustomSettings
+ {
+ get => this.CurrentTask.CustomChromaSmooth;
+
+ set
+ {
+ if (value == this.CurrentTask.CustomChromaSmooth)
+ {
+ return;
+ }
+
+ this.CurrentTask.CustomChromaSmooth = value;
+ this.NotifyOfPropertyChange(() => this.CustomSettings);
+ }
+ }
+
+ public void SetPreset(Preset preset, EncodeTask task)
+ {
+ this.CurrentTask = task;
+
+ if (preset == null)
+ {
+ this.SelectedPreset = new FilterPreset(HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_CHROMA_SMOOTH).FirstOrDefault(s => s.ShortName == "off"));
+ this.CustomSettings = string.Empty;
+ this.SelectedTune = null;
+ return;
+ }
+
+ this.SelectedPreset = preset.Task.ChromaSmooth;
+ this.SelectedTune = preset.Task.ChromaSmoothTune;
+ this.CustomSettings = preset.Task.CustomChromaSmooth;
+ }
+
+ public void UpdateTask(EncodeTask task)
+ {
+ this.CurrentTask = task;
+ this.NotifyOfPropertyChange(() => this.SelectedPreset);
+ this.NotifyOfPropertyChange(() => this.SelectedTune);
+ this.NotifyOfPropertyChange(() => this.CustomSettings);
+
+ this.NotifyOfPropertyChange(() => this.ShowTune);
+ this.NotifyOfPropertyChange(() => this.ShowCustom);
+ }
+
+ public bool MatchesPreset(Preset preset)
+ {
+ if (this.SelectedPreset?.Key != preset.Task?.ChromaSmooth?.Key)
+ {
+ return false;
+ }
+
+ if (this.SelectedTune.Key != preset?.Task?.ChromaSmoothTune.Key)
+ {
+ return false;
+ }
+
+ if (this.CustomSettings != preset?.Task?.CustomChromaSmooth)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ public void SetSource(Source source, Title title, Preset preset, EncodeTask task)
+ {
+ this.CurrentTask = task;
+ }
+
+ private void SetPresets()
+ {
+ BindingList<FilterPreset> presets = new BindingList<FilterPreset>();
+ foreach (HBPresetTune tune in HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_CHROMA_SMOOTH))
+ {
+ presets.Add(new FilterPreset(tune));
+ }
+
+ this.Presets = presets;
+ this.NotifyOfPropertyChange(() => this.Presets);
+ }
+
+ private void SetTunes()
+ {
+ BindingList<FilterTune> tunes = new BindingList<FilterTune>();
+ foreach (HBPresetTune tune in HandBrakeFilterHelpers.GetFilterTunes((int)hb_filter_ids.HB_FILTER_CHROMA_SMOOTH))
+ {
+ tunes.Add(new FilterTune(tune));
+ }
+
+ this.Tunes = tunes;
+ this.NotifyOfPropertyChange(() => this.Tunes);
+ }
+ }
+}
diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
index d1e58f589..4a4266255 100644
--- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
@@ -33,6 +33,7 @@ namespace HandBrakeWPF.ViewModels
this.DeblockFilter = new DeblockFilter(this.CurrentTask, () => this.OnTabStatusChanged(null));
this.GrayscaleFilter = new GrayscaleFilter(this.CurrentTask, () => this.OnTabStatusChanged(null));
this.ColourSpaceFilter = new ColourSpaceFilter(this.CurrentTask, () => this.OnTabStatusChanged(null));
+ this.ChromaSmoothFilter = new ChromaSmoothFilter(this.CurrentTask, () => this.OnTabStatusChanged(null));
}
public event EventHandler<TabStatusEventArgs> TabStatusChanged;
@@ -52,6 +53,8 @@ namespace HandBrakeWPF.ViewModels
public ColourSpaceFilter ColourSpaceFilter { get; set; }
public GrayscaleFilter GrayscaleFilter { get; set; }
+
+ public ChromaSmoothFilter ChromaSmoothFilter { get; set; }
public void SetPreset(Preset preset, EncodeTask task)
{
@@ -63,6 +66,7 @@ namespace HandBrakeWPF.ViewModels
this.DeinterlaceFilter.SetPreset(preset, task);
this.DeblockFilter.SetPreset(preset, task);
this.ColourSpaceFilter.SetPreset(preset, task);
+ this.ChromaSmoothFilter.SetPreset(preset, task);
}
public void UpdateTask(EncodeTask task)
@@ -76,6 +80,7 @@ namespace HandBrakeWPF.ViewModels
this.DeblockFilter.UpdateTask(task);
this.GrayscaleFilter.UpdateTask(task);
this.ColourSpaceFilter.UpdateTask(task);
+ this.ChromaSmoothFilter.UpdateTask(task);
}
public bool MatchesPreset(Preset preset)
@@ -115,6 +120,11 @@ namespace HandBrakeWPF.ViewModels
return false;
}
+ if (!this.ChromaSmoothFilter.MatchesPreset(preset))
+ {
+ return false;
+ }
+
return true;
}
@@ -128,6 +138,7 @@ namespace HandBrakeWPF.ViewModels
this.DeblockFilter.SetSource(source, title, preset, task);
this.GrayscaleFilter.SetSource(source, title, preset, task);
this.ColourSpaceFilter.SetSource(source, title, preset, task);
+ this.ChromaSmoothFilter.SetSource(source, title, preset, task);
}
protected virtual void OnTabStatusChanged(TabStatusEventArgs e)
diff --git a/win/CS/HandBrakeWPF/Views/FiltersView.xaml b/win/CS/HandBrakeWPF/Views/FiltersView.xaml
index a164c9ac9..38291fef9 100644
--- a/win/CS/HandBrakeWPF/Views/FiltersView.xaml
+++ b/win/CS/HandBrakeWPF/Views/FiltersView.xaml
@@ -42,6 +42,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -93,13 +94,13 @@
<!-- Denoise -->
- <TextBlock Text="{x:Static Properties:Resources.FiltersView_Denoise}" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>
+ <TextBlock Text="{x:Static Properties:Resources.FiltersView_Denoise}" Grid.Row="3" Grid.Column="0" Margin="0,0,0,15"/>
<ComboBox Width="120" Grid.Row="3" ItemsSource="{Binding DenoiseFilter.DenoiseOptions, Converter={StaticResource boolComboConverter}}"
SelectedItem="{Binding DenoiseFilter.SelectedDenoise, Converter={StaticResource boolComboConverter}}" Grid.Column="1"
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,0,0,10" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_Denoise}"
AutomationProperties.Name="{x:Static Properties:Resources.FiltersView_Denoise}"/>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="3" Grid.Column="2" Margin="0,0,0,10"
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="3" Grid.Column="2" Margin="0,0,0,15"
Visibility="{Binding DenoiseFilter.ShowDenoiseOptions, Converter={StaticResource boolToVisConverter}}">
<TextBlock Text="{x:Static Properties:Resources.FiltersView_Preset}" Margin="0,0,5,0" />
<ComboBox SelectedItem="{Binding DenoiseFilter.SelectedDenoisePreset}" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_DenoisePreset}"
@@ -117,25 +118,45 @@
<TextBlock Text="{x:Static Properties:Resources.FiltersView_Tune}" Margin="5,0,5,0" />
<ComboBox ItemsSource="{Binding DenoiseFilter.DenoiseTunes}" SelectedItem="{Binding DenoiseFilter.SelectedDenoiseTune}" MinWidth="100" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_DenoiseTune}"
AutomationProperties.Name="{x:Static Properties:Resources.FiltersView_DenoiseTuneAuto}"
- Visibility="{Binding DenoiseFilter.ShowDenoiseTune, Converter={StaticResource boolToVisConverter}}" VerticalAlignment="Center" />
+ Visibility="{Binding DenoiseFilter.ShowDenoiseTune, Converter={StaticResource boolToVisConverter}}" VerticalAlignment="Center" />
</StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding DenoiseFilter.ShowDenoiseCustom, Converter={StaticResource boolToVisConverter}}">
<TextBlock Text="{x:Static Properties:Resources.FiltersView_Custom}" Margin="5,0,5,0" />
- <TextBox Width="120" Margin="0" Text="{Binding DenoiseFilter.CustomDenoise, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" MinHeight="22"
+ <TextBox Width="120" Margin="0" Text="{Binding DenoiseFilter.CustomDenoise, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center"
ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_CustomDenoiseParams}" />
</StackPanel>
+ </StackPanel>
+
+ <!-- Chroma Smooth -->
+ <TextBlock Text="{x:Static Properties:Resources.FiltersView_ChromaSmooth}" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" Margin="0,0,0,10"/>
+ <ComboBox Width="120" Grid.Row="4" Grid.Column="1" Margin="0,0,0,10"
+ ItemsSource="{Binding ChromaSmoothFilter.Presets}" DisplayMemberPath="DisplayName"
+ SelectedItem="{Binding ChromaSmoothFilter.SelectedPreset}"
+ AutomationProperties.Name="{x:Static Properties:Resources.FiltersView_ChromaSmooth}"
+ HorizontalAlignment="Left" VerticalAlignment="Center"
+ ToolTip="{x:Static Properties:ResourcesTooltips.FiltersView_ChromaSmooth}" />
+
+ <StackPanel Orientation="Horizontal" Visibility="{Binding ChromaSmoothFilter.ShowTune, Converter={StaticResource boolToVisConverter}}" Grid.Row="4" Grid.Column="2" Margin="0,0,0,10" >
+ <TextBlock Text="{x:Static Properties:Resources.FiltersView_Tune}" Margin="5,0,5,0" />
+ <ComboBox ItemsSource="{Binding ChromaSmoothFilter.Tunes}" DisplayMemberPath="DisplayName" SelectedItem="{Binding ChromaSmoothFilter.SelectedTune}"
+ MinWidth="100" VerticalAlignment="Center"
+ AutomationProperties.Name="{x:Static Properties:Resources.FiltersView_Tune}" />
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" Visibility="{Binding ChromaSmoothFilter.ShowCustom, Converter={StaticResource boolToVisConverter}}" Grid.Row="4" Grid.Column="2" VerticalAlignment="Center" Margin="0,0,0,10" >
+ <TextBlock Text="{x:Static Properties:Resources.FiltersView_Custom}" Margin="5,0,5,0" VerticalAlignment="Center" />
+ <TextBox Width="240" Margin="0" Text="{Binding ChromaSmoothFilter.CustomSettings, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" MinHeight="22" />
</StackPanel>
-
+
<!-- Sharpen -->
- <TextBlock Text="{x:Static Properties:Resources.FiltersView_Sharpen}" Grid.Row="4" Grid.Column="0" Margin="0,0,0,10"/>
- <ComboBox Width="120" Grid.Row="4" ItemsSource="{Binding SharpenFilter.SharpenOptions, Converter={StaticResource boolComboConverter}}"
+ <TextBlock Text="{x:Static Properties:Resources.FiltersView_Sharpen}" Grid.Row="5" Grid.Column="0" Margin="0,0,0,10"/>
+ <ComboBox Width="120" Grid.Row="5" ItemsSource="{Binding SharpenFilter.SharpenOptions, Converter={StaticResource boolComboConverter}}"
SelectedItem="{Binding SharpenFilter.SelectedSharpen, Converter={StaticResource boolComboConverter}}" Grid.Column="1"
AutomationProperties.Name="{x:Static Properties:Resources.FiltersView_Sharpen}"
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,0,0,10" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_Sharpen}" />
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="4" Grid.Column="2" Margin="0,0,0,10"
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="5" Grid.Column="2" Margin="0,0,0,10"
Visibility="{Binding SharpenFilter.ShowSharpenOptions, Converter={StaticResource boolToVisConverter}}">
<TextBlock Text="{x:Static Properties:Resources.FiltersView_Preset}" Margin="0,0,5,0" />
@@ -172,22 +193,22 @@
</StackPanel>
<!-- Deblock -->
- <TextBlock Text="{x:Static Properties:Resources.FiltersView_Deblock}" Grid.Row="5" Grid.Column="0" VerticalAlignment="Center" />
- <ComboBox Width="120" Grid.Row="5" Grid.Column="1"
+ <TextBlock Text="{x:Static Properties:Resources.FiltersView_Deblock}" Grid.Row="6" Grid.Column="0" VerticalAlignment="Center" />
+ <ComboBox Width="120" Grid.Row="6" Grid.Column="1"
ItemsSource="{Binding DeblockFilter.Presets}" DisplayMemberPath="DisplayName"
SelectedItem="{Binding DeblockFilter.SelectedPreset}"
AutomationProperties.Name="{x:Static Properties:Resources.FiltersViewAuto_DeblockPreset}"
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,0,0,0"
ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_Deblock}" />
- <StackPanel Orientation="Horizontal" Visibility="{Binding DeblockFilter.ShowDeblockTune, Converter={StaticResource boolToVisConverter}}" Grid.Row="5" Grid.Column="2" >
+ <StackPanel Orientation="Horizontal" Visibility="{Binding DeblockFilter.ShowDeblockTune, Converter={StaticResource boolToVisConverter}}" Grid.Row="6" Grid.Column="2" >
<TextBlock Text="{x:Static Properties:Resources.FiltersView_Tune}" Margin="5,0,5,0" />
<ComboBox ItemsSource="{Binding DeblockFilter.Tunes}" DisplayMemberPath="DisplayName" SelectedItem="{Binding DeblockFilter.SelectedTune}"
MinWidth="100" VerticalAlignment="Center"
AutomationProperties.Name="{x:Static Properties:Resources.FiltersViewAuto_DeblockTune}" />
</StackPanel>
- <StackPanel Orientation="Horizontal" Visibility="{Binding DeblockFilter.ShowDeblockCustom, Converter={StaticResource boolToVisConverter}}" Grid.Row="5" Grid.Column="2" >
+ <StackPanel Orientation="Horizontal" Visibility="{Binding DeblockFilter.ShowDeblockCustom, Converter={StaticResource boolToVisConverter}}" Grid.Row="6" Grid.Column="2" >
<TextBlock Text="{x:Static Properties:Resources.FiltersView_Custom}" Margin="5,0,5,0" VerticalAlignment="Center" />
<TextBox Width="240" Margin="0" Text="{Binding DeblockFilter.CustomDeblock, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" MinHeight="22" />
</StackPanel>
@@ -195,8 +216,8 @@
<!-- Colourspace -->
- <TextBlock Text="{x:Static Properties:Resources.FiltersView_ColourSpace}" Grid.Row="6" Grid.Column="0" VerticalAlignment="Center" Margin="0,10,0,10" />
- <ComboBox Width="120" Grid.Row="6" Grid.Column="1" Margin="0,10,0,10"
+ <TextBlock Text="{x:Static Properties:Resources.FiltersView_ColourSpace}" Grid.Row="7" Grid.Column="0" VerticalAlignment="Center" Margin="0,10,0,10" />
+ <ComboBox Width="120" Grid.Row="7" Grid.Column="1" Margin="0,10,0,10"
ItemsSource="{Binding ColourSpaceFilter.Presets}" DisplayMemberPath="DisplayName"
SelectedItem="{Binding ColourSpaceFilter.SelectedPreset}"
AutomationProperties.Name="{x:Static Properties:Resources.FiltersView_ColourSpace}"
@@ -204,13 +225,13 @@
ToolTip="{x:Static Properties:ResourcesTooltips.FiltersView_ColourSpace}" />
- <StackPanel Orientation="Horizontal" Visibility="{Binding ColourSpaceFilter.ShowColourspaceCustom, Converter={StaticResource boolToVisConverter}}" Grid.Row="6" Grid.Column="2" Margin="0,10,0,10" >
+ <StackPanel Orientation="Horizontal" Visibility="{Binding ColourSpaceFilter.ShowColourspaceCustom, Converter={StaticResource boolToVisConverter}}" Grid.Row="7" Grid.Column="2" Margin="0,10,0,10" >
<TextBlock Text="{x:Static Properties:Resources.FiltersView_Custom}" Margin="5,0,5,0" VerticalAlignment="Center" />
<TextBox Width="240" Margin="0" Text="{Binding ColourSpaceFilter.CustomColourspace, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" MinHeight="22" />
</StackPanel>
<!-- Grayscale -->
- <CheckBox Content="{x:Static Properties:Resources.FiltersView_Grayscale}" IsChecked="{Binding GrayscaleFilter.Grayscale}" Grid.Row="7" Grid.Column="1" Margin="0,10,0,10"
+ <CheckBox Content="{x:Static Properties:Resources.FiltersView_Grayscale}" IsChecked="{Binding GrayscaleFilter.Grayscale}" Grid.Row="8" Grid.Column="1" Margin="0,10,0,10"
ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_Grayscale}" HorizontalAlignment="Left" />
</Grid>