mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 06:04:59 +00:00
ux: re-design About
page
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
7031693489
commit
3e8bba0d0b
12 changed files with 21 additions and 96 deletions
|
@ -3,12 +3,12 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:v="using:SourceGit.Views"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
mc:Ignorable="d" d:DesignWidth="520" d:DesignHeight="230"
|
||||
x:Class="SourceGit.Views.About"
|
||||
x:Name="ThisControl"
|
||||
Icon="/App.ico"
|
||||
Title="{DynamicResource Text.About}"
|
||||
SizeToContent="WidthAndHeight"
|
||||
Width="520" Height="230"
|
||||
CanResize="False"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
|
@ -34,7 +34,7 @@
|
|||
IsVisible="{OnPlatform True, macOS=False}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" ColumnDefinitions="Auto,*">
|
||||
<Grid Grid.Row="1" Height="200" ColumnDefinitions="Auto,Auto">
|
||||
<Image Grid.Column="0"
|
||||
Width="200" Height="200"
|
||||
Margin="8,0"
|
||||
|
@ -42,41 +42,28 @@
|
|||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
|
||||
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="0,8,32,16">
|
||||
<StackPanel Height="48" Orientation="Horizontal">
|
||||
<StackPanel Grid.Column="1" Orientation="Vertical" VerticalAlignment="Center">
|
||||
<StackPanel Height="40" Orientation="Horizontal">
|
||||
<TextBlock Classes="bold" Text="SourceGit" FontSize="32" />
|
||||
<Border Margin="12,0,0,0" Height="20" CornerRadius="10" Background="{DynamicResource Brush.Accent}" Effect="drop-shadow(0 0 6 #40000000)">
|
||||
<TextBlock x:Name="TxtVersion" Classes="primary" Margin="8,0" FontSize="12" Foreground="White"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Margin="2,0,0,0" Text="{DynamicResource Text.About.SubTitle}" FontSize="16"/>
|
||||
<TextBlock Margin="2,4,0,0" Text="{DynamicResource Text.About.SubTitle}" FontSize="16"/>
|
||||
|
||||
<TextBlock x:Name="TxtCopyright" Margin="2,8,0,0" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,8,0,0">
|
||||
<Button Width="18" Height="18" Classes="icon_button" Click="OnVisitWebsite" ToolTip.Tip="https://sourcegit-scm.github.io/">
|
||||
<Path Width="16" Height="16" Data="{StaticResource Icons.Remotes}"/>
|
||||
</Button>
|
||||
|
||||
<StackPanel Orientation="Vertical" Margin="0,24,0,0">
|
||||
<StackPanel Orientation="Horizontal" Height="18">
|
||||
<TextBlock Text="{DynamicResource Text.About.BuildWith}" />
|
||||
<TextBlock Text="Avalonia UI" Cursor="Hand" Foreground="{DynamicResource Brush.Accent}" TextDecorations="Underline" PointerPressed="OnVisitAvaloniaUI"/>
|
||||
<TextBlock Text=" & " />
|
||||
<TextBlock Text="AvaloniaEdit" Cursor="Hand" Foreground="{DynamicResource Brush.Accent}" TextDecorations="Underline" PointerPressed="OnVisitAvaloniaEdit"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Height="18" Margin="0,2,0,0">
|
||||
<TextBlock Text="{DynamicResource Text.About.Fonts}" />
|
||||
<TextBlock Text="JetBrains Mono" Cursor="Hand" Foreground="{DynamicResource Brush.Accent}" TextDecorations="Underline" PointerPressed="OnVisitJetBrainsMonoFont"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Height="18" Margin="0,2,0,0">
|
||||
<TextBlock Text="{DynamicResource Text.About.Chart}" />
|
||||
<TextBlock Text="LiveCharts2" Cursor="Hand" Foreground="{DynamicResource Brush.Accent}" TextDecorations="Underline" PointerPressed="OnVisitLiveCharts2"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Height="18" Margin="0,2,0,0">
|
||||
<TextBlock Text="{DynamicResource Text.About.SourceCode}" />
|
||||
<TextBlock Text="Github" Cursor="Hand" Foreground="{DynamicResource Brush.Accent}" TextDecorations="Underline" PointerPressed="OnVisitSourceCode"/>
|
||||
</StackPanel>
|
||||
<Button Width="18" Height="18" Margin="8,0,0,0" Classes="icon_button" Click="OnVisitSourceCode" ToolTip.Tip="https://github.com/sourcegit-scm/sourcegit">
|
||||
<Path Width="16" Height="16" Data="{StaticResource Icons.Github}"/>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<TextBlock x:Name="TxtCopyright" Margin="0,40,0,0" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
using System.Reflection;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
|
||||
namespace SourceGit.Views
|
||||
{
|
||||
|
@ -19,31 +19,13 @@ namespace SourceGit.Views
|
|||
TxtCopyright.Text = copyright.Copyright;
|
||||
}
|
||||
|
||||
private void OnVisitAvaloniaUI(object _, PointerPressedEventArgs e)
|
||||
private void OnVisitWebsite(object _, RoutedEventArgs e)
|
||||
{
|
||||
Native.OS.OpenBrowser("https://www.avaloniaui.net/");
|
||||
Native.OS.OpenBrowser("https://sourcegit-scm.github.io/");
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnVisitAvaloniaEdit(object _, PointerPressedEventArgs e)
|
||||
{
|
||||
Native.OS.OpenBrowser("https://github.com/AvaloniaUI/AvaloniaEdit");
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnVisitJetBrainsMonoFont(object _, PointerPressedEventArgs e)
|
||||
{
|
||||
Native.OS.OpenBrowser("https://www.jetbrains.com/lp/mono/");
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnVisitLiveCharts2(object _, PointerPressedEventArgs e)
|
||||
{
|
||||
Native.OS.OpenBrowser("https://livecharts.dev/");
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnVisitSourceCode(object _, PointerPressedEventArgs e)
|
||||
private void OnVisitSourceCode(object _, RoutedEventArgs e)
|
||||
{
|
||||
Native.OS.OpenBrowser("https://github.com/sourcegit-scm/sourcegit");
|
||||
e.Handled = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue