This commit is contained in:
Sunny 2022-06-27 17:36:58 +08:00
parent 77a3b86e4b
commit 2d8daa6d2b
3 changed files with 5 additions and 1 deletions

View File

@ -221,7 +221,7 @@ namespace Sunny.UI
{ {
if (FillColorGradient) if (FillColorGradient)
{ {
if (IsHover || IsPress || Selected) if (IsHover || IsPress || Selected || Disabled)
{ {
base.OnPaintFill(g, path); base.OnPaintFill(g, path);
} }

View File

@ -49,6 +49,8 @@ namespace Sunny.UI
base.MinimumSize = new Size(1, 1); base.MinimumSize = new Size(1, 1);
} }
public bool Disabled => !Enabled;
/// <summary> /// <summary>
/// 禁止控件跟随窗体缩放 /// 禁止控件跟随窗体缩放
/// </summary> /// </summary>

View File

@ -50,6 +50,8 @@ namespace Sunny.UI
SetStyleFlags(true, false); SetStyleFlags(true, false);
} }
public bool Disabled => !Enabled;
/// <summary> /// <summary>
/// 禁止控件跟随窗体缩放 /// 禁止控件跟随窗体缩放
/// </summary> /// </summary>