diff --git a/StoicGoose/StoicGoose.csproj b/StoicGoose/StoicGoose.csproj index e642fe4..a544cb9 100644 --- a/StoicGoose/StoicGoose.csproj +++ b/StoicGoose/StoicGoose.csproj @@ -9,7 +9,7 @@ - 0.3.0 + 0.4.0 xdaniel Written 2021 by xdaniel diff --git a/StoicGoose/WinForms/Controls/LabelEx.cs b/StoicGoose/WinForms/Controls/LabelEx.cs index ec65d8e..b315ab2 100644 --- a/StoicGoose/WinForms/Controls/LabelEx.cs +++ b/StoicGoose/WinForms/Controls/LabelEx.cs @@ -24,7 +24,7 @@ protected override void OnPaint(PaintEventArgs e) case ContentAlignment.TopRight: flags |= TextFormatFlags.Top | TextFormatFlags.Right; break; } var rect = e.ClipRectangle; - rect.Offset(-4, -2); + rect.Offset(-2, -2); TextRenderer.DrawText(e.Graphics, Text, Font, rect, ForeColor, flags); } } diff --git a/StoicGoose/WinForms/Controls/TableLayoutPanelEx.cs b/StoicGoose/WinForms/Controls/TableLayoutPanelEx.cs index 76c9fbd..f9fa892 100644 --- a/StoicGoose/WinForms/Controls/TableLayoutPanelEx.cs +++ b/StoicGoose/WinForms/Controls/TableLayoutPanelEx.cs @@ -1,5 +1,4 @@ using System; -using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -13,7 +12,7 @@ public class TableLayoutPanelEx : TableLayoutPanel protected override void OnHandleCreated(EventArgs e) { if (!DesignMode && Environment.OSVersion?.Platform == PlatformID.Win32NT && Environment.OSVersion?.Version.Major >= 6) - Debug.Assert(SetWindowTheme(Handle, "explorer", null) == 0); + _ = SetWindowTheme(Handle, "explorer", null); base.OnHandleCreated(e); } diff --git a/StoicGoose/WinForms/Controls/TreeViewEx.cs b/StoicGoose/WinForms/Controls/TreeViewEx.cs index dc4c756..c12a6ac 100644 --- a/StoicGoose/WinForms/Controls/TreeViewEx.cs +++ b/StoicGoose/WinForms/Controls/TreeViewEx.cs @@ -1,5 +1,4 @@ using System; -using System.Diagnostics; using System.Runtime.InteropServices; using System.Windows.Forms; @@ -13,7 +12,7 @@ public class TreeViewEx : TreeView protected override void OnHandleCreated(EventArgs e) { if (!DesignMode && Environment.OSVersion?.Platform == PlatformID.Win32NT && Environment.OSVersion?.Version.Major >= 6) - Debug.Assert(SetWindowTheme(Handle, "explorer", null) == 0); + _ = SetWindowTheme(Handle, "explorer", null); base.OnHandleCreated(e); }