* UIControl, UIPanel: 设置圆角的范围
This commit is contained in:
parent
f1e6fd0cb1
commit
f2a662cd73
Binary file not shown.
Binary file not shown.
@ -176,6 +176,7 @@ namespace Sunny.UI
|
|||||||
if (radius != value)
|
if (radius != value)
|
||||||
{
|
{
|
||||||
radius = Math.Max(0, value);
|
radius = Math.Max(0, value);
|
||||||
|
radius = Math.Min(radius, Math.Min(Width, Height));
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,6 +204,7 @@ namespace Sunny.UI
|
|||||||
if (radius != value)
|
if (radius != value)
|
||||||
{
|
{
|
||||||
radius = Math.Max(0, value);
|
radius = Math.Max(0, value);
|
||||||
|
radius = Math.Min(radius, Math.Min(Width, Height));
|
||||||
OnRadiusChanged(radius);
|
OnRadiusChanged(radius);
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user