mirror of
https://github.com/seriocomedy/ShiftOS-C-.git
synced 2025-01-23 01:22:16 +00:00
Fix window border bug, add skinnable VisualStyleBorders
This commit is contained in:
parent
d40fed5ce2
commit
995b1404e0
4 changed files with 5 additions and 1 deletions
|
@ -18,6 +18,8 @@ public abstract class Skin
|
|||
|
||||
#region Global
|
||||
public string DefaultFont = "Microsoft Sans Serif";
|
||||
public Color VisualStyleBorderColor = Color.Black;
|
||||
public int VisualStyleBorderWidth = 2;
|
||||
public int DefaultFontSize = 9;
|
||||
public FontStyle DefaultFontStyle = FontStyle.Regular;
|
||||
public Color WindowBackColor = Color.Gray;
|
||||
|
|
|
@ -7935,7 +7935,7 @@ public override void CPDrawStringDisabled(IDeviceContext dc, string s, Font font
|
|||
|
||||
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,
|
||||
|
|
|
@ -1089,6 +1089,7 @@ public static void CreateForm(Form formToCreate, string AppName, Image AppIcon)
|
|||
brdr.Dock = DockStyle.Fill;
|
||||
formToCreate.Body.BorderStyle = BorderStyle.None;
|
||||
brdr.setupall();
|
||||
formToCreate.FormBorderStyle = FormBorderStyle.None;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -192,6 +192,7 @@ private void InitializeComponent()
|
|||
// imgtypes
|
||||
//
|
||||
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(1, "package");
|
||||
//this.imgtypes.Images.SetKeyName(2, "none");
|
||||
|
|
Loading…
Reference in a new issue