UI Tweaks

This commit is contained in:
Serge
2024-02-07 12:40:30 +01:00
parent 5875c1ed2c
commit b879a4f83f
4 changed files with 42 additions and 6 deletions

View File

@@ -29,6 +29,16 @@ namespace GHelper.UI
public bool darkTheme = false;
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
return cp;
}
}
public static void InitColors(bool darkTheme)
{
if (darkTheme)
@@ -98,8 +108,10 @@ namespace GHelper.UI
{
DwmSetWindowAttribute(Handle, 20, new[] { darkTheme ? 1 : 0 }, 4);
ControlHelper.Adjust(this, changed);
this.Invalidate();
}
return changed;
}