* 重构主题

This commit is contained in:
Sunny 2023-11-16 23:14:05 +08:00
parent 7bab50e103
commit 3ce56b3ed4
2 changed files with 6 additions and 16 deletions

View File

@ -29,6 +29,7 @@
* 2023-05-16: V3.3.6 DrawFontImage函数 * 2023-05-16: V3.3.6 DrawFontImage函数
* 2023-10-17: V3.5.1 * 2023-10-17: V3.5.1
* 2023-10-17: V3.5.1 ImageList为空时Symbol绘制 * 2023-10-17: V3.5.1 ImageList为空时Symbol绘制
* 2023-11-16: V3.5.2
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -278,17 +279,11 @@ namespace Sunny.UI
if (selectedHighColor != value) if (selectedHighColor != value)
{ {
selectedHighColor = value; selectedHighColor = value;
SetStyleCustom(); Invalidate();
} }
} }
} }
private void SetStyleCustom(bool needRefresh = true)
{
_style = UIStyle.Custom;
if (needRefresh) Invalidate();
}
private int selectedHighColorSize = 4; private int selectedHighColorSize = 4;
/// <summary> /// <summary>
@ -424,7 +419,7 @@ namespace Sunny.UI
if (selectedForeColor != value) if (selectedForeColor != value)
{ {
selectedForeColor = value; selectedForeColor = value;
SetStyleCustom(); Invalidate();
} }
} }
} }

View File

@ -36,6 +36,7 @@
* 2023-05-12: V3.3.6 DrawString函数 * 2023-05-12: V3.3.6 DrawString函数
* 2023-05-16: V3.3.6 DrawFontImage函数 * 2023-05-16: V3.3.6 DrawFontImage函数
* 2023-05-29: V3.3.7 PageGuid相关扩展方法 * 2023-05-29: V3.3.7 PageGuid相关扩展方法
* 2023-11-16: V3.5.2
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -426,7 +427,7 @@ namespace Sunny.UI
set set
{ {
selectedHighColor = value; selectedHighColor = value;
SetStyleCustom(); Invalidate();
} }
} }
@ -525,12 +526,6 @@ namespace Sunny.UI
Invalidate(); Invalidate();
} }
private void SetStyleCustom(bool needRefresh = true)
{
_style = UIStyle.Custom;
if (needRefresh) Invalidate();
}
private Color selectedForeColor = UIColor.Blue; private Color selectedForeColor = UIColor.Blue;
[DefaultValue(typeof(Color), "80, 160, 255")] [DefaultValue(typeof(Color), "80, 160, 255")]
@ -543,7 +538,7 @@ namespace Sunny.UI
if (selectedForeColor != value) if (selectedForeColor != value)
{ {
selectedForeColor = value; selectedForeColor = value;
SetStyleCustom(); Invalidate();
} }
} }
} }