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(); } } }