mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
UI Tweaks
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user