From af875b9ed0041b522bcd063a6814aaeccf9d2784 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 1 Apr 2021 17:31:15 +0800 Subject: [PATCH] style<*>: flat style without dropshadow effects for toolbar and tabs --- src/Helpers/ChromeTabShape.cs | 38 --------------------------------- src/Resources/Themes/Dark.xaml | 4 +++- src/Resources/Themes/Light.xaml | 6 ++++-- src/UI/Dashboard.xaml | 15 ++++++------- src/UI/Launcher.xaml | 35 ++++++++++++------------------ src/UI/PopupManager.xaml | 12 +++-------- 6 files changed, 30 insertions(+), 80 deletions(-) delete mode 100644 src/Helpers/ChromeTabShape.cs diff --git a/src/Helpers/ChromeTabShape.cs b/src/Helpers/ChromeTabShape.cs deleted file mode 100644 index 1c6344ed..00000000 --- a/src/Helpers/ChromeTabShape.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Media; -using System.Windows.Shapes; - -namespace SourceGit.Helpers { - - /// - /// Chrome like tab shape - /// - public class ChromeTabShape : Shape { - protected override Geometry DefiningGeometry => MakeGeometry(); - - public ChromeTabShape() { - Stretch = Stretch.None; - StrokeThickness = 0; - } - - private Geometry MakeGeometry() { - var geo = new StreamGeometry(); - var cornerSize = new Size(4, 4); - var cornerAngle = Math.PI / 2; - using (var ctx = geo.Open()) { - ctx.BeginFigure(new Point(-5, ActualHeight), true, true); - ctx.ArcTo(new Point(-1, ActualHeight - 4), cornerSize, cornerAngle, false, SweepDirection.Counterclockwise, false, true); - ctx.LineTo(new Point(-1, 4), false, true); - ctx.ArcTo(new Point(3, 0), cornerSize, cornerAngle, false, SweepDirection.Clockwise, false, true); - ctx.LineTo(new Point(ActualWidth - 4, 0), false, true); - ctx.ArcTo(new Point(ActualWidth, 4), cornerSize, cornerAngle, false, SweepDirection.Clockwise, false, true); - ctx.LineTo(new Point(ActualWidth, ActualHeight - 4), false, true); - ctx.ArcTo(new Point(ActualWidth + 4, ActualHeight), cornerSize, cornerAngle, false, SweepDirection.Counterclockwise, false, true); - } - - geo.Freeze(); - return geo; - } - } -} diff --git a/src/Resources/Themes/Dark.xaml b/src/Resources/Themes/Dark.xaml index f3a3c371..51715fd6 100644 --- a/src/Resources/Themes/Dark.xaml +++ b/src/Resources/Themes/Dark.xaml @@ -14,11 +14,13 @@ - + + + diff --git a/src/Resources/Themes/Light.xaml b/src/Resources/Themes/Light.xaml index 41c4a89a..8193468f 100644 --- a/src/Resources/Themes/Light.xaml +++ b/src/Resources/Themes/Light.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - + @@ -14,11 +14,13 @@ - + + + diff --git a/src/UI/Dashboard.xaml b/src/UI/Dashboard.xaml index e85c2064..902e63f6 100644 --- a/src/UI/Dashboard.xaml +++ b/src/UI/Dashboard.xaml @@ -26,17 +26,12 @@ + - - - - - - @@ -112,9 +107,11 @@ - + + + - + @@ -533,6 +530,6 @@ - + diff --git a/src/UI/Launcher.xaml b/src/UI/Launcher.xaml index 7f98b858..22cfe346 100644 --- a/src/UI/Launcher.xaml +++ b/src/UI/Launcher.xaml @@ -53,11 +53,10 @@ - - - - - + @@ -67,7 +66,7 @@ - +