mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-26 21:17:20 -08:00
e3c0f7d496
* use system chrome instead of custom caption button on macOS * move `BeginMoveWindow` and `MaximizeOrRestoreWindow` to `ChromelessWindow` * better supports for fullscreen mode on macOS * redesign the layout of title bar for all windows Signed-off-by: leo <longshuang@msn.cn>
83 lines
4.3 KiB
XML
83 lines
4.3 KiB
XML
<v:ChromelessWindow xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
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"
|
|
x:Class="SourceGit.Views.About"
|
|
x:DataType="v:About"
|
|
Icon="/App.ico"
|
|
Title="{DynamicResource Text.About}"
|
|
SizeToContent="WidthAndHeight"
|
|
CanResize="False"
|
|
WindowStartupLocation="CenterScreen">
|
|
<Grid RowDefinitions="Auto,*">
|
|
<!-- TitleBar -->
|
|
<Grid Grid.Row="0" Height="28" IsVisible="{Binding !UseSystemWindowFrame}">
|
|
<Border Background="{DynamicResource Brush.TitleBar}"
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}"
|
|
PointerPressed="BeginMoveWindow"/>
|
|
|
|
<Path Width="14" Height="14"
|
|
Margin="10,0,0,0"
|
|
HorizontalAlignment="Left"
|
|
Data="{StaticResource Icons.Info}"
|
|
IsVisible="{OnPlatform True, macOS=False}"/>
|
|
|
|
<TextBlock Classes="bold"
|
|
Text="{DynamicResource Text.About}"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
IsHitTestVisible="False"/>
|
|
|
|
<v:CaptionButtons HorizontalAlignment="Right"
|
|
IsCloseButtonOnly="True"
|
|
IsVisible="{OnPlatform True, macOS=False}"/>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1" ColumnDefinitions="Auto,*">
|
|
<Image Grid.Column="0"
|
|
Width="200" Height="200"
|
|
Margin="8,0"
|
|
Source="/App.ico"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="0,8,32,16">
|
|
<StackPanel Height="48" 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 Classes="primary" Margin="8,0" Text="{Binding Version}" FontSize="12" Foreground="White"/>
|
|
</Border>
|
|
</StackPanel>
|
|
|
|
<TextBlock Margin="2,0,0,0" Text="{DynamicResource Text.About.SubTitle}" FontSize="16"/>
|
|
|
|
<TextBlock Margin="2,8,0,0" Text="{DynamicResource Text.About.Copyright}" Foreground="{DynamicResource Brush.FG2}"/>
|
|
|
|
<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>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</v:ChromelessWindow>
|