style<*>: borders of all windows

This commit is contained in:
leo 2021-05-26 16:03:05 +08:00
parent e3ac11a01b
commit 04f1137f96
8 changed files with 63 additions and 24 deletions

View file

@ -3,8 +3,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="Brush.Logo" Color="#FFF05133"/>
<SolidColorBrush x:Key="Brush.TitleBar" Color="#FF1F1F1F"/>
<SolidColorBrush x:Key="Brush.Window" Color="#FF252525"/>
<SolidColorBrush x:Key="Brush.WindowBorder" Color="#FF101010"/>
<SolidColorBrush x:Key="Brush.TitleBar" Color="#FF1F1F1F"/>
<SolidColorBrush x:Key="Brush.NewPageHover" Color="#FF404040"/>
<SolidColorBrush x:Key="Brush.Popup" Color="#FF2B2B2B"/>
<SolidColorBrush x:Key="Brush.Contents" Color="#FF1B1B1B"/>

View file

@ -3,8 +3,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="Brush.Logo" Color="#FFF05133"/>
<SolidColorBrush x:Key="Brush.TitleBar" Color="White"/>
<SolidColorBrush x:Key="Brush.Window" Color="#FFF8F8F8"/>
<SolidColorBrush x:Key="Brush.WindowBorder" Color="#FF505050"/>
<SolidColorBrush x:Key="Brush.TitleBar" Color="White"/>
<SolidColorBrush x:Key="Brush.NewPageHover" Color="#1D000000"/>
<SolidColorBrush x:Key="Brush.Popup" Color="#FFF8F8F8"/>
<SolidColorBrush x:Key="Brush.Contents" Color="White"/>

View file

@ -18,6 +18,7 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28"/>
<RowDefinition Height="1"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
@ -47,8 +48,14 @@
WindowChrome.IsHitTestVisibleInChrome="True"/>
</Grid>
<Rectangle
Grid.Row="1"
Height="1"
HorizontalAlignment="Stretch"
Fill="{StaticResource Brush.Border0}"/>
<!-- Content -->
<StackPanel Grid.Row="1" Orientation="Vertical">
<StackPanel Grid.Row="2" Orientation="Vertical">
<!-- LOGO -->
<Path

View file

@ -5,10 +5,11 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d"
UseLayoutRounding="True"
Title="{StaticResource Text.Blame}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="ClearType"
RenderOptions.ClearTypeHint="Enabled"
UseLayoutRounding="True"
WindowStartupLocation="CenterOwner"
Height="600" Width="800">
<WindowChrome.WindowChrome>
@ -19,6 +20,7 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28"/>
<RowDefinition Height="1"/>
<RowDefinition Height="24"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
@ -46,8 +48,15 @@
</StackPanel>
</Grid>
<!-- Body -->
<Border Grid.Row="1">
<!-- Line -->
<Rectangle
Grid.Row="1"
Height="1"
HorizontalAlignment="Stretch"
Fill="{StaticResource Brush.Border0}"/>
<!-- Description -->
<Border Grid.Row="2">
<Grid Margin="4,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
@ -61,7 +70,7 @@
<!-- Viewer -->
<DataGrid
Grid.Row="2"
Grid.Row="3"
x:Name="blame"
GridLinesVisibility="Vertical"
VerticalGridLinesBrush="{StaticResource Brush.Border2}"
@ -98,7 +107,7 @@
<StackPanel
x:Name="notSupport"
Grid.Row="2"
Grid.Row="3"
Orientation="Vertical"
VerticalAlignment="Center" HorizontalAlignment="Center"
Background="{StaticResource Brush.Window}"
@ -108,10 +117,10 @@
</StackPanel>
<!-- Loading -->
<controls:Loading x:Name="loading" Grid.Row="2" Width="48" Height="48" IsAnimating="True"/>
<controls:Loading x:Name="loading" Grid.Row="3" Width="48" Height="48" IsAnimating="True"/>
<!-- Popup to show commit info -->
<Popup x:Name="popup" Grid.Row="2" Placement="MousePoint" IsOpen="False" StaysOpen="False" Focusable="True">
<Popup x:Name="popup" Grid.Row="3" Placement="MousePoint" IsOpen="False" StaysOpen="False" Focusable="True">
<Border BorderBrush="{StaticResource Brush.Accent1}" BorderThickness="1" Background="{StaticResource Brush.Popup}">
<Grid Margin="4">
<Grid.RowDefinitions>

View file

@ -11,7 +11,7 @@ namespace SourceGit.Views.Controls {
public WindowBorder() {
Background = FindResource("Brush.Window") as Brush;
BorderBrush = FindResource("Brush.Border0") as Brush;
BorderBrush = FindResource("Brush.WindowBorder") as Brush;
BorderThickness = new Thickness(1);
Margin = new Thickness(0);

View file

@ -7,8 +7,11 @@
xmlns:models="clr-namespace:SourceGit.Models"
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
mc:Ignorable="d"
UseLayoutRounding="True"
Title="{StaticResource Text.FileHistory}"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="ClearType"
RenderOptions.ClearTypeHint="Enabled"
UseLayoutRounding="True"
WindowStartupLocation="CenterOwner"
MinHeight="600" MinWidth="800">
<WindowChrome.WindowChrome>
@ -19,6 +22,7 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28"/>
<RowDefinition Height="1"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
@ -45,8 +49,14 @@
</StackPanel>
</Grid>
<Rectangle
Grid.Row="1"
Height="1"
HorizontalAlignment="Stretch"
Fill="{StaticResource Brush.Border0}"/>
<!-- Body -->
<Grid Grid.Row="1">
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" MinWidth="300" MaxWidth="600"/>
<ColumnDefinition Width="1"/>
@ -58,6 +68,8 @@
x:Name="commitList"
Grid.Column="0"
Background="{StaticResource Brush.Contents}"
BorderBrush="{StaticResource Brush.Border0}"
BorderThickness="0,0,1,0"
SelectionMode="Single"
SelectionUnit="FullRow"
SelectedCellsChanged="OnCommitSelectedChanged">
@ -128,7 +140,7 @@
<GridSplitter Grid.Column="1" Width="1" HorizontalAlignment="Center" VerticalAlignment="Stretch" Background="Transparent"/>
<!-- Diff Viewer -->
<widgets:DiffViewer Grid.Column="2" x:Name="diffViewer"/>
<widgets:DiffViewer Grid.Column="2" x:Name="diffViewer" Padding="4"/>
</Grid>
</Grid>
</controls:WindowBorder>

View file

@ -8,10 +8,11 @@
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
xmlns:models="clr-namespace:SourceGit.Models"
mc:Ignorable="d"
UseLayoutRounding="True"
WindowStartupLocation="CenterScreen"
TextOptions.TextFormattingMode="Display"
TextOptions.TextRenderingMode="ClearType"
RenderOptions.ClearTypeHint="Enabled"
UseLayoutRounding="True"
WindowStartupLocation="CenterScreen"
MinWidth="1280" MinHeight="720"
Title="{StaticResource Text.About.Title}"
Width="{Binding Source={x:Static models:Preference.Instance}, Path=Window.Width, Mode=TwoWay}"

View file

@ -7,11 +7,11 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:models="clr-namespace:SourceGit.Models"
mc:Ignorable="d"
WindowStartupLocation="CenterOwner"
ResizeMode="NoResize"
UseLayoutRounding="True"
Title="{StaticResource Text.Preference}"
Width="500" SizeToContent="Height"
WindowStartupLocation="CenterOwner"
ResizeMode="NoResize">
Width="500" SizeToContent="Height">
<WindowChrome.WindowChrome>
<WindowChrome UseAeroCaptionButtons="False" CornerRadius="0" CaptionHeight="28" ResizeBorderThickness="1"/>
</WindowChrome.WindowChrome>
@ -20,6 +20,7 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28"/>
<RowDefinition Height="1"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
@ -48,8 +49,13 @@
WindowChrome.IsHitTestVisibleInChrome="True"/>
</Grid>
<Rectangle
Grid.Row="1"
HorizontalAlignment="Stretch"
Fill="{StaticResource Brush.Border0}"/>
<!-- Body -->
<Grid Grid.Row="1" Margin="16,8">
<Grid Grid.Row="2" Margin="16,8">
<Grid.RowDefinitions>
<RowDefinition Height="36"/>
<RowDefinition Height="28"/>