mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
UI tweaks, mid fan support
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Win32;
|
||||
using GHelper;
|
||||
using Microsoft.Win32;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -19,7 +20,7 @@ namespace CustomControls
|
||||
[DllImport("DwmApi")] //System.Runtime.InteropServices
|
||||
private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, int[] attrValue, int attrSize);
|
||||
|
||||
public bool darkTheme = false;
|
||||
public bool darkTheme;
|
||||
|
||||
private static bool IsDarkTheme()
|
||||
{
|
||||
@@ -39,8 +40,12 @@ namespace CustomControls
|
||||
if (setDPI)
|
||||
ControlHelper.Resize(this);
|
||||
|
||||
DwmSetWindowAttribute(this.Handle, 20, new[] { darkTheme ? 1 : 0 }, 4);
|
||||
ControlHelper.Adjust(this, darkTheme, changed);
|
||||
if (changed)
|
||||
{
|
||||
DwmSetWindowAttribute(this.Handle, 20, new[] { darkTheme ? 1 : 0 }, 4);
|
||||
ControlHelper.Adjust(this, darkTheme, changed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -235,13 +240,18 @@ namespace CustomControls
|
||||
{
|
||||
//Fields
|
||||
private int borderSize = 5;
|
||||
|
||||
private int borderRadius = 5;
|
||||
|
||||
private bool activated = false;
|
||||
private bool secondary = false;
|
||||
public int BorderRadius
|
||||
{
|
||||
get { return borderRadius; }
|
||||
set
|
||||
{
|
||||
borderRadius = value;
|
||||
}
|
||||
}
|
||||
|
||||
private Color borderColor = Color.Transparent;
|
||||
|
||||
public Color BorderColor
|
||||
{
|
||||
get { return borderColor; }
|
||||
@@ -252,6 +262,7 @@ namespace CustomControls
|
||||
}
|
||||
|
||||
|
||||
private bool activated = false;
|
||||
public bool Activated
|
||||
{
|
||||
get { return activated; }
|
||||
@@ -264,6 +275,7 @@ namespace CustomControls
|
||||
}
|
||||
}
|
||||
|
||||
private bool secondary = false;
|
||||
public bool Secondary
|
||||
{
|
||||
get { return secondary; }
|
||||
|
||||
Reference in New Issue
Block a user