From c64bdddaf840ae050418fbb65badcf041c181c7a Mon Sep 17 00:00:00 2001 From: Sunny Date: Wed, 7 Aug 2024 11:31:00 +0800 Subject: [PATCH] =?UTF-8?q?*=20=E8=A7=A3=E5=86=B3=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Controls/UITreeView.cs | 4 ++-- SunnyUI/Forms/UIFormHelper.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SunnyUI/Controls/UITreeView.cs b/SunnyUI/Controls/UITreeView.cs index 5fd89677..5552b7ab 100644 --- a/SunnyUI/Controls/UITreeView.cs +++ b/SunnyUI/Controls/UITreeView.cs @@ -1363,12 +1363,12 @@ namespace Sunny.UI if (e.Node.IsExpanded) { e.Graphics.DrawFontImage(61703, 24, fcf, - new RectangleF(lineX - 12, lineY - 12, 24, 24), -1, 1); + new RectangleF(lineX - 12, lineY - 12, 24, 24), 1, 1); } else { e.Graphics.DrawFontImage(61701, 24, fcf, - new RectangleF(lineX - 12, lineY - 12, 24, 24), -2, 1); + new RectangleF(lineX - 12, lineY - 12, 24, 24), 0, 1); } } } diff --git a/SunnyUI/Forms/UIFormHelper.cs b/SunnyUI/Forms/UIFormHelper.cs index 329c16d1..9cd41c6d 100644 --- a/SunnyUI/Forms/UIFormHelper.cs +++ b/SunnyUI/Forms/UIFormHelper.cs @@ -164,7 +164,7 @@ namespace Sunny.UI //frm.StartPosition = FormStartPosition.CenterScreen; frm.StartPosition = FormStartPosition.Manual; - if (!centerParent || showMask) + if (!centerParent || showMask || form == null) { frm.Left = screen.Left + screen.Width / 2 - frm.Width / 2; frm.Top = screen.Top + screen.Height / 2 - frm.Height / 2; @@ -206,7 +206,7 @@ namespace Sunny.UI using UIMessageForm2 frm = new UIMessageForm2(title, message, noteType, defaultButton); if (frm != null) frm.Owner = form; frm.StartPosition = FormStartPosition.Manual; - if (!centerParent || showMask) + if (!centerParent || showMask || form == null) { frm.Left = screen.Left + screen.Width / 2 - frm.Width / 2; frm.Top = screen.Top + screen.Height / 2 - frm.Height / 2;