From 25f5fe5284be7dfdf80605f52e80b190e5706c92 Mon Sep 17 00:00:00 2001 From: Sunny Date: Sat, 20 Jul 2024 14:55:24 +0800 Subject: [PATCH] =?UTF-8?q?*=20UIForm2:=20=E4=BF=AE=E6=94=B9=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E5=8C=96=E6=97=B6=E6=8C=89=E9=92=AE=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Forms/UIForm2.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SunnyUI/Forms/UIForm2.cs b/SunnyUI/Forms/UIForm2.cs index 1389fc08..f43e8b93 100644 --- a/SunnyUI/Forms/UIForm2.cs +++ b/SunnyUI/Forms/UIForm2.cs @@ -22,6 +22,7 @@ * 2024-04-28: V3.6.5 增加WindowStateChanged事件 * 2024-05-16: V3.6.6 Resizable替代ShowDragStretch,显示边框可拖拽调整窗体大小 * 2024-06-08: V3.6.6 防止图标转换错误 + * 2024-07-20: V3.6.8 修改最大化时按钮位置 ******************************************************************************/ using System; @@ -338,6 +339,7 @@ namespace Sunny.UI private void ShowMaxOrNormal() { + Added = 16; if (!ShowFullScreen) { if (WindowState == FormWindowState.Maximized) @@ -406,6 +408,8 @@ namespace Sunny.UI Invalidate(); } + private int Added = 0; + protected override void CalcSystemBoxPos() { ControlBoxLeft = Width; @@ -414,7 +418,7 @@ namespace Sunny.UI { if (WindowState == FormWindowState.Maximized) { - ControlBoxRect = new Rectangle(Width - 6 - 28 - 16, titleHeight / 2 - 14, 28, 28); + ControlBoxRect = new Rectangle(Width - 6 - 28 - Added, titleHeight / 2 - 14, 28, 28); } else {