mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
80 lines
3.6 KiB
XML
80 lines
3.6 KiB
XML
<controls:Window
|
|
x:Class="SourceGit.Views.Launcher"
|
|
x:Name="me"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
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:controls="clr-namespace:SourceGit.Views.Controls"
|
|
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
|
|
xmlns:models="clr-namespace:SourceGit.Models"
|
|
xmlns:converters="clr-namespace:SourceGit.Views.Converters"
|
|
mc:Ignorable="d"
|
|
WindowStartupLocation="CenterScreen"
|
|
MinWidth="1024" MinHeight="768"
|
|
Title="{DynamicResource Text.About.Title}"
|
|
Width="{Binding Source={x:Static models:Preference.Instance}, Path=Window.Width, Mode=TwoWay}"
|
|
Height="{Binding Source={x:Static models:Preference.Instance}, Path=Window.Height, Mode=TwoWay}"
|
|
WindowState="{Binding Source={x:Static models:Preference.Instance}, Path=Window.State, Mode=TwoWay}"
|
|
Closing="OnClosing">
|
|
<Window.Resources>
|
|
<converters:WindowStateToTitleBarHeight x:Key="WindowStateToTitleBarHeight"/>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="{Binding ElementName=me, Path=WindowState, Converter={StaticResource WindowStateToTitleBarHeight}}"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Titlebar -->
|
|
<Grid Grid.Row="0" Background="{DynamicResource Brush.TitleBar}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="40"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="360"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Bottom border -->
|
|
<Rectangle Grid.Column="0" Grid.ColumnSpan="4" Fill="{DynamicResource Brush.Border0}" Height="1" VerticalAlignment="Bottom"/>
|
|
|
|
<!-- Main Menu -->
|
|
<Button
|
|
Grid.Column="0"
|
|
Width="28" Height="28"
|
|
VerticalAlignment="Bottom"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
WindowChrome.IsHitTestVisibleInChrome="True"
|
|
Click="ToggleMainMenu">
|
|
<Path Width="14" Height="14" Data="{StaticResource Icon.Menu}"/>
|
|
</Button>
|
|
|
|
<!-- Tabs -->
|
|
<widgets:PageTabBar
|
|
Grid.Column="1"
|
|
x:Name="tabs"
|
|
Height="30"
|
|
VerticalAlignment="Bottom"
|
|
TabAdd="OnTabAdding"
|
|
TabSelected="OnTabSelected"
|
|
TabClosed="OnTabClosed"/>
|
|
|
|
<!-- Right controls -->
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" Height="30" WindowChrome.IsHitTestVisibleInChrome="True">
|
|
<controls:IconButton Click="Minimize" Width="48" IconSize="10" Icon="{StaticResource Icon.Minimize}" HoverBackground="#40000000" Opacity="1"/>
|
|
<ToggleButton Style="{StaticResource Style.ToggleButton.MaxOrRestore}" Width="48" IsChecked="{Binding ElementName=me, Path=IsMaximized}"/>
|
|
<controls:IconButton Click="Quit" Width="48" IconSize="10" Icon="{StaticResource Icon.Close}" HoverBackground="Red" Opacity="1"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<!-- Contents -->
|
|
<controls:PageContainer x:Name="container" Grid.Row="1"/>
|
|
|
|
<!-- Alerts -->
|
|
<widgets:Exceptions
|
|
Grid.Row="1"
|
|
HorizontalAlignment="Right" VerticalAlignment="Top"
|
|
Width="330" Height="Auto"/>
|
|
</Grid>
|
|
</controls:Window>
|