From 3ce56b3ed4f5720e642697fe9e3f60c2358eba0c Mon Sep 17 00:00:00 2001 From: Sunny Date: Thu, 16 Nov 2023 23:14:05 +0800 Subject: [PATCH] =?UTF-8?q?*=20=E9=87=8D=E6=9E=84=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Controls/UINavBar.cs | 11 +++-------- SunnyUI/Controls/UINavMenu.cs | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/SunnyUI/Controls/UINavBar.cs b/SunnyUI/Controls/UINavBar.cs index 1b16fda2..d0a0ba74 100644 --- a/SunnyUI/Controls/UINavBar.cs +++ b/SunnyUI/Controls/UINavBar.cs @@ -29,6 +29,7 @@ * 2023-05-16: V3.3.6 重构DrawFontImage函数 * 2023-10-17: V3.5.1 修正下拉菜单文字显示垂直居中 * 2023-10-17: V3.5.1 ImageList为空时,下拉菜单增加Symbol绘制 + * 2023-11-16: V3.5.2 重构主题 ******************************************************************************/ using System; @@ -278,17 +279,11 @@ namespace Sunny.UI if (selectedHighColor != value) { selectedHighColor = value; - SetStyleCustom(); + Invalidate(); } } } - private void SetStyleCustom(bool needRefresh = true) - { - _style = UIStyle.Custom; - if (needRefresh) Invalidate(); - } - private int selectedHighColorSize = 4; /// @@ -424,7 +419,7 @@ namespace Sunny.UI if (selectedForeColor != value) { selectedForeColor = value; - SetStyleCustom(); + Invalidate(); } } } diff --git a/SunnyUI/Controls/UINavMenu.cs b/SunnyUI/Controls/UINavMenu.cs index 8a5570fe..6a370b78 100644 --- a/SunnyUI/Controls/UINavMenu.cs +++ b/SunnyUI/Controls/UINavMenu.cs @@ -36,6 +36,7 @@ * 2023-05-12: V3.3.6 重构DrawString函数 * 2023-05-16: V3.3.6 重构DrawFontImage函数 * 2023-05-29: V3.3.7 增加PageGuid相关扩展方法 +* 2023-11-16: V3.5.2 重构主题 ******************************************************************************/ using System; @@ -426,7 +427,7 @@ namespace Sunny.UI set { selectedHighColor = value; - SetStyleCustom(); + Invalidate(); } } @@ -525,12 +526,6 @@ namespace Sunny.UI Invalidate(); } - private void SetStyleCustom(bool needRefresh = true) - { - _style = UIStyle.Custom; - if (needRefresh) Invalidate(); - } - private Color selectedForeColor = UIColor.Blue; [DefaultValue(typeof(Color), "80, 160, 255")] @@ -543,7 +538,7 @@ namespace Sunny.UI if (selectedForeColor != value) { selectedForeColor = value; - SetStyleCustom(); + Invalidate(); } } }