style<Welcome>: new style for welcome page

This commit is contained in:
leo 2023-10-10 15:19:45 +08:00
parent 79e3759681
commit 951a38d445
3 changed files with 45 additions and 51 deletions

View file

@ -1,8 +1,6 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Color x:Key="Colors.Shadow">White</Color>
<SolidColorBrush x:Key="Brush.Logo" Color="#FFF05133"/>
<SolidColorBrush x:Key="Brush.Window" Color="#FF252525"/>
@ -20,6 +18,7 @@
<SolidColorBrush x:Key="Brush.Border1" Color="#FF7C7C7C"/>
<SolidColorBrush x:Key="Brush.Border2" Color="#FF404040"/>
<SolidColorBrush x:Key="Brush.Border3" Color="#FF252525"/>
<SolidColorBrush x:Key="Brush.WelcomeBorder">Transparent</SolidColorBrush>
<SolidColorBrush x:Key="Brush.FG1" Color="#FFF1F1F1"/>
<SolidColorBrush x:Key="Brush.FG2" Color="#40F1F1F1"/>

View file

@ -1,8 +1,6 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Color x:Key="Colors.Shadow">Black</Color>
<SolidColorBrush x:Key="Brush.Logo" Color="#FFF05133"/>
<SolidColorBrush x:Key="Brush.Window" Color="#FFF0F5F9"/>
@ -20,6 +18,7 @@
<SolidColorBrush x:Key="Brush.Border1" Color="#FF898989"/>
<SolidColorBrush x:Key="Brush.Border2" Color="#FFCFCFCF"/>
<SolidColorBrush x:Key="Brush.Border3" Color="#FFEFEFEF"/>
<SolidColorBrush x:Key="Brush.WelcomeBorder">#FFCFCFCF</SolidColorBrush>
<SolidColorBrush x:Key="Brush.FG1" Color="#FF1F1F1F"/>
<SolidColorBrush x:Key="Brush.FG2" Color="#FF6F6F6F"/>

View file

@ -12,7 +12,6 @@
<Grid AllowDrop="True" Drop="OnPageDrop">
<Grid.RowDefinitions>
<RowDefinition Height="36"/>
<RowDefinition Height="56"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
@ -48,53 +47,49 @@
Click="OnOpenTerminalClicked"/>
</StackPanel>
<Button
Grid.Column="2"
HorizontalAlignment="Right"
Margin="8,0"
Background="Transparent" BorderThickness="0"
ToolTip="{DynamicResource Text.Welcome.Sort}"
Click="OnSortMethodClicked">
<Path Width="16" Height="16" Data="{StaticResource Icon.Sort}"/>
</Button>
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Grid Height="28" Width="250">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="24"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border
Grid.Column="0" Grid.ColumnSpan="2"
Background="{DynamicResource Brush.Contents}"
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border0}"
CornerRadius="14"/>
<Path
Grid.Column="0"
Width="14" Height="14" Margin="4,0,0,0"
Fill="{DynamicResource Brush.FG2}"
Data="{StaticResource Icon.Search}"
IsHitTestVisible="False"/>
<controls:TextEdit
x:Name="filter"
Grid.Column="1"
Height="24"
Margin="0"
Placeholder="{DynamicResource Text.Welcome.Search}"
BorderThickness="0"
TextChanged="OnSearchFilterChanged"/>
</Grid>
<Button
Margin="8,0"
Background="Transparent" BorderThickness="0"
ToolTip="{DynamicResource Text.Welcome.Sort}"
Click="OnSortMethodClicked">
<Path Width="16" Height="16" Data="{StaticResource Icon.Sort}"/>
</Button>
</StackPanel>
</Grid>
</Border>
<Grid Grid.Row="1" Width="600" Height="28" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="24"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border
Grid.Column="0" Grid.ColumnSpan="2"
Background="{DynamicResource Brush.Contents}"
BorderThickness="0"
CornerRadius="14">
<Border.Effect>
<DropShadowEffect BlurRadius="6" ShadowDepth="0" Color="{DynamicResource Colors.Shadow}" Opacity=".2"/>
</Border.Effect>
</Border>
<Path
Grid.Column="0"
Width="14" Height="14" Margin="4,0,0,0"
Fill="{DynamicResource Brush.FG2}"
Data="{StaticResource Icon.Search}"
IsHitTestVisible="False"/>
<controls:TextEdit
x:Name="filter"
Grid.Column="1"
Height="24"
Margin="0"
Placeholder="{DynamicResource Text.Welcome.Search}"
BorderThickness="0"
TextChanged="OnSearchFilterChanged"/>
</Grid>
<!-- Repositories List -->
<Grid Grid.Row="2" Width="600" HorizontalAlignment="Center" Margin="0,0,0,8" AllowDrop="True" Drop="OnPageDrop">
<Grid Grid.Row="1" Margin="0,8" AllowDrop="True" Drop="OnPageDrop">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<ItemsControl x:Name="repoList">
<ItemsControl x:Name="repoList" Width="600" HorizontalAlignment="Center">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Vertical"/>
@ -106,7 +101,7 @@
<Control MouseDoubleClick="OnDoubleClickRepository" ContextMenuOpening="OnRepositoryContextMenuOpening">
<Control.Template>
<ControlTemplate>
<Grid Height="38" Margin="2,0,2,6">
<Grid Height="42" Margin="0,4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
@ -114,8 +109,9 @@
<Border
Grid.Column="0" Grid.ColumnSpan="2"
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
Background="{DynamicResource Brush.Popup}"
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border0}"
CornerRadius="4"
Background="{DynamicResource Brush.Contents}"
UseLayoutRounding="True"
SnapsToDevicePixels="True"/>