From 04f1137f96b6c380a9c77c1509573d5d40032bff Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 26 May 2021 16:03:05 +0800 Subject: [PATCH] style<*>: borders of all windows --- src/Resources/Themes/Dark.xaml | 4 +++- src/Resources/Themes/Light.xaml | 4 +++- src/Views/About.xaml | 11 +++++++++-- src/Views/Blame.xaml | 25 +++++++++++++++++-------- src/Views/Controls/WindowBorder.cs | 2 +- src/Views/Histories.xaml | 20 ++++++++++++++++---- src/Views/Launcher.xaml | 5 +++-- src/Views/Preference.xaml | 16 +++++++++++----- 8 files changed, 63 insertions(+), 24 deletions(-) diff --git a/src/Resources/Themes/Dark.xaml b/src/Resources/Themes/Dark.xaml index 05351961..05abc731 100644 --- a/src/Resources/Themes/Dark.xaml +++ b/src/Resources/Themes/Dark.xaml @@ -3,8 +3,10 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - + + + diff --git a/src/Resources/Themes/Light.xaml b/src/Resources/Themes/Light.xaml index 64ca8951..2f74d46f 100644 --- a/src/Resources/Themes/Light.xaml +++ b/src/Resources/Themes/Light.xaml @@ -3,8 +3,10 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - + + + diff --git a/src/Views/About.xaml b/src/Views/About.xaml index 578c83e0..74c16136 100644 --- a/src/Views/About.xaml +++ b/src/Views/About.xaml @@ -18,6 +18,7 @@ + @@ -46,9 +47,15 @@ HoverBackground="Red" WindowChrome.IsHitTestVisibleInChrome="True"/> - + + + - + @@ -19,6 +20,7 @@ + @@ -45,9 +47,16 @@ - - - + + + + + + @@ -61,7 +70,7 @@ - + - + diff --git a/src/Views/Controls/WindowBorder.cs b/src/Views/Controls/WindowBorder.cs index 85eec0b2..9b594a81 100644 --- a/src/Views/Controls/WindowBorder.cs +++ b/src/Views/Controls/WindowBorder.cs @@ -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); diff --git a/src/Views/Histories.xaml b/src/Views/Histories.xaml index 5b2831be..5182906b 100644 --- a/src/Views/Histories.xaml +++ b/src/Views/Histories.xaml @@ -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"> @@ -19,6 +22,7 @@ + @@ -44,9 +48,15 @@ - + + + - + @@ -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 @@ - + diff --git a/src/Views/Launcher.xaml b/src/Views/Launcher.xaml index 92ac7c49..14e336b4 100644 --- a/src/Views/Launcher.xaml +++ b/src/Views/Launcher.xaml @@ -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}" diff --git a/src/Views/Preference.xaml b/src/Views/Preference.xaml index e3fd8185..148cc368 100644 --- a/src/Views/Preference.xaml +++ b/src/Views/Preference.xaml @@ -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"> @@ -20,6 +20,7 @@ + @@ -47,9 +48,14 @@ HoverBackground="Red" WindowChrome.IsHitTestVisibleInChrome="True"/> - + + + - +