Fix window border bug, add skinnable VisualStyleBorders

This commit is contained in:
MichaelTheShifter 2016-07-20 10:04:18 -04:00
parent d40fed5ce2
commit 995b1404e0
4 changed files with 5 additions and 1 deletions

View file

@ -18,6 +18,8 @@ public abstract class Skin
#region Global #region Global
public string DefaultFont = "Microsoft Sans Serif"; public string DefaultFont = "Microsoft Sans Serif";
public Color VisualStyleBorderColor = Color.Black;
public int VisualStyleBorderWidth = 2;
public int DefaultFontSize = 9; public int DefaultFontSize = 9;
public FontStyle DefaultFontStyle = FontStyle.Regular; public FontStyle DefaultFontStyle = FontStyle.Regular;
public Color WindowBackColor = Color.Gray; public Color WindowBackColor = Color.Gray;

View file

@ -7935,7 +7935,7 @@ public override void CPDrawStringDisabled(IDeviceContext dc, string s, Font font
public override void CPDrawVisualStyleBorder(Graphics graphics, Rectangle bounds) public override void CPDrawVisualStyleBorder(Graphics graphics, Rectangle bounds)
{ {
graphics.DrawRectangle(SystemPens.ControlDarkDark, bounds); graphics.DrawRectangle(new System.Drawing.Pen(new SolidBrush(Application.CurrentSkin.VisualStyleBorderColor), Application.CurrentSkin.VisualStyleBorderWidth), bounds);
} }
private static void DrawBorderInternal(Graphics graphics, int startX, int startY, int endX, int endY, private static void DrawBorderInternal(Graphics graphics, int startX, int startY, int endX, int endY,

View file

@ -1089,6 +1089,7 @@ public static void CreateForm(Form formToCreate, string AppName, Image AppIcon)
brdr.Dock = DockStyle.Fill; brdr.Dock = DockStyle.Fill;
formToCreate.Body.BorderStyle = BorderStyle.None; formToCreate.Body.BorderStyle = BorderStyle.None;
brdr.setupall(); brdr.setupall();
formToCreate.FormBorderStyle = FormBorderStyle.None;
} }
/// <summary> /// <summary>

View file

@ -192,6 +192,7 @@ private void InitializeComponent()
// imgtypes // imgtypes
// //
this.imgtypes.TransparentColor = System.Drawing.Color.Transparent; this.imgtypes.TransparentColor = System.Drawing.Color.Transparent;
this.imgtypes.ImageSize = new System.Drawing.Size(48, 48);
//this.imgtypes.Images.SetKeyName(0, "application"); //this.imgtypes.Images.SetKeyName(0, "application");
//this.imgtypes.Images.SetKeyName(1, "package"); //this.imgtypes.Images.SetKeyName(1, "package");
//this.imgtypes.Images.SetKeyName(2, "none"); //this.imgtypes.Images.SetKeyName(2, "none");