summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2019-07-31 21:41:02 +0100
committersr55 <[email protected]>2019-07-31 21:41:02 +0100
commit7f3aa8a27b04b537d1679948e1cfa55249dadc83 (patch)
tree82e388c09b49a8ba7aa01471b80d71f59ce47abf
parent772c2308b91b8b912ef09805efcd3fc93e63ee52 (diff)
WinGui: UI / Consistency improvements on Audio and Subtitle Defaults
-rw-r--r--win/CS/HandBrakeWPF/Converters/Audio/AudioControlVisibilityConverter.cs16
-rw-r--r--win/CS/HandBrakeWPF/HandBrakeWPF.csproj9
-rw-r--r--win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs8
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.Designer.cs63
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.de.resx6
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.fr.resx6
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.resx29
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.zh.resx6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs22
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs6
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs7
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/Interfaces/IPopupWindowViewModel.cs22
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PopupWindowViewModel.cs115
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/SubtitlesDefaultsViewModel.cs4
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs7
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml359
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml.cs10
-rw-r--r--win/CS/HandBrakeWPF/Views/PopupWindowView.xaml67
-rw-r--r--win/CS/HandBrakeWPF/Views/PopupWindowView.xaml.cs27
-rw-r--r--win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml121
-rw-r--r--win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml.cs10
21 files changed, 318 insertions, 602 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioControlVisibilityConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioControlVisibilityConverter.cs
index c22a22319..808fc9a2c 100644
--- a/win/CS/HandBrakeWPF/Converters/Audio/AudioControlVisibilityConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioControlVisibilityConverter.cs
@@ -1,5 +1,5 @@
// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="AudioControlVisibilityConverter.cs" company="HandBrake Project (https://handbrake.fr)">
+// <copyright file="AudioControlVisibilityConverter.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>
@@ -20,26 +20,14 @@ namespace HandBrakeWPF.Converters.Audio
{
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
- if (values.Length == 3)
+ if (values.Length == 1)
{
bool isVisibile = (bool)values[0];
- bool isPassthru = (bool)values[1];
- AudioEncoder fallbackEncoder = AudioEncoder.ffaac;
-
- if (values[2] != null && values[2].GetType() == typeof(AudioEncoder))
- {
- fallbackEncoder = (AudioEncoder)values[2];
- }
if (!isVisibile)
{
return Visibility.Collapsed;
}
-
- if (fallbackEncoder == AudioEncoder.None && isPassthru)
- {
- return Visibility.Collapsed;
- }
}
return Visibility.Visible;
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
index e612bb8e4..ea039d55b 100644
--- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
+++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj
@@ -296,13 +296,11 @@
<DependentUpon>SourceSelection.xaml</DependentUpon>
</Compile>
<Compile Include="ViewModels\Interfaces\IMetaDataViewModel.cs" />
- <Compile Include="ViewModels\Interfaces\IPopupWindowViewModel.cs" />
<Compile Include="ViewModels\Interfaces\IStaticPreviewViewModel.cs" />
<Compile Include="ViewModels\Interfaces\IMiniViewModel.cs" />
<Compile Include="ViewModels\Interfaces\ISubtitlesDefaultsViewModel.cs" />
<Compile Include="ViewModels\MetaDataViewModel.cs" />
<Compile Include="ViewModels\MiniViewModel.cs" />
- <Compile Include="ViewModels\PopupWindowViewModel.cs" />
<Compile Include="ViewModels\StaticPreviewViewModel.cs" />
<Compile Include="ViewModels\SubtitlesDefaultsViewModel.cs" />
<Compile Include="ViewModels\SummaryViewModel.cs" />
@@ -315,9 +313,6 @@
<Compile Include="Views\MetaDataView.xaml.cs">
<DependentUpon>MetaDataView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\PopupWindowView.xaml.cs">
- <DependentUpon>PopupWindowView.xaml</DependentUpon>
- </Compile>
<Compile Include="Views\CountdownAlertView.xaml.cs">
<DependentUpon>CountdownAlertView.xaml</DependentUpon>
</Compile>
@@ -540,10 +535,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Views\PopupWindowView.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
<Page Include="Views\CountdownAlertView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
diff --git a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs
index 3a59f781e..5342d2454 100644
--- a/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs
+++ b/win/CS/HandBrakeWPF/Model/Audio/AudioBehaviourTrack.cs
@@ -452,14 +452,6 @@ namespace HandBrakeWPF.Model.Audio
}
}
- public bool IsAudioControlsVisibile
- {
- get
- {
- return true;
- }
- }
-
/// <summary>
/// Gets a value indicating whether IsLossless.
/// </summary>
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
index f5ea08cf7..14b910d65 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
@@ -230,7 +230,7 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to Automatically add Tracks.
+ /// Looks up a localized string similar to Audio encoder settings for each chosen track:.
/// </summary>
public static string AudioDefaultsView_AutoAddTracks {
get {
@@ -248,20 +248,20 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to Choose Behaviors:.
+ /// Looks up a localized string similar to Configure Automatic Audio Selections.
/// </summary>
- public static string AudioDefaultView_Behaviours {
+ public static string AudioDefaultsView_PaneTitle {
get {
- return ResourceManager.GetString("AudioDefaultView_Behaviours", resourceCulture);
+ return ResourceManager.GetString("AudioDefaultsView_PaneTitle", resourceCulture);
}
}
/// <summary>
- /// Looks up a localized string similar to When a passthru encoder is selected, the encoder options will be used for the fallback encoder..
+ /// Looks up a localized string similar to Source Track Selection.
/// </summary>
- public static string AudioDefaultViewModel_EncoderOptionsNotice {
+ public static string AudioDefaultView_Behaviours {
get {
- return ResourceManager.GetString("AudioDefaultViewModel_EncoderOptionsNotice", resourceCulture);
+ return ResourceManager.GetString("AudioDefaultView_Behaviours", resourceCulture);
}
}
@@ -3633,25 +3633,6 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to Change the behaviour of the audio track selection for this preset.
- ///This will not affect your current settings in the Audio tab..
- /// </summary>
- public static string Preset_AudioDefaults_SubText {
- get {
- return ResourceManager.GetString("Preset_AudioDefaults_SubText", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Audio Defaults.
- /// </summary>
- public static string Preset_AudioDefaults_Title {
- get {
- return ResourceManager.GetString("Preset_AudioDefaults_Title", resourceCulture);
- }
- }
-
- /// <summary>
/// Looks up a localized string similar to Custom.
/// </summary>
public static string Preset_Custom {
@@ -3709,25 +3690,6 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to Change the behaviour of the subtitle track selection for this preset.
- ///This will not affect your current settings in the Subtitle tab..
- /// </summary>
- public static string Preset_SubtitleDefaults_SubText {
- get {
- return ResourceManager.GetString("Preset_SubtitleDefaults_SubText", resourceCulture);
- }
- }
-
- /// <summary>
- /// Looks up a localized string similar to Subtitle Defaults.
- /// </summary>
- public static string Preset_SubtitleDefaults_Title {
- get {
- return ResourceManager.GetString("Preset_SubtitleDefaults_Title", resourceCulture);
- }
- }
-
- /// <summary>
/// Looks up a localized string similar to Unable to import preset!.
/// </summary>
public static string Preset_UnableToImport_Header {
@@ -4562,7 +4524,7 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to Chosen Languages:.
+ /// Looks up a localized string similar to Selected Languages:.
/// </summary>
public static string Shared_ChosenLangages {
get {
@@ -4904,6 +4866,15 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
+ /// Looks up a localized string similar to Configure Automatic Subtitle Selections.
+ /// </summary>
+ public static string SubtitlesDefaultsView_PaneTitle {
+ get {
+ return ResourceManager.GetString("SubtitlesDefaultsView_PaneTitle", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Add Closed Captions when available.
/// </summary>
public static string SubtitlesView_AddCC {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.de.resx b/win/CS/HandBrakeWPF/Properties/Resources.de.resx
index e0d6029c8..17e85a89c 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.de.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.de.resx
@@ -755,9 +755,6 @@ Soll sie überschrieben werden?</value>
<data name="AddPresetView_SavePictureSize" xml:space="preserve">
<value>Bildgröße:</value>
</data>
- <data name="AudioDefaultView_Behaviours" xml:space="preserve">
- <value>Verhalten wählen:</value>
- </data>
<data name="AudioView_AllowPassThruOf" xml:space="preserve">
<value>Passthru erlauben von:</value>
</data>
@@ -1753,9 +1750,6 @@ Dies beeinflusst nicht die momentanen Einstellungen im Untertitel-Tab. </value>
<data name="AudioDefaultsView_AddTrack" xml:space="preserve">
<value>Spur hinzufügen</value>
</data>
- <data name="AudioDefaultsView_AutoAddTracks" xml:space="preserve">
- <value>Spuren automatisch hinzufügen</value>
- </data>
<data name="AudioDefaultsView_Clear" xml:space="preserve">
<value>Löschen</value>
</data>
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.fr.resx b/win/CS/HandBrakeWPF/Properties/Resources.fr.resx
index d8aa30d8f..9cdc8ef1d 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.fr.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.fr.resx
@@ -769,9 +769,6 @@ Souhaitez-vous l'écraser ?</value>
<data name="AddPresetView_SavePictureSize" xml:space="preserve">
<value>Dimensions:</value>
</data>
- <data name="AudioDefaultView_Behaviours" xml:space="preserve">
- <value>Choisir des comportements:</value>
- </data>
<data name="AudioView_AllowPassThruOf" xml:space="preserve">
<value>Autoriser le passthru de:</value>
</data>
@@ -1767,9 +1764,6 @@ Cela n’affectera pas vos paramètres actuels dans l’onglet Sous-titres.</val
<data name="AudioDefaultsView_AddTrack" xml:space="preserve">
<value>Ajouter une piste</value>
</data>
- <data name="AudioDefaultsView_AutoAddTracks" xml:space="preserve">
- <value>Ajouter automatiquement des pistes</value>
- </data>
<data name="AudioDefaultsView_Clear" xml:space="preserve">
<value>Nettoyer</value>
</data>
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx
index 445a55de9..ef35df77c 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.resx
@@ -770,7 +770,7 @@ Would you like to overwrite it?</value>
<value>Dimensions:</value>
</data>
<data name="AudioDefaultView_Behaviours" xml:space="preserve">
- <value>Choose Behaviors:</value>
+ <value>Source Track Selection</value>
</data>
<data name="AudioView_AllowPassThruOf" xml:space="preserve">
<value>Allow passthru of:</value>
@@ -1381,13 +1381,6 @@ Would you like to overwrite it?</value>
<data name="PictureSettingsView_Width" xml:space="preserve">
<value>Width:</value>
</data>
- <data name="Preset_AudioDefaults_SubText" xml:space="preserve">
- <value>Change the behaviour of the audio track selection for this preset.
-This will not affect your current settings in the Audio tab.</value>
- </data>
- <data name="Preset_AudioDefaults_Title" xml:space="preserve">
- <value>Audio Defaults</value>
- </data>
<data name="Preset_Custom" xml:space="preserve">
<value>Custom</value>
</data>
@@ -1400,13 +1393,6 @@ This will not affect your current settings in the Audio tab.</value>
<data name="Preset_Official" xml:space="preserve">
<value>Official</value>
</data>
- <data name="Preset_SubtitleDefaults_SubText" xml:space="preserve">
- <value>Change the behaviour of the subtitle track selection for this preset.
-This will not affect your current settings in the Subtitle tab.</value>
- </data>
- <data name="Preset_SubtitleDefaults_Title" xml:space="preserve">
- <value>Subtitle Defaults</value>
- </data>
<data name="QueueSelectionView_ChooseTitles" xml:space="preserve">
<value>Choose titles:</value>
</data>
@@ -1555,7 +1541,7 @@ This will not affect your current settings in the Subtitle tab.</value>
<value>Choose Languages:</value>
</data>
<data name="Shared_ChosenLangages" xml:space="preserve">
- <value>Chosen Languages:</value>
+ <value>Selected Languages:</value>
</data>
<data name="Shared_ConfigureDefaultBehaviours" xml:space="preserve">
<value>Configure Default Behaviours</value>
@@ -1762,7 +1748,7 @@ This will not affect your current settings in the Subtitle tab.</value>
<value>Add Track</value>
</data>
<data name="AudioDefaultsView_AutoAddTracks" xml:space="preserve">
- <value>Automatically add Tracks</value>
+ <value>Audio encoder settings for each chosen track:</value>
</data>
<data name="AudioDefaultsView_Clear" xml:space="preserve">
<value>Clear</value>
@@ -1993,9 +1979,6 @@ Where supported, any user presets will have been imported.</value>
<data name="Options_PromptBeforeAction" xml:space="preserve">
<value>Perform action immediately. (This will disable the 60 second confirmation dialog)</value>
</data>
- <data name="AudioDefaultViewModel_EncoderOptionsNotice" xml:space="preserve">
- <value>When a passthru encoder is selected, the encoder options will be used for the fallback encoder.</value>
- </data>
<data name="Browse" xml:space="preserve">
<value>Browse</value>
</data>
@@ -2029,4 +2012,10 @@ Where supported, any user presets will have been imported.</value>
<data name="SystemService_LowDiskSpaceLog" xml:space="preserve">
<value>Remaining drive storage has dropped below {0} GB on the destination drive. Pausing encode...</value>
</data>
+ <data name="AudioDefaultsView_PaneTitle" xml:space="preserve">
+ <value>Configure Automatic Audio Selections</value>
+ </data>
+ <data name="SubtitlesDefaultsView_PaneTitle" xml:space="preserve">
+ <value>Configure Automatic Subtitle Selections</value>
+ </data>
</root> \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.zh.resx b/win/CS/HandBrakeWPF/Properties/Resources.zh.resx
index a9fbe4434..84acae795 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.zh.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.zh.resx
@@ -759,9 +759,6 @@ FPS: {3:000.0}, 平均FPS: {4:000.0}
<data name="AddPresetView_SavePictureSize" xml:space="preserve">
<value>尺寸:</value>
</data>
- <data name="AudioDefaultView_Behaviours" xml:space="preserve">
- <value>选择行为:</value>
- </data>
<data name="AudioView_AllowPassThruOf" xml:space="preserve">
<value>允许 Passthru:</value>
</data>
@@ -1757,9 +1754,6 @@ FPS: {3:000.0}, 平均FPS: {4:000.0}
<data name="AudioDefaultsView_AddTrack" xml:space="preserve">
<value>添加轨道</value>
</data>
- <data name="AudioDefaultsView_AutoAddTracks" xml:space="preserve">
- <value>自动添加轨道</value>
- </data>
<data name="AudioDefaultsView_Clear" xml:space="preserve">
<value>明白</value>
</data>
diff --git a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
index 441c1814e..b901e805e 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AddPresetViewModel.cs
@@ -27,6 +27,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrakeWPF.Services.Scan.Model;
using HandBrakeWPF.Utilities;
using HandBrakeWPF.ViewModels.Interfaces;
+ using HandBrakeWPF.Views;
using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
using PresetPictureSettingsMode = HandBrakeWPF.Model.Picture.PresetPictureSettingsMode;
@@ -306,15 +307,13 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void EditAudioDefaults()
{
- IPopupWindowViewModel popup = new PopupWindowViewModel(this.audioDefaultsViewModel, Resources.Preset_AudioDefaults_Title, Resources.Preset_AudioDefaults_SubText, null);
- if (this.windowManager.ShowDialog(popup) == true)
+ AudioDefaultsView view = new AudioDefaultsView();
+ view.DataContext = this.audioDefaultsViewModel;
+
+ if (view.ShowDialog() == true)
{
this.Preset.AudioTrackBehaviours = this.audioDefaultsViewModel.AudioBehaviours.Clone();
}
- else
- {
- // Handle other case(s)
- }
}
/// <summary>
@@ -322,16 +321,13 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void EditSubtitleDefaults()
{
- IPopupWindowViewModel popup = new PopupWindowViewModel(this.subtitlesDefaultsViewModel, Resources.Preset_SubtitleDefaults_Title, Resources.Preset_SubtitleDefaults_SubText, null);
-
- if (this.windowManager.ShowDialog(popup) == true)
+ SubtitlesDefaultsView view = new SubtitlesDefaultsView();
+ view.DataContext = this.subtitlesDefaultsViewModel;
+
+ if (view.ShowDialog() == true)
{
this.Preset.SubtitleTrackBehaviours = this.subtitlesDefaultsViewModel.SubtitleBehaviours.Clone();
}
- else
- {
- // Handle other case(s)
- }
}
/// <summary>
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
index 1b5a20df3..8da815bd1 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioDefaultsViewModel.cs
@@ -14,12 +14,14 @@ namespace HandBrakeWPF.ViewModels
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
+ using System.Windows.Navigation;
using HandBrake.Interop.Interop;
using HandBrake.Interop.Interop.Model.Encoding;
using HandBrake.Interop.Utilities;
using HandBrakeWPF.Model.Audio;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Encode.Model;
using HandBrakeWPF.Services.Encode.Model.Models;
using HandBrakeWPF.Services.Presets.Model;
@@ -63,6 +65,8 @@ namespace HandBrakeWPF.ViewModels
}
this.Setup((Preset)null, task);
+
+ this.Title = Resources.AudioViewModel_AudioDefaults;
}
#endregion
@@ -513,7 +517,7 @@ namespace HandBrakeWPF.ViewModels
{
Process.Start("https://handbrake.fr/docs/en/1.2.0/advanced/audio-subtitle-defaults.html");
}
-
+
#endregion
}
} \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
index 610ad478e..d33cf5ea3 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AudioViewModel.cs
@@ -29,6 +29,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrakeWPF.Services.Scan.Model;
using HandBrakeWPF.Utilities;
using HandBrakeWPF.ViewModels.Interfaces;
+ using HandBrakeWPF.Views;
using AudioEncoder = HandBrakeWPF.Services.Encode.Model.Models.AudioEncoder;
using AudioTrack = HandBrakeWPF.Services.Encode.Model.Models.AudioTrack;
@@ -225,8 +226,10 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void ShowAudioDefaults()
{
- IPopupWindowViewModel popup = new PopupWindowViewModel(this.AudioDefaultsViewModel, Resources.Preset_AudioDefaults_Title, Resources.AudioView_AudioDefaultsDescription, Resources.Generic_Apply);
- if (this.windowManager.ShowDialog(popup) == true)
+ AudioDefaultsView view = new AudioDefaultsView();
+ view.DataContext = this.AudioDefaultsViewModel;
+
+ if (view.ShowDialog() == true)
{
this.OnTabStatusChanged(null);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IPopupWindowViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IPopupWindowViewModel.cs
deleted file mode 100644
index f4b432e4f..000000000
--- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IPopupWindowViewModel.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="IPopupWindowViewModel.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>
-// The PopupWindowViewModel interface.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrakeWPF.ViewModels.Interfaces
-{
- /// <summary>
- /// The PopupWindowViewModel interface.
- /// </summary>
- public interface IPopupWindowViewModel
- {
- /// <summary>
- /// Gets the content view model.
- /// </summary>
- IViewModelBase ContentViewModel { get; }
- }
-} \ No newline at end of file
diff --git a/win/CS/HandBrakeWPF/ViewModels/PopupWindowViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PopupWindowViewModel.cs
deleted file mode 100644
index 18770955f..000000000
--- a/win/CS/HandBrakeWPF/ViewModels/PopupWindowViewModel.cs
+++ /dev/null
@@ -1,115 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="PopupWindowViewModel.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 PopupWindowViewModel type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrakeWPF.ViewModels
-{
- using HandBrakeWPF.Properties;
- using HandBrakeWPF.ViewModels.Interfaces;
-
- /// <summary>
- /// The popup window view model.
- /// </summary>
- public class PopupWindowViewModel : ViewModelBase, IPopupWindowViewModel
- {
- private string windowTitle;
- private string subText;
-
- private string saveButtonText;
-
- public PopupWindowViewModel(IViewModelBase contentViewModel, string title, string subText, string saveBtnText)
- {
- this.ContentViewModel = contentViewModel;
- this.WindowTitle = title;
- this.Title = title;
- this.SubText = subText;
- this.saveButtonText = saveBtnText;
- }
-
- /// <summary>
- /// Gets or sets the content view model.
- /// </summary>
- public IViewModelBase ContentViewModel { get; set; }
-
- /// <summary>
- /// Gets or sets the title.
- /// </summary>
- public string WindowTitle
- {
- get
- {
- return this.windowTitle;
- }
- set
- {
- if (value == this.windowTitle)
- {
- return;
- }
- this.windowTitle = value;
- this.NotifyOfPropertyChange(() => this.Title);
- }
- }
-
- /// <summary>
- /// Gets or sets the sub text.
- /// </summary>
- public string SubText
- {
- get
- {
- return this.subText;
- }
- set
- {
- if (value == this.subText)
- {
- return;
- }
- this.subText = value;
-
- this.SubTextVisible = !string.IsNullOrEmpty(value);
-
- this.NotifyOfPropertyChange(() => this.SubText);
- this.NotifyOfPropertyChange(() => this.SubTextVisible);
- }
- }
-
- public string SaveButtonText
- {
- get => this.saveButtonText ?? Resources.Generic_Save;
- set
- {
- if (value == this.saveButtonText) return;
- this.saveButtonText = value;
- this.NotifyOfPropertyChange(() => this.SaveButtonText);
- }
- }
-
- /// <summary>
- /// Gets or sets a value indicating whether sub text visible.
- /// </summary>
- public bool SubTextVisible { get; set; }
-
- /// <summary>
- /// The save.
- /// </summary>
- public void Save()
- {
- this.TryClose(true);
- }
-
- /// <summary>
- /// The cancel.
- /// </summary>
- public void Cancel()
- {
- this.TryClose(false);
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesDefaultsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesDefaultsViewModel.cs
index f01f2bb20..f94661bcc 100644
--- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesDefaultsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesDefaultsViewModel.cs
@@ -17,6 +17,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrake.Interop.Utilities;
using HandBrakeWPF.Model.Subtitles;
+ using HandBrakeWPF.Properties;
using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Utilities;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -47,6 +48,8 @@ namespace HandBrakeWPF.ViewModels
this.SelectedLangaugesToMove = new BindingList<string>();
this.availableLanguages = new BindingList<string>();
this.SetupLanguages((Preset)null);
+
+ this.Title = Resources.SubtitlesViewModel_SubDefaults;
}
#endregion
@@ -78,6 +81,7 @@ namespace HandBrakeWPF.ViewModels
{
return;
}
+
this.subtitleBehaviours = value;
this.NotifyOfPropertyChange(() => this.SubtitleBehaviours);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
index 6ddc1cf89..21bd11013 100644
--- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs
@@ -27,6 +27,7 @@ namespace HandBrakeWPF.ViewModels
using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Services.Scan.Model;
using HandBrakeWPF.ViewModels.Interfaces;
+ using HandBrakeWPF.Views;
using Microsoft.Win32;
@@ -453,8 +454,10 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void ShowSubtitleDefaultsPanel()
{
- IPopupWindowViewModel popup = new PopupWindowViewModel(this.SubtitleDefaultsViewModel, Resources.Preset_SubtitleDefaults_Title, Resources.SubtitleView_SubtitleDefaultsDescription, Resources.Generic_Apply);
- if (this.windowManager.ShowDialog(popup) == true)
+ SubtitlesDefaultsView view = new SubtitlesDefaultsView();
+ view.DataContext = this.SubtitleDefaultsViewModel;
+
+ if (view.ShowDialog() == true)
{
this.OnTabStatusChanged(null);
}
diff --git a/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
index 16a2c6b1b..17343f85b 100644
--- a/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="HandBrakeWPF.Views.AudioDefaultsView"
+<Window x:Class="HandBrakeWPF.Views.AudioDefaultsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Audio="clr-namespace:HandBrakeWPF.Converters.Audio"
@@ -11,12 +11,17 @@
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
- d:DesignHeight="450"
+ d:DesignHeight="500"
d:DesignWidth="800"
+ ResizeMode="NoResize"
+ SizeToContent="WidthAndHeight"
+ WindowStartupLocation="CenterScreen"
+ TextOptions.TextFormattingMode="Display"
mc:Ignorable="d"
+ Title="{Binding Title}"
x:Name="audioDefaultsTab">
- <UserControl.Resources>
+ <Window.Resources>
<Conveters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
<Audio:AudioEncoderConverter x:Key="audioEncoderConverter" />
<Audio:AudioBehaviourConverter x:Key="audioBehaviourConverter" />
@@ -24,10 +29,10 @@
<Conveters:BooleanToHiddenVisibilityConverter x:Key="boolToHiddenVisConverter" />
<Audio:AudioRateTypeConverter x:Key="audioRateTypeConverter" />
<Audio:AudioControlVisibilityConverter x:Key="audioControlVisibilityConverter" />
- </UserControl.Resources>
+ </Window.Resources>
- <Grid VerticalAlignment="Top" Margin="10,0,0,0">
+ <Grid VerticalAlignment="Top" Margin="10,10,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
@@ -45,8 +50,12 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
+ <StackPanel Grid.Row="0" Margin="0,0,0,0">
+ <TextBlock Text="{x:Static Properties:Resources.AudioDefaultsView_PaneTitle}" FontSize="20" FontFamily="Segoe UI Light" />
+ </StackPanel>
+
<!-- Behaviour Dropowns -->
- <Grid Margin="0,0,0,0" Grid.Row="0" Grid.Column="0" >
+ <Grid Margin="0,0,0,0" Grid.Row="1" Grid.Column="0" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
@@ -68,16 +77,11 @@
<ComboBox Name="autoAudioMode" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left"
ItemsSource="{Binding AudioBehaviourModeList, Converter={StaticResource audioBehaviourConverter}}"
SelectedItem="{Binding AudioBehaviours.SelectedBehaviour, Converter={StaticResource audioBehaviourConverter}}" Width="210" Margin="0,0,5,0" />
-
- <TextBlock Text="{x:Static Properties:Resources.AudioView_TrackSettingDefaultBehaviour}" Grid.Column="0" Grid.Row="2" Margin="0,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
- <ComboBox Name="audioTrackBeahaviorMode" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left"
- ItemsSource="{Binding AudioTrackDefaultBehaviourModeList, Converter={StaticResource audioTrackDefaultBehaviourConverter}}"
- SelectedItem="{Binding AudioBehaviours.SelectedTrackDefaultBehaviour, Converter={StaticResource audioTrackDefaultBehaviourConverter}}" Width="210" Margin="0,5,5,0" />
</Grid>
<!-- Language Selection -->
- <TextBlock Text="{x:Static Properties:Resources.Shared_ChooseLanguages}" Margin="0,10,0,0" Grid.Row="1" Grid.Column="0" />
- <Grid Margin="20,5,0,0" Grid.Row="2" Grid.Column="0" >
+ <TextBlock Text="{x:Static Properties:Resources.Shared_ChooseLanguages}" Margin="0,10,0,0" Grid.Row="2" Grid.Column="0" />
+ <Grid Margin="20,5,0,0" Grid.Row="3" Grid.Column="0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
@@ -120,7 +124,7 @@
<!-- Auto Passthru -->
- <StackPanel Orientation="Vertical" Margin="15,0,15,5" Grid.Row="0" Grid.Column="1" Grid.RowSpan="3" HorizontalAlignment="Left">
+ <StackPanel Orientation="Vertical" Margin="15,0,15,5" Grid.Row="1" Grid.Column="1" Grid.RowSpan="3" HorizontalAlignment="Left">
<TextBlock Text="{x:Static Properties:Resources.AudioView_AutoPassthruBehaviour}" FontWeight="Bold" Margin="0,10,0,5" />
<StackPanel Margin="5,10,0,0"
Orientation="Vertical">
@@ -160,8 +164,8 @@
</ComboBox.SelectedItem>
<ComboBox.ItemsSource>
<MultiBinding Converter="{StaticResource audioEncoderConverter}" ConverterParameter="True">
- <Binding Path="DataContext.AudioEncoders" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- <Binding Path="DataContext.Task" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
+ <Binding Path="DataContext.AudioEncoders" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}" />
+ <Binding Path="DataContext.Task" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}" />
</MultiBinding>
</ComboBox.ItemsSource>
</ComboBox>
@@ -169,13 +173,8 @@
</StackPanel>
</StackPanel>
-
<!-- Tracks -->
- <TextBlock Text="{x:Static Properties:Resources.AudioDefaultsView_AutoAddTracks}" FontWeight="Bold" Margin="0,10,0,5" Grid.Row="3" Grid.Column="0" />
- <StackPanel Orientation="Horizontal" Grid.Row="4" Grid.Column="0">
- <Button Content="{x:Static Properties:Resources.AudioDefaultsView_AddTrack}" cal:Message.Attach="[Event Click] = [Action AddTrack]" Margin="10,0,10,0" Padding="8,2"/>
- <Button Content="{x:Static Properties:Resources.AudioDefaultsView_Clear}" cal:Message.Attach="[Event Click] = [Action ClearTracks]" Padding="8,2"/>
- </StackPanel>
+ <TextBlock Text="{x:Static Properties:Resources.AudioDefaultsView_AutoAddTracks}" FontWeight="Bold" Margin="0,20,0,0" Grid.Row="4" Grid.Column="0" />
<Grid Grid.Row="5" Margin="25,10,0,0" Grid.ColumnSpan="3">
<Grid.ColumnDefinitions>
@@ -193,191 +192,183 @@
<TextBlock Grid.Column="4" Margin="4,0,0,0" VerticalAlignment="Center" FontWeight="Bold" Text="{x:Static Properties:Resources.AudioView_Gain}" />
</Grid>
- <ListBox VerticalAlignment="Stretch" MinHeight="50"
- Margin="10,0,10,5" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="3"
+ <Grid VerticalAlignment="Top" Margin="10,0,0,0" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="3">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <ListBox VerticalAlignment="Stretch" MinHeight="50"
+ Margin="0,0,10,5" Grid.Row="0" Height="171"
dd:DragDrop.DropHandler="{Binding}"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
ItemsSource="{Binding BehaviourTracks}"
SelectionMode="Extended">
- <ListBox.ItemContainerStyle>
- <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="Margin" Value="0,0,0,1" />
- </Style>
- </ListBox.ItemContainerStyle>
-
- <ListBox.ContextMenu>
- <ContextMenu>
- <MenuItem Header="{x:Static Properties:Resources.Generic_Clear}" cal:Message.Attach="[Event Click] = [Action ClearTracks]" />
- </ContextMenu>
- </ListBox.ContextMenu>
-
- <ListBox.ItemTemplate>
- <DataTemplate>
-
- <Grid HorizontalAlignment="Stretch" Grid.IsSharedSizeScope="False">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
-
- <!-- Settings -->
- <Grid Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="0,5,0,5">
+ <ListBox.ItemContainerStyle>
+ <Style TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}">
+ <Setter Property="HorizontalContentAlignment" Value="Stretch" />
+ <Setter Property="Margin" Value="0,0,0,1" />
+ </Style>
+ </ListBox.ItemContainerStyle>
+
+ <ListBox.ContextMenu>
+ <ContextMenu>
+ <MenuItem Header="{x:Static Properties:Resources.Generic_Clear}" cal:Message.Attach="[Event Click] = [Action ClearTracks]" />
+ </ContextMenu>
+ </ListBox.ContextMenu>
+
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+
+ <Grid HorizontalAlignment="Stretch" Grid.IsSharedSizeScope="False">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="28" />
- </Grid.RowDefinitions>
-
- <!-- Row 1 -->
- <ComboBox Grid.Column="3" Width="100" Height="22" Margin="5,0,5,0">
- <ComboBox.SelectedItem>
- <MultiBinding Converter="{StaticResource audioEncoderConverter}">
- <Binding Path="Encoder" />
- </MultiBinding>
- </ComboBox.SelectedItem>
- <ComboBox.ItemsSource>
- <MultiBinding Converter="{StaticResource audioEncoderConverter}">
- <Binding Path="DataContext.AudioEncoders" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- <Binding Path="DataContext.Task" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- </MultiBinding>
- </ComboBox.ItemsSource>
- </ComboBox>
-
- <ComboBox Grid.Column="4" Height="22" Width="65" HorizontalAlignment="Stretch"
+ <!-- Settings -->
+ <Grid Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="0,1,0,1">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="26" />
+ </Grid.RowDefinitions>
+
+ <!-- Row 1 -->
+ <ComboBox Grid.Column="3" Width="100" Height="22" Margin="5,0,5,0">
+ <ComboBox.SelectedItem>
+ <MultiBinding Converter="{StaticResource audioEncoderConverter}">
+ <Binding Path="Encoder" />
+ </MultiBinding>
+ </ComboBox.SelectedItem>
+ <ComboBox.ItemsSource>
+ <MultiBinding Converter="{StaticResource audioEncoderConverter}">
+ <Binding Path="DataContext.AudioEncoders" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}" />
+ <Binding Path="DataContext.Task" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type Window}}" />
+ </MultiBinding>
+ </ComboBox.ItemsSource>
+ </ComboBox>
+
+ <ComboBox Grid.Column="4" Height="22" Width="65" HorizontalAlignment="Stretch"
ItemsSource="{Binding AudioEncoderRateTypes, Converter={StaticResource audioRateTypeConverter}}"
SelectedItem="{Binding EncoderRateType, Converter={StaticResource audioRateTypeConverter}}">
- <ComboBox.Visibility>
- <MultiBinding Converter="{StaticResource audioControlVisibilityConverter}">
- <Binding Path="IsRateTypeVisible" />
- <Binding Path="IsPassthru" />
- <Binding Path="DataContext.AudioEncoderFallback" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- </MultiBinding>
- </ComboBox.Visibility>
- </ComboBox>
-
- <ComboBox Grid.Column="5" Width="55" Height="22" Margin="5,0,5,0" ItemsSource="{Binding EncoderQualityValues}"
+ <ComboBox.Visibility>
+ <MultiBinding Converter="{StaticResource audioControlVisibilityConverter}">
+ <Binding Path="IsRateTypeVisible" />
+ </MultiBinding>
+ </ComboBox.Visibility>
+ </ComboBox>
+
+ <ComboBox Grid.Column="5" Width="55" Height="22" Margin="5,0,5,0" ItemsSource="{Binding EncoderQualityValues}"
SelectedItem="{Binding Quality}" >
- <ComboBox.Visibility>
- <MultiBinding Converter="{StaticResource audioControlVisibilityConverter}">
- <Binding Path="IsQualityVisible" />
- <Binding Path="IsPassthru" />
- <Binding Path="DataContext.AudioEncoderFallback" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- </MultiBinding>
- </ComboBox.Visibility>
- </ComboBox>
-
- <ComboBox Grid.Column="5" Width="55" Height="22" Margin="5,0,5,0" ItemsSource="{Binding Bitrates}"
+ <ComboBox.Visibility>
+ <MultiBinding Converter="{StaticResource audioControlVisibilityConverter}">
+ <Binding Path="IsQualityVisible" />
+ </MultiBinding>
+ </ComboBox.Visibility>
+ </ComboBox>
+
+ <ComboBox Grid.Column="5" Width="55" Height="22" Margin="5,0,5,0" ItemsSource="{Binding Bitrates}"
SelectedItem="{Binding Bitrate}" >
- <ComboBox.Visibility>
- <MultiBinding Converter="{StaticResource audioControlVisibilityConverter}">
- <Binding Path="IsBitrateVisible" />
- <Binding Path="IsPassthru" />
- <Binding Path="DataContext.AudioEncoderFallback" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- </MultiBinding>
- </ComboBox.Visibility>
- </ComboBox>
-
- <ComboBox Grid.Row="0" Grid.Column="7" Height="22" Width="120" Margin="5,0,5,0" HorizontalAlignment="Stretch"
+ <ComboBox.Visibility>
+ <MultiBinding Converter="{StaticResource audioControlVisibilityConverter}">
+ <Binding Path="IsBitrateVisible" />
+ </MultiBinding>
+ </ComboBox.Visibility>
+ </ComboBox>
+
+ <ComboBox Grid.Row="0" Grid.Column="7" Height="22" Width="120" Margin="5,0,5,0" HorizontalAlignment="Stretch"
ItemsSource="{Binding Mixdowns}" SelectedItem="{Binding MixDown}"
- DisplayMemberPath="DisplayName" >
- <ComboBox.Visibility>
- <MultiBinding Converter="{StaticResource audioControlVisibilityConverter}">
- <Binding Path="IsAudioControlsVisibile" />
- <Binding Path="IsPassthru" />
- <Binding Path="DataContext.AudioEncoderFallback" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- </MultiBinding>
- </ComboBox.Visibility>
- </ComboBox>
-
-
- <ComboBox Width="70" Height="22" Margin="5,0,5,0" Grid.Column="9"
- ItemsSource="{Binding DataContext.SampleRates, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
- SelectedItem="{Binding SampleRateDisplayValue}" >
- <ComboBox.Visibility>
- <MultiBinding Converter="{StaticResource audioControlVisibilityConverter}">
- <Binding Path="IsAudioControlsVisibile" />
- <Binding Path="IsPassthru" />
- <Binding Path="DataContext.AudioEncoderFallback" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- </MultiBinding>
- </ComboBox.Visibility>
- </ComboBox>
-
- <controls:NumberBox Name="drcNumericCtl" Width="45" Margin="5,0,5,0" HorizontalAlignment="Left" Grid.Column="11"
+ DisplayMemberPath="DisplayName" />
+
+
+ <ComboBox Width="70" Height="22" Margin="5,0,5,0" Grid.Column="9"
+ ItemsSource="{Binding DataContext.SampleRates, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"
+ SelectedItem="{Binding SampleRateDisplayValue}" />
+
+ <controls:NumberBox Name="drcNumericCtl" Width="45" Margin="5,0,5,0" HorizontalAlignment="Left" Grid.Column="11" VerticalAlignment="Center" Height="22"
Minimum="0" Modulus="0.1" Maximum="4" Number="{Binding DRC, Mode=TwoWay}" UpdateBindingOnTextChange="True"
- ShowIncrementButtons="True" AllowEmpty="False" >
- <controls:NumberBox.Visibility>
- <MultiBinding Converter="{StaticResource audioControlVisibilityConverter}">
- <Binding Path="IsAudioControlsVisibile" />
- <Binding Path="IsPassthru" />
- <Binding Path="DataContext.AudioEncoderFallback" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- </MultiBinding>
- </controls:NumberBox.Visibility>
- </controls:NumberBox>
-
- <controls:NumberBox Name="gainNumericCtl" Width="45" Margin="5,0,5,0" HorizontalAlignment="Left" Grid.Column="13"
+ ShowIncrementButtons="True" AllowEmpty="False" />
+
+ <controls:NumberBox Name="gainNumericCtl" Width="45" Margin="5,0,5,0" HorizontalAlignment="Left" Grid.Column="13" VerticalAlignment="Center" Height="22"
Minimum="-20" Modulus="1" Maximum="20" Number="{Binding Gain, Mode=TwoWay}" UpdateBindingOnTextChange="True"
- ShowIncrementButtons="True" AllowEmpty="False" >
- <controls:NumberBox.Visibility>
- <MultiBinding Converter="{StaticResource audioControlVisibilityConverter}">
- <Binding Path="IsAudioControlsVisibile" />
- <Binding Path="IsPassthru" />
- <Binding Path="DataContext.AudioEncoderFallback" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type UserControl}}" />
- </MultiBinding>
- </controls:NumberBox.Visibility>
- </controls:NumberBox>
+ ShowIncrementButtons="True" AllowEmpty="False" />
+ </Grid>
+
+ <!-- Delete -->
+ <StackPanel Grid.Column="2" Grid.Row="0" VerticalAlignment="Center">
+ <Image Width="16" Height="16" Margin="10,0,10,0" Source="Images/close64.png">
+ <i:Interaction.Triggers>
+ <i:EventTrigger EventName="MouseDown">
+ <cal:ActionMessage MethodName="RemoveTrack">
+ <cal:Parameter Value="{Binding}" />
+ </cal:ActionMessage>
+ </i:EventTrigger>
+ </i:Interaction.Triggers>
+ </Image>
+ </StackPanel>
+
</Grid>
- <!-- Delete -->
- <StackPanel Grid.Column="2" Grid.Row="0" VerticalAlignment="Center">
- <Image Width="16" Height="16" Margin="10,0,10,0" Source="Images/close64.png">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="MouseDown">
- <cal:ActionMessage MethodName="RemoveTrack">
- <cal:Parameter Value="{Binding}" />
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Image>
- </StackPanel>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
- </Grid>
+ <StackPanel Orientation="Horizontal" Grid.Row="1">
+ <Button Content="{x:Static Properties:Resources.AudioDefaultsView_AddTrack}" cal:Message.Attach="[Event Click] = [Action AddTrack]" Margin="0,0,10,0" Padding="8,2"/>
+ <Button Content="{x:Static Properties:Resources.AudioDefaultsView_Clear}" cal:Message.Attach="[Event Click] = [Action ClearTracks]" Padding="8,2"/>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
+ <TextBlock Text="{x:Static Properties:Resources.AudioView_TrackSettingDefaultBehaviour}" Grid.Column="0" Grid.Row="1" Margin="15,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
+ <ComboBox Name="audioTrackBeahaviorMode" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left"
+ ItemsSource="{Binding AudioTrackDefaultBehaviourModeList, Converter={StaticResource audioTrackDefaultBehaviourConverter}}"
+ SelectedItem="{Binding AudioBehaviours.SelectedTrackDefaultBehaviour, Converter={StaticResource audioTrackDefaultBehaviourConverter}}" Width="210" Margin="0,0,5,0" />
+ </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="10,0,0,0" Grid.Row="7" Grid.ColumnSpan="3">
- <Button cal:Message.Attach="[Event Click] = [Action LaunchHelp]" Background="Transparent" BorderThickness="0">
- <Button.Content>
- <Image Source="/Views/Images/question.png" Width="16" />
- </Button.Content>
- </Button>
- <TextBlock Text="{x:Static Properties:Resources.AudioDefaultViewModel_EncoderOptionsNotice}" Margin="10,0,0,0"/>
- </StackPanel>
+ </Grid>
+
+ <Border BorderBrush="DarkGray" BorderThickness="0,1,0,0" SnapsToDevicePixels="True" Grid.Row="7" Grid.ColumnSpan="3" Margin="10,15,0,0" >
+ <Grid Margin="0,10,0,0" Grid.Row="2" Grid.ColumnSpan="3">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <Button cal:Message.Attach="[Event Click] = [Action LaunchHelp]" Background="Transparent" BorderThickness="0" Grid.Column="0" HorizontalAlignment="Left" Padding="0,2">
+ <Button.Content>
+ <Image Source="/Views/Images/question.png" Width="16" />
+ </Button.Content>
+ </Button>
+
+ <Button Grid.Column="1"
+ Click="Apply_OnClick"
+ Content="{x:Static Properties:Resources.Generic_Apply}"
+ IsDefault="True"
+ Padding="8,2" />
+ </Grid>
+ </Border>
</Grid>
-</UserControl>
+</Window>
diff --git a/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml.cs b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml.cs
index 7734f706c..f787ba780 100644
--- a/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/AudioDefaultsView.xaml.cs
@@ -9,19 +9,25 @@
namespace HandBrakeWPF.Views
{
+ using System.Windows;
using System.Windows.Controls;
/// <summary>
/// Interaction logic for AudioDefaultsView.xaml
/// </summary>
- public partial class AudioDefaultsView : UserControl
+ public partial class AudioDefaultsView : Window
{
/// <summary>
/// Initializes a new instance of the <see cref="AudioDefaultsView"/> class.
/// </summary>
public AudioDefaultsView()
{
- InitializeComponent();
+ this.InitializeComponent();
+ }
+
+ private void Apply_OnClick(object sender, RoutedEventArgs e)
+ {
+ this.Close();
}
}
}
diff --git a/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml b/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml
deleted file mode 100644
index 9116586fb..000000000
--- a/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml
+++ /dev/null
@@ -1,67 +0,0 @@
-<Window x:Class="HandBrakeWPF.Views.PopupWindowView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:cal="http://www.caliburnproject.org"
- xmlns:properties="clr-namespace:HandBrakeWPF.Properties"
- xmlns:converters="clr-namespace:HandBrakeWPF.Converters"
- d:DesignHeight="250"
- d:DesignWidth="650"
- MaxHeight="650"
- Title="{Binding Title}"
- ResizeMode="NoResize"
- SizeToContent="WidthAndHeight"
- WindowStartupLocation="CenterScreen"
- TextOptions.TextFormattingMode="Display"
- mc:Ignorable="d">
-
- <Window.Resources>
- <converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
- </Window.Resources>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <TextBlock Text="{Binding WindowTitle}" FontSize="26" FontFamily="Segoe UI Light" Margin="10,10,10,5" Grid.Row="0" />
- <TextBlock Text="{Binding SubText}" Margin="10,0,10,15" Grid.Row="1" Visibility="{Binding SubTextVisible, Converter={StaticResource boolToVisConverter}}"
- TextWrapping="Wrap"/>
-
- <Border BorderBrush="DarkGray" BorderThickness="0,1,0,0" Grid.Row="2" Margin="0,0,0,0">
- <ScrollViewer VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0,10,0,0" VerticalScrollBarVisibility="Auto" >
- <ContentControl x:Name="ContentViewModel"/>
- </ScrollViewer>
- </Border>
-
- <Border BorderBrush="DarkGray" Grid.Row="3" BorderThickness="0,1,0,0" Margin="0,20,0,0">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
-
- <Button Grid.Column="1"
- Margin="0,5,10,10"
- cal:Message.Attach="[Event Click] = [Action Cancel]"
- Content="{x:Static properties:Resources.Generic_Cancel}"
- IsCancel="True"
- Visibility="Collapsed"
- Padding="8,2" />
- <Button Grid.Column="2"
- Margin="0,5,10,10"
- cal:Message.Attach="[Event Click] = [Action Save]"
- Content="{Binding SaveButtonText}"
- IsDefault="True"
- Padding="8,2" />
- </Grid>
- </Border>
-
- </Grid>
-
-</Window>
diff --git a/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml.cs b/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml.cs
deleted file mode 100644
index 6b806e36c..000000000
--- a/win/CS/HandBrakeWPF/Views/PopupWindowView.xaml.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="PopupWindowView.xaml.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>
-// Interaction logic for PopupWindowView.xaml
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrakeWPF.Views
-{
- using System.Windows;
-
- /// <summary>
- /// Interaction logic for PopupWindowView.xaml
- /// </summary>
- public partial class PopupWindowView : Window
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="PopupWindowView"/> class.
- /// </summary>
- public PopupWindowView()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml
index d92461296..b06e55116 100644
--- a/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="HandBrakeWPF.Views.SubtitlesDefaultsView"
+<Window x:Class="HandBrakeWPF.Views.SubtitlesDefaultsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cal="http://www.caliburnproject.org"
@@ -11,9 +11,14 @@
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
d:DesignHeight="350"
d:DesignWidth="500"
+ ResizeMode="NoResize"
+ SizeToContent="WidthAndHeight"
+ WindowStartupLocation="CenterScreen"
+ TextOptions.TextFormattingMode="Display"
mc:Ignorable="d"
+ Title="{Binding Title}"
x:Name="subTab">
- <UserControl.Resources>
+ <Window.Resources>
<Converters:BooleanToVisibilityConverter x:Key="booleanToVisConverter" />
<subtitles:SubtitleBehaviourConverter x:Key="subtitleBehaviourConverter" />
<subtitles:SubtitleBurnInBehaviourConverter x:Key="subtitleBurnInBehaviourConverter" />
@@ -25,60 +30,47 @@
<Setter Property="Margin" Value="0,2,0,2" />
</Style>
- </UserControl.Resources>
+ </Window.Resources>
- <Grid VerticalAlignment="Top">
+ <Grid VerticalAlignment="Top" Margin="0,10,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
+ <StackPanel Grid.Row="0" Margin="10,0,0,0">
+ <TextBlock Text="{x:Static Properties:Resources.SubtitlesDefaultsView_PaneTitle}" FontSize="20" FontFamily="Segoe UI Light" />
+ </StackPanel>
<!-- Row 0 -->
- <StackPanel Grid.Row="0" Grid.Column="0" Margin="10,0,0,0">
-
- <Grid Margin="5,0,0,0" >
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
-
- <!-- Subtitles -->
- <TextBlock Text="{x:Static Properties:Resources.SubtitlesView_TrackSelectionBehaviour}" Grid.Column="2" Grid.Row="0" Margin="0,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
- <ComboBox Name="autoSubtitleMode" Grid.Column="3" Grid.Row="0" HorizontalAlignment="Left"
+ <Grid Grid.Row="1" Grid.Column="0" Margin="10,15,0,0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
+ </Grid.RowDefinitions>
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" MinWidth="160" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <!-- Subtitles -->
+ <TextBlock Text="{x:Static Properties:Resources.SubtitlesView_TrackSelectionBehaviour}" Grid.Column="0" Grid.Row="0" Margin="0,0,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
+ <ComboBox Name="autoSubtitleMode" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center"
ItemsSource="{Binding SubtitleBehaviourModeList, Converter={StaticResource subtitleBehaviourConverter}}"
SelectedItem="{Binding SubtitleBehaviours.SelectedBehaviour, Converter={StaticResource subtitleBehaviourConverter}}" Width="210" Margin="0,0,5,0" />
- <TextBlock Text="{x:Static Properties:Resources.SubtitlesView_BurnInBehaviour}" Grid.Column="2" Grid.Row="1" Margin="0,5,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
- <ComboBox Name="burninBehaviour" Grid.Column="3" Grid.Row="1" HorizontalAlignment="Left"
- ItemsSource="{Binding SubtitleBurnInBehaviourModeList, Converter={StaticResource subtitleBurnInBehaviourConverter}}"
- SelectedItem="{Binding SubtitleBehaviours.SelectedBurnInBehaviour, Converter={StaticResource subtitleBurnInBehaviourConverter}}" Width="210" Margin="0,5,5,0">
- <ComboBox.ToolTip>
- <TextBlock Style="{StaticResource LongToolTip}" Text="{x:Static Properties:Resources.Subtitles_BurnInBehaviourModes}" />
- </ComboBox.ToolTip>
- </ComboBox>
- <CheckBox Content="{x:Static Properties:Resources.SubtitlesView_AddCC}" Grid.Column="3" Grid.Row="2" Margin="0,5,0,0"
- HorizontalAlignment="Left" IsChecked="{Binding SubtitleBehaviours.AddClosedCaptions}"/>
- <CheckBox Content="{x:Static Properties:Resources.SubtitlesView_AddForeignAudioSearch}" Grid.Column="3" Grid.Row="3" Margin="0,5,0,0"
- HorizontalAlignment="Left" IsChecked="{Binding SubtitleBehaviours.AddForeignAudioScanTrack}"/>
- </Grid>
-
- <TextBlock Text="{x:Static Properties:Resources.Shared_ChooseLanguages}" Margin="5,15,0,0"/>
- <Grid Margin="20,5,0,0">
+ <!-- Languages -->
+ <Grid Margin="25,10,0,0" Grid.Row="2" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
@@ -119,16 +111,45 @@
</StackPanel>
</Grid>
- </StackPanel>
+ <!-- Options -->
+ <TextBlock Grid.Row="3" Grid.Column="0" Text="Options: " Margin="0,20,0,0" />
+ <CheckBox Content="{x:Static Properties:Resources.SubtitlesView_AddCC}" Grid.Row="3" Grid.Column="1" Margin="0,20,0,0"
+ HorizontalAlignment="Left" IsChecked="{Binding SubtitleBehaviours.AddClosedCaptions}"/>
+ <CheckBox Content="{x:Static Properties:Resources.SubtitlesView_AddForeignAudioSearch}" Grid.Column="1" Grid.Row="4" Margin="0,5,0,0"
+ HorizontalAlignment="Left" IsChecked="{Binding SubtitleBehaviours.AddForeignAudioScanTrack}"/>
- <StackPanel Orientation="Horizontal" Margin="10,0,0,0" Grid.Row="1" Grid.ColumnSpan="3">
- <Button cal:Message.Attach="[Event Click] = [Action LaunchHelp]" Background="Transparent" BorderThickness="0">
- <Button.Content>
- <Image Source="/Views/Images/question.png" Width="16" />
- </Button.Content>
- </Button>
- </StackPanel>
+ <!-- Burn In Behaviour -->
+ <TextBlock Text="{x:Static Properties:Resources.SubtitlesView_BurnInBehaviour}" Grid.Column="0" Grid.Row="5" Margin="0,15,5,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
+ <ComboBox Name="burninBehaviour" Grid.Column="2" Grid.Row="5" HorizontalAlignment="Left"
+ ItemsSource="{Binding SubtitleBurnInBehaviourModeList, Converter={StaticResource subtitleBurnInBehaviourConverter}}"
+ SelectedItem="{Binding SubtitleBehaviours.SelectedBurnInBehaviour, Converter={StaticResource subtitleBurnInBehaviourConverter}}" Width="210" Margin="0,15,5,0">
+ <ComboBox.ToolTip>
+ <TextBlock Style="{StaticResource LongToolTip}" Text="{x:Static Properties:Resources.Subtitles_BurnInBehaviourModes}" />
+ </ComboBox.ToolTip>
+ </ComboBox>
+ </Grid>
+
+ <Border BorderBrush="DarkGray" BorderThickness="0,1,0,0" SnapsToDevicePixels="True" Grid.Row="2" Grid.ColumnSpan="3" Margin="10,15,0,0" >
+ <Grid Margin="0,10,0,0" Grid.Row="2" Grid.ColumnSpan="3">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <Button cal:Message.Attach="[Event Click] = [Action LaunchHelp]" Background="Transparent" BorderThickness="0" Grid.Column="0" HorizontalAlignment="Left" Padding="0,2">
+ <Button.Content>
+ <Image Source="/Views/Images/question.png" Width="16" />
+ </Button.Content>
+ </Button>
+
+ <Button Grid.Column="1"
+ Click="Apply_OnClick"
+ Content="{x:Static Properties:Resources.Generic_Apply}"
+ IsDefault="True"
+ Padding="8,2" />
+ </Grid>
+ </Border>
</Grid>
-</UserControl>
+</Window>
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml.cs b/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml.cs
index adb6a3ef4..c0008dc73 100644
--- a/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/SubtitlesDefaultsView.xaml.cs
@@ -9,19 +9,25 @@
namespace HandBrakeWPF.Views
{
+ using System.Windows;
using System.Windows.Controls;
/// <summary>
/// Interaction logic for SubtitlesDefaultsView.xaml
/// </summary>
- public partial class SubtitlesDefaultsView : UserControl
+ public partial class SubtitlesDefaultsView : Window
{
/// <summary>
/// Initializes a new instance of the <see cref="SubtitlesDefaultsView"/> class.
/// </summary>
public SubtitlesDefaultsView()
{
- InitializeComponent();
+ this.InitializeComponent();
+ }
+
+ private void Apply_OnClick(object sender, RoutedEventArgs e)
+ {
+ this.Close();
}
}
}