This commit is contained in:
TinyHerm committed 2026-11-24 23:40:08 +03:00
commit 1c7a8cf25f
579 files changed
+83196

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
using System.Drawing;
using System.Windows.Forms;
using VibranceHud.Design;
using VibranceHud.Theming;
namespace VibranceHud;
public sealed class GlowPanel : Panel
{
public IBackdrop? Field { get; set; }
public int Scrim { get; set; }
public GlowPanel()
{
SetStyle(ControlStyles.UserPaint | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, value: true);
BackColor = Color.Transparent;
}
protected override void OnPaint(PaintEventArgs e)
{
Graphics g = e.Graphics;
PaintGuard.Try(this, () =>
{
AppBackground.Paint(g, Left, Top);
Field?.Paint(g, Left, Top);
if (SlateSurface.Active)
{
Glass.PaintChrome(g, ClientRectangle, 0f, new Point(Left, Top));
return;
}
using SolidBrush brush = new SolidBrush(SignalTokens.Ash.Chrome);
g.FillRectangle(brush, ClientRectangle);
});
base.OnPaint(e);
}
}