* UIForm: 修复最大化盖住任务栏的问题,感谢MIAIONE

This commit is contained in:
Sunny 2021-08-04 09:59:53 +08:00
parent dcee3e9960
commit 0aad9b54ee
5 changed files with 2 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -44,7 +44,7 @@ namespace Sunny.UI
public UIForm() public UIForm()
{ {
base.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);//设置最大化尺寸 base.MaximizedBounds = Screen.PrimaryScreen.WorkingArea;//设置最大化尺寸
InitializeComponent(); InitializeComponent();
if (this.Register()) if (this.Register())
@ -1106,7 +1106,6 @@ namespace Sunny.UI
protected override void OnLocationChanged(EventArgs e) protected override void OnLocationChanged(EventArgs e)
{ {
base.OnLocationChanged(e); base.OnLocationChanged(e);
List<UIPage> pages = this.GetControls<UIPage>(true); List<UIPage> pages = this.GetControls<UIPage>(true);
foreach (var page in pages) foreach (var page in pages)
{ {
@ -1116,6 +1115,7 @@ namespace Sunny.UI
protected override void OnSizeChanged(EventArgs e) protected override void OnSizeChanged(EventArgs e)
{ {
base.MaximizedBounds = Screen.PrimaryScreen.WorkingArea;//设置最大化尺寸
base.OnSizeChanged(e); base.OnSizeChanged(e);
CalcSystemBoxPos(); CalcSystemBoxPos();