Basic MainWindow ui
This commit is contained in:
@@ -6,5 +6,21 @@
|
||||
|
||||
<Application.Styles>
|
||||
<FluentTheme />
|
||||
<StyleInclude Source="Styles/DeafaultStyles.axaml"></StyleInclude>
|
||||
</Application.Styles>
|
||||
|
||||
|
||||
<Application.Resources>
|
||||
<FontFamily x:Key="FreeSerif">/Assets/Fonts/FreeSerif.ttf#FreeSerif, Regular</FontFamily>
|
||||
<FontFamily x:Key="FreeSerifBold">/Assets/Fonts/FreeSerifBold.ttf#FreeSerif, Bold</FontFamily>
|
||||
|
||||
<FontFamily x:Key="Phosphor">/Assets/Fonts/Phosphor.ttf#Phosphor</FontFamily>
|
||||
<FontFamily x:Key="PhosphorFill">/Assets/Fonts/Phosphor-Fill.ttf#Phosphor-Fill</FontFamily>
|
||||
|
||||
<SolidColorBrush x:Key="PrimaryBackground">#1a202e</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="PrimaryText">#ffffff</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="PrimaryButton">#3a4f6f</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="PrimaryButtonHover">#2d3f5c</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="PrimaryButtonHoverText">#ffffff</SolidColorBrush>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
@@ -5,5 +5,42 @@
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SessionZero.MainWindow"
|
||||
Title="SessionZero">
|
||||
Welcome to Avalonia!
|
||||
<Grid Background="{DynamicResource PrimaryBackground}" ColumnDefinitions="Auto, *">
|
||||
<Border Padding="10" Background="{DynamicResource PrimaryBackground}" BoxShadow="5 5 20 0 Black">
|
||||
<Grid RowDefinitions="*, Auto">
|
||||
<StackPanel Spacing="12">
|
||||
<Border Padding="10">
|
||||
<Svg Path="/Assets/Images/sessionzero-icon.svg" Width="30"></Svg>
|
||||
</Border>
|
||||
|
||||
<Button HorizontalAlignment="Stretch">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Classes="icon" Content=""></Label>
|
||||
<Label Content="Home"></Label>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button HorizontalAlignment="Stretch">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Classes="icon" Content=""></Label>
|
||||
<Label Content="Sessions"></Label>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button HorizontalAlignment="Stretch">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Classes="icon" Content=""></Label>
|
||||
<Label Content="Library"></Label>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<Button Classes="icon-only" Grid.Row="1">
|
||||
<Label Classes="icon-only" Content=""></Label>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Column="1" Margin="15">
|
||||
<ContentControl Content="tmp"></ContentControl>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -23,5 +23,7 @@
|
||||
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
|
||||
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="CogwheelLib" Version="1.3.2" />
|
||||
<PackageReference Include="Svg.Controls.Skia.Avalonia" Version="11.3.6.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
82
SessionZero/Styles/DeafaultStyles.axaml
Normal file
82
SessionZero/Styles/DeafaultStyles.axaml
Normal file
@@ -0,0 +1,82 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20" Background="{DynamicResource PrimaryBackground}" Width="200">
|
||||
<!-- Add Controls for Previewer Here -->
|
||||
<StackPanel>
|
||||
<Button HorizontalAlignment="Stretch">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Classes="icon" Content=""></Label>
|
||||
<Label Content="Home"></Label>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
|
||||
<Button Classes="icon-only">
|
||||
<Label Classes="icon-only" Content=""></Label>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<!-- Add Styles Here -->
|
||||
<Style Selector="Window">
|
||||
<Setter Property="FontFamily" Value="{DynamicResource FreeSerif}"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.icon-only">
|
||||
<Setter Property="Background" Value="Transparent"></Setter>
|
||||
<Setter Property="Padding" Value="0 0 0 0"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button">
|
||||
<!-- Fix for presumed bug in baseline for custom fonts -->
|
||||
<Setter Property="Padding" Value="10 8 10 5"></Setter>
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryText}"></Setter>
|
||||
<Setter Property="Background" Value="{DynamicResource PrimaryButton}"></Setter>
|
||||
<Setter Property="FontSize" Value="15"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button /template/ ContentPresenter">
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<BrushTransition Property="Background" Duration="0:0:0.1"></BrushTransition>
|
||||
</Transitions>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Label.icon">
|
||||
<Setter Property="FontFamily" Value="{DynamicResource PhosphorFill}"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.icon-only Label">
|
||||
<Setter Property="FontFamily" Value="{DynamicResource PhosphorFill}"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.icon-only /template/ ContentPresenter">
|
||||
<Setter Property="RenderTransform" Value="scale(1)"></Setter>
|
||||
<Setter Property="Transitions">
|
||||
<Transitions>
|
||||
<TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.1"></TransformOperationsTransition>
|
||||
</Transitions>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.icon-only:pointerover Label.icon-only">
|
||||
<Setter Property="FontFamily" Value="{DynamicResource Phosphor}"></Setter>
|
||||
<Setter Property="FontSize" Value="20"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryButtonHoverText}"></Setter>
|
||||
<Setter Property="Background" Value="{DynamicResource PrimaryButtonHover}"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.icon-only:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent"></Setter>
|
||||
<Setter Property="RenderTransform" Value="scale(1.1)"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.icon-only:pointerover Label">
|
||||
<Setter Property="FontFamily" Value="{DynamicResource PhosphorFill}"></Setter>
|
||||
</Style>
|
||||
</Styles>
|
||||
Reference in New Issue
Block a user