style<Launcher>: style of separator between tabs in titlebar

This commit is contained in:
leo 2021-01-07 09:40:51 +08:00
parent 9daaa5907d
commit 5f50703f74
2 changed files with 11 additions and 10 deletions

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Shapes;
@ -21,14 +21,14 @@ namespace SourceGit.Helpers {
var cornerSize = new Size(4, 4);
var cornerAngle = Math.PI / 2;
using (var ctx = geo.Open()) {
ctx.BeginFigure(new Point(-5.1, ActualHeight), true, true);
ctx.ArcTo(new Point(-1.1, ActualHeight - 4), cornerSize, cornerAngle, false, SweepDirection.Counterclockwise, false, true);
ctx.LineTo(new Point(-1.1, 4), false, true);
ctx.ArcTo(new Point(2.9, 0), cornerSize, cornerAngle, false, SweepDirection.Clockwise, false, true);
ctx.LineTo(new Point(ActualWidth - 2.9, 0), false, true);
ctx.ArcTo(new Point(ActualWidth + 1.1, 4), cornerSize, cornerAngle, false, SweepDirection.Clockwise, false, true);
ctx.LineTo(new Point(ActualWidth + 1.1, ActualHeight - 4), false, true);
ctx.ArcTo(new Point(ActualWidth + 5.1, ActualHeight), cornerSize, cornerAngle, false, SweepDirection.Counterclockwise, false, true);
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();

View file

@ -194,7 +194,8 @@
<Rectangle
x:Name="Splitter"
HorizontalAlignment="Right"
HorizontalAlignment="Right"
Margin="0,0,-1,0"
Width="1" Height="16"
Fill="{StaticResource Brush.FG2}"
Visibility="Hidden"/>