* UIForm2: 修改最大化时按钮位置

This commit is contained in:
Sunny 2024-07-20 14:55:24 +08:00
parent c5bc2c04e0
commit 25f5fe5284

View File

@ -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
{