summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-11-08 19:34:57 +0000
committersr55 <[email protected]>2018-11-08 19:34:57 +0000
commitdf1b3c39a31e45e79576621bf05a5422acc6dcfb (patch)
treedb36c038ce366f8fc14142a7fa3cdf88ac7f7701 /win
parenta05e1d5b79107f1262bbe0b454161039f25ef267 (diff)
WinGui: Make the "Version" label in options and about selectable and copyable. Useful for copying the version number. #1665
Also added a link to the github issue tracker on the About page.
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Views/AboutView.xaml17
-rw-r--r--win/CS/HandBrakeWPF/Views/AboutView.xaml.cs13
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml6
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs6
4 files changed, 34 insertions, 8 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AboutView.xaml b/win/CS/HandBrakeWPF/Views/AboutView.xaml
index 7672bf06a..a8b8e9ae7 100644
--- a/win/CS/HandBrakeWPF/Views/AboutView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AboutView.xaml
@@ -29,14 +29,16 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="0"
Margin="5,10,0,0"
Orientation="Horizontal">
- <TextBlock Margin="0,0,5,0" FontSize="16" FontFamily="Segoe UI Light" Text="{x:Static Properties:Resources.AboutView_Version}" />
- <TextBlock Margin="0,0,0,1" FontSize="16" FontFamily="Segoe UI Light" VerticalAlignment="Bottom" Text="{Binding Version}" />
+ <TextBlock Margin="0,0,0,0" FontSize="16" FontFamily="Segoe UI Light" Text="{x:Static Properties:Resources.AboutView_Version}" />
+ <TextBox Margin="0,0,0,0" BorderThickness="0" FontSize="16" IsReadOnly="True" FontFamily="Segoe UI Light" VerticalAlignment="Bottom" Text="{Binding Version, Mode=OneWay}"
+ MouseDoubleClick="AboutTextBox_OnMouseDoubleClick" x:Name="versionTextBox" />
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="5,5,0,0">
@@ -46,9 +48,16 @@
</TextBlock>
</StackPanel>
- <TextBlock Grid.Row="2" Margin="5,10,0,5" Text="{x:Static Properties:Resources.AboutView_License}" />
+ <StackPanel Orientation="Horizontal" Grid.Row="2" Margin="5,5,0,0">
+ <TextBlock Text="GitHub Issue Tracker: " />
+ <TextBlock>
+ <Hyperlink x:Name="githubWebsite" NavigateUri="/" RequestNavigate="GithubWebsite_OnRequestNavigate" >https://github.com/HandBrake/HandBrake/issues</Hyperlink>
+ </TextBlock>
+ </StackPanel>
+
+ <TextBlock Grid.Row="3" Margin="5,10,0,5" Text="{x:Static Properties:Resources.AboutView_License}" />
- <TextBox Text="{x:Static Properties:Resources.About_GPL}" Grid.Row="3" Margin="10,0,10,10" HorizontalAlignment="Stretch"
+ <TextBox Text="{x:Static Properties:Resources.About_GPL}" Grid.Row="4" Margin="10,0,10,10" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" IsReadOnly="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" />
diff --git a/win/CS/HandBrakeWPF/Views/AboutView.xaml.cs b/win/CS/HandBrakeWPF/Views/AboutView.xaml.cs
index e2dc357ba..d624cc74c 100644
--- a/win/CS/HandBrakeWPF/Views/AboutView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/AboutView.xaml.cs
@@ -11,6 +11,7 @@ namespace HandBrakeWPF.Views
{
using System.Diagnostics;
using System.Windows.Controls;
+ using System.Windows.Input;
using System.Windows.Navigation;
/// <summary>
@@ -23,7 +24,7 @@ namespace HandBrakeWPF.Views
/// </summary>
public AboutView()
{
- InitializeComponent();
+ this.InitializeComponent();
}
/// <summary>
@@ -39,5 +40,15 @@ namespace HandBrakeWPF.Views
{
Process.Start("https://handbrake.fr");
}
+
+ private void GithubWebsite_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
+ {
+ Process.Start("https://github.com/HandBrake/HandBrake/issues");
+ }
+
+ private void AboutTextBox_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
+ {
+ this.versionTextBox.SelectAll();
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index bde4b7303..e32227c20 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -367,13 +367,13 @@
<Grid Margin="20,10,0,20">
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="70" />
+ <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Version -->
- <TextBlock Grid.Column="0" Margin="0,0,5,0" Text="{x:Static Properties:Resources.Options_Version}" />
- <TextBlock Grid.Column="1" Margin="0,0,0,1" VerticalAlignment="Bottom" Text="{Binding Version}" />
+ <TextBlock Grid.Column="0" Margin="0,0,0,0" Text="{x:Static Properties:Resources.Options_Version}" />
+ <TextBox Grid.Column="1" Margin="0,0,0,0" VerticalAlignment="Bottom" Text="{Binding Version, Mode=OneWay}" BorderThickness="0" x:Name="versionTextBox" MouseDoubleClick="VersionTextBox_OnMouseDoubleClick" />
</Grid>
<TextBlock Text="{x:Static Properties:Resources.Options_Updates}" FontSize="14" Margin="0,10,0,10"/>
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs b/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs
index b8fd4b33d..31fad983d 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml.cs
@@ -11,6 +11,7 @@ namespace HandBrakeWPF.Views
{
using System.Windows;
using System.Windows.Controls;
+ using System.Windows.Input;
/// <summary>
/// Interaction logic for OptionsView.xaml
@@ -24,5 +25,10 @@ namespace HandBrakeWPF.Views
{
InitializeComponent();
}
+
+ private void VersionTextBox_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
+ {
+ this.versionTextBox.SelectAll();
+ }
}
}