Skip to content

Commit 010ad44

Browse files
committed
avalonia: add app version to about window
1 parent 09b7d43 commit 010ad44

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

src/shared/Core/UI/Controls/AboutWindow.axaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,33 @@
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5-
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
5+
xmlns:gcm="clr-namespace:GitCredentialManager"
6+
mc:Ignorable="d" d:DesignWidth="300" d:DesignHeight="450"
67
x:Class="GitCredentialManager.UI.Controls.AboutWindow"
78
Title="About Git Credential Manager"
89
CanResize="False" Width="300" SizeToContent="Height"
10+
x:Name="window"
911
Background="{DynamicResource WindowBackgroundBrush}">
1012
<StackPanel Margin="20">
1113
<Image HorizontalAlignment="Center"
1214
Margin="0,10,0,10"
13-
Source="{DynamicResource GcmLogo}" Width="128" Height="128" />
15+
Source="{DynamicResource GcmLogo}" Width="64" Height="64" />
1416
<TextBlock HorizontalAlignment="Center"
1517
Margin="0,5"
16-
FontWeight="Bold" FontSize="13"
18+
FontWeight="Bold" FontSize="15"
1719
Text="Git Credential Manager" />
1820
<TextBlock HorizontalAlignment="Center"
19-
Margin="0,5"
20-
FontSize="13" TextWrapping="Wrap" TextAlignment="Center"
21+
FontSize="11"
22+
Text="{Binding VersionString, ElementName=window}"
23+
Margin="0,5"/>
24+
<TextBlock HorizontalAlignment="Center"
25+
Margin="0,10,0,0"
26+
FontSize="11" TextWrapping="Wrap" TextAlignment="Center"
2127
Text="Secure, cross-platform Git credential storage for popular Git hosting services." />
2228
<Button HorizontalAlignment="Center"
23-
Margin="0,5"
24-
FontSize="12" Classes="hyperlink"
25-
Content="https://aka.ms/gcm"
29+
Margin="0,5,0,0"
30+
Content="{Binding ProjectUrl, ElementName=window}"
31+
FontSize="11" Classes="hyperlink"
2632
Click="ProjectButton_Click"/>
2733
<TextBlock HorizontalAlignment="Center"
2834
Margin="0,10,0,0"

src/shared/Core/UI/Controls/AboutWindow.axaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ namespace GitCredentialManager.UI.Controls
88
{
99
public partial class AboutWindow : Window
1010
{
11+
public string VersionString => $"Version {Constants.GcmVersion}";
12+
public string ProjectUrl => Constants.HelpUrls.GcmProjectUrl;
13+
1114
public AboutWindow()
1215
{
1316
InitializeComponent();
@@ -23,7 +26,7 @@ private void InitializeComponent()
2326

2427
private void ProjectButton_Click(object sender, RoutedEventArgs e)
2528
{
26-
var psi = new ProcessStartInfo("https://aka.ms/gcm")
29+
var psi = new ProcessStartInfo(ProjectUrl)
2730
{
2831
UseShellExecute = true
2932
};

0 commit comments

Comments
 (0)