diff options
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs | 18 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/ResourcesUI.resx | 6 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 27 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/MainView.xaml | 16 |
4 files changed, 63 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs index cba715c3f..4a7d52135 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs @@ -682,6 +682,15 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
+ /// Looks up a localized string similar to Audio Tracks.
+ /// </summary>
+ public static string MainView_AudioTrackCount {
+ get {
+ return ResourceManager.GetString("MainView_AudioTrackCount", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Browse.
/// </summary>
public static string MainView_Browser {
@@ -952,6 +961,15 @@ namespace HandBrakeWPF.Properties { }
/// <summary>
+ /// Looks up a localized string similar to Subtitle Tracks.
+ /// </summary>
+ public static string MainView_SubtitleTracksCount {
+ get {
+ return ResourceManager.GetString("MainView_SubtitleTracksCount", resourceCulture);
+ }
+ }
+
+ /// <summary>
/// Looks up a localized string similar to Summary.
/// </summary>
public static string MainView_SummaryTab {
diff --git a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx index c387d0653..5e24741dd 100644 --- a/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx +++ b/win/CS/HandBrakeWPF/Properties/ResourcesUI.resx @@ -956,4 +956,10 @@ This will not affect your current settings in the Subtitle tab.</value> <data name="SummaryView_storage" xml:space="preserve">
<value>storage</value>
</data>
+ <data name="MainView_AudioTrackCount" xml:space="preserve">
+ <value>Audio Tracks</value>
+ </data>
+ <data name="MainView_SubtitleTracksCount" xml:space="preserve">
+ <value>Subtitle Tracks</value>
+ </data>
</root>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 0242fcbfb..32241d53a 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -729,6 +729,7 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.StartEndRangeItems);
this.NotifyOfPropertyChange(() => this.SelectedTitle);
this.NotifyOfPropertyChange(() => this.Angles);
+ this.NotifyOfPropertyChange(() => this.SourceInfo);
// Default the Start and End Point dropdowns
this.SelectedStartPoint = 1;
@@ -1151,6 +1152,32 @@ namespace HandBrakeWPF.ViewModels public bool IsUWP { get; } = UwpDetect.IsUWP();
+ public string SourceInfo
+ {
+ get
+ {
+ if (this.SelectedTitle != null)
+ {
+ int parW = this.SelectedTitle.ParVal.Width;
+ int parH = this.SelectedTitle.ParVal.Height;
+ int displayW = this.SelectedTitle.Resolution.Width * parW / parH;
+
+ return string.Format("{0}x{1} ({2}x{3}), {4} FPS, {5} {6}, {7} {8}",
+ this.SelectedTitle.Resolution.Width,
+ this.SelectedTitle.Resolution.Height,
+ displayW,
+ this.SelectedTitle.Resolution.Height,
+ this.SelectedTitle.Fps,
+ this.SelectedTitle.AudioTracks.Count,
+ ResourcesUI.MainView_AudioTrackCount,
+ this.SelectedTitle.Subtitles.Count,
+ ResourcesUI.MainView_SubtitleTracksCount);
+ }
+
+ return string.Empty;
+ }
+ }
+
#endregion
#region Commands
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index de9068ea9..cadd5a5ee 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -294,10 +294,18 @@ HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
>
- <StackPanel Orientation="Horizontal">
- <Label Content="{x:Static Properties:ResourcesUI.MainView_Source}" FontWeight="Bold" />
- <Label Content="{Binding Path=SourceLabel}" />
- </StackPanel>
+ <Grid HorizontalAlignment="Stretch" Margin="0,0,10,0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <Label Content="{x:Static Properties:ResourcesUI.MainView_Source}" FontWeight="Bold" Grid.Column="0" />
+ <TextBlock Text="{Binding Path=SourceLabel}" TextTrimming="CharacterEllipsis" Grid.Column="1" MaxWidth="400" />
+ <TextBlock Text="{Binding SourceInfo}" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="Gray" FontFamily="Segoe UI Light" Grid.Column="2" MaxWidth="400" />
+ </Grid>
+
<StackPanel Orientation="Horizontal">
<Label Margin="8,0,0,0" Content="{x:Static Properties:ResourcesUI.MainView_Title}" />
<ComboBox Name="Titles"
|