* 修复UICombobox的Enabled = false 时的边框显示

This commit is contained in:
Sunny 2021-03-05 18:15:31 +08:00
parent dc7d50b983
commit a2933e301d
4 changed files with 18 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -70,7 +70,24 @@ namespace Sunny.UI
private void UIDropControl_PaintOther(object sender, PaintEventArgs e)
{
e.Graphics.DrawLine(RectColor, Width - 1, Radius, Width - 1, Height - Radius);
if (Enabled)
{
if (Radius == 0 || RadiusSides == UICornerRadiusSides.None)
e.Graphics.DrawRectangle(RectColor, 0, 0, Width - 1, Height - 1);
else
e.Graphics.DrawRoundRectangle(RectColor, 0, 0, Width, Height, Radius);
edit.BackColor = Color.White;
}
else
{
if (Radius == 0 || RadiusSides == UICornerRadiusSides.None)
e.Graphics.DrawRectangle(RectDisableColor, 0, 0, Width - 1, Height - 1);
else
e.Graphics.DrawRoundRectangle(RectDisableColor, 0, 0, Width, Height, Radius);
edit.BackColor = GetFillColor();
}
}
private void Edit_LostFocus(object sender, EventArgs e)
@ -401,8 +418,6 @@ namespace Sunny.UI
{
private string watermark;
[DefaultValue(null)]
public string Watermark
{