* UIControl: 修复Radius设置不能超过35的问题

This commit is contained in:
Sunny 2022-03-13 11:18:36 +08:00
parent 415773efac
commit 8d55eb44a7
3 changed files with 1 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -177,7 +177,6 @@ namespace Sunny.UI
if (radius != value)
{
radius = Math.Max(0, value);
radius = Math.Min(radius, Math.Min(Width, Height));
Invalidate();
}
}
@ -543,6 +542,7 @@ namespace Sunny.UI
/// <param name="path">路径</param>
protected virtual void OnPaintRect(Graphics g, GraphicsPath path)
{
radius = Math.Min(radius, Math.Min(Width, Height));
if (RadiusSides == UICornerRadiusSides.None || Radius == 0)
{
//IsRadius为False时显示左侧边线