更新基类

This commit is contained in:
Sunny 2022-02-16 15:39:32 +08:00
parent cee61dd7cb
commit 1ded23bba0
2 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@ -401,6 +401,8 @@ namespace Sunny.UI
color = rectSelectedColor;
if (ShowFocusColor && Focused)
color = rectPressColor;
if (isReadOnly)
color = rectReadOnlyColor;
return Enabled ? color : rectDisableColor;
}
@ -412,6 +414,8 @@ namespace Sunny.UI
set;
}
protected bool isReadOnly;
/// <summary>
/// 获取字体颜色
/// </summary>
@ -428,6 +432,8 @@ namespace Sunny.UI
color = foreSelectedColor;
if (ShowFocusColor && Focused)
color = forePressColor;
if (isReadOnly)
color = foreReadOnlyColor;
return Enabled ? color : foreDisableColor;
}
@ -447,6 +453,8 @@ namespace Sunny.UI
color = fillSelectedColor;
if (ShowFocusColor && Focused)
color = fillPressColor;
if (isReadOnly)
color = fillReadOnlyColor;
return Enabled ? color : fillDisableColor;
}