UI Tweaks

This commit is contained in:
Serge
2024-08-31 10:42:43 +02:00
parent 3dbbddfa58
commit 01cede58b5
2 changed files with 28 additions and 0 deletions

View File

@@ -52,6 +52,16 @@ namespace GHelper.UI
}
}
private bool badge = false;
public bool Badge
{
get { return badge; }
set
{
badge = value;
}
}
public RButton()
{
DoubleBuffered = true;
@@ -99,6 +109,16 @@ namespace GHelper.UI
pevent.Graphics.DrawPath(penBorder, pathBorder);
}
if (badge)
{
using (Brush brush = new SolidBrush(borderColor))
{
var radius = ratio * 10;
var padding = ratio * 10;
pevent.Graphics.FillEllipse(brush, rectSurface.Width - padding - (2 * radius), padding, radius + radius, radius + radius);
}
}
if (!Enabled && ForeColor != SystemColors.ControlText)
{
var rect = pevent.ClipRectangle;