Skip to content

Commit

Permalink
cross pointer shadow minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GabeMx5 committed Jul 21, 2024
1 parent b985c99 commit d5db254
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions LaserGRBL/UserControls/GrblPanel3D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -831,9 +831,15 @@ private void DoGDIDraw(PaintEventArgs e)
mMousePos.Value.Y >= mPadding.Top &&
mMousePos.Value.Y <= Height - mPadding.Bottom)
{
using (Pen pCross = new Pen(ColorScheme.PreviewBackColor))
Color loShadowColor = Color.FromArgb(
128,
ColorScheme.PreviewBackColor.R,
ColorScheme.PreviewBackColor.G,
ColorScheme.PreviewBackColor.B
);
using (Pen pCross = new Pen(loShadowColor))
{
DrawCross(e.Graphics, pCross, new Point(mMousePos.Value.X - 1, mMousePos.Value.Y - 1));
DrawCross(e.Graphics, pCross, new Point(mMousePos.Value.X + 1, mMousePos.Value.Y + 1));
}
using (Pen pCross = new Pen(ColorScheme.PreviewCrossCursor))
{
Expand All @@ -851,7 +857,7 @@ private void DoGDIDraw(PaintEventArgs e)

private void DrawCross(Graphics g, Pen pCross, Point point)
{
const int halfCrossSize = 4;
const int halfCrossSize = 4;
g.DrawLine(pCross, new Point(mPadding.Left, point.Y), new Point(point.X - 5, point.Y));
g.DrawLine(pCross, new Point(point.X + halfCrossSize, point.Y), new Point(Width - mPadding.Right, point.Y));
g.DrawLine(pCross, new Point(point.X, mPadding.Top), new Point(point.X, point.Y - halfCrossSize));
Expand Down

0 comments on commit d5db254

Please sign in to comment.