mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
ux: bottom corner for launcher page tab
This commit is contained in:
parent
3ba027bd16
commit
705f6537af
1 changed files with 10 additions and 10 deletions
|
@ -47,13 +47,13 @@ namespace SourceGit.Views
|
||||||
var selected = LauncherTabsList.ContainerFromIndex(selectedIdx);
|
var selected = LauncherTabsList.ContainerFromIndex(selectedIdx);
|
||||||
var activeStartX = selected.Bounds.X;
|
var activeStartX = selected.Bounds.X;
|
||||||
var activeEndX = activeStartX + selected.Bounds.Width;
|
var activeEndX = activeStartX + selected.Bounds.Width;
|
||||||
if (activeStartX > endX + 6 || activeEndX < startX - 6)
|
if (activeStartX > endX + 5 || activeEndX < startX - 5)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var geo = new StreamGeometry();
|
var geo = new StreamGeometry();
|
||||||
var angle = Math.PI / 2;
|
var angle = Math.PI / 2;
|
||||||
var x = 0.0;
|
var x = 0.0;
|
||||||
var y = height + 0.5;
|
var y = height + 0.25;
|
||||||
using (var ctx = geo.Open())
|
using (var ctx = geo.Open())
|
||||||
{
|
{
|
||||||
var drawLeftX = activeStartX - startX + LauncherTabsScroller.Bounds.X;
|
var drawLeftX = activeStartX - startX + LauncherTabsScroller.Bounds.X;
|
||||||
|
@ -68,11 +68,11 @@ namespace SourceGit.Views
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x = drawLeftX - 6;
|
x = drawLeftX - 5;
|
||||||
ctx.BeginFigure(new Point(x, y), true);
|
ctx.BeginFigure(new Point(x, y), true);
|
||||||
x = drawLeftX;
|
x = drawLeftX;
|
||||||
y -= 6;
|
y -= 5;
|
||||||
ctx.ArcTo(new Point(x, y), new Size(6.5, 6.5), angle, false, SweepDirection.CounterClockwise);
|
ctx.ArcTo(new Point(x, y), new Size(5, 5), angle, false, SweepDirection.CounterClockwise);
|
||||||
y = 6;
|
y = 6;
|
||||||
ctx.LineTo(new Point(x, y));
|
ctx.LineTo(new Point(x, y));
|
||||||
x += 6;
|
x += 6;
|
||||||
|
@ -87,17 +87,17 @@ namespace SourceGit.Views
|
||||||
x = drawRightX;
|
x = drawRightX;
|
||||||
y = 6;
|
y = 6;
|
||||||
ctx.ArcTo(new Point(x, y), new Size(6, 6), angle, false, SweepDirection.Clockwise);
|
ctx.ArcTo(new Point(x, y), new Size(6, 6), angle, false, SweepDirection.Clockwise);
|
||||||
y = height - 6;
|
y = height + 0.25 - 5;
|
||||||
ctx.LineTo(new Point(x, y));
|
ctx.LineTo(new Point(x, y));
|
||||||
x += 6;
|
x += 5;
|
||||||
y = height + 0.5;
|
y = height + 0.25;
|
||||||
ctx.ArcTo(new Point(x, y), new Size(6.5, 6.5), angle, false, SweepDirection.CounterClockwise);
|
ctx.ArcTo(new Point(x, y), new Size(5, 5), angle, false, SweepDirection.CounterClockwise);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x = LauncherTabsScroller.Bounds.Right;
|
x = LauncherTabsScroller.Bounds.Right;
|
||||||
ctx.LineTo(new Point(x, y));
|
ctx.LineTo(new Point(x, y));
|
||||||
y = height + 0.5;
|
y = height + 0.25;
|
||||||
ctx.LineTo(new Point(x, y));
|
ctx.LineTo(new Point(x, y));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue