* UIForm:修改标题栏按钮背景色刷新
This commit is contained in:
parent
7e521f596d
commit
d0143bc63c
BIN
Bin/SunnyUI.dll
BIN
Bin/SunnyUI.dll
Binary file not shown.
BIN
Bin/SunnyUI.pdb
BIN
Bin/SunnyUI.pdb
Binary file not shown.
Binary file not shown.
@ -664,23 +664,30 @@ namespace Sunny.UI
|
||||
if (FormBorderStyle == FormBorderStyle.None)
|
||||
{
|
||||
bool inControlBox = e.Location.InRect(ControlBoxRect);
|
||||
bool inMaxBox = e.Location.InRect(MaximizeBoxRect);
|
||||
bool inMinBox = e.Location.InRect(MinimizeBoxRect);
|
||||
bool isChange = false;
|
||||
|
||||
if (inControlBox != InControlBox)
|
||||
{
|
||||
InControlBox = inControlBox;
|
||||
Invalidate();
|
||||
isChange = true;
|
||||
}
|
||||
|
||||
bool inMaxBox = e.Location.InRect(MaximizeBoxRect);
|
||||
if (inMaxBox != InMaxBox)
|
||||
{
|
||||
InMaxBox = inMaxBox;
|
||||
Invalidate();
|
||||
isChange = true;
|
||||
}
|
||||
|
||||
bool inMinBox = e.Location.InRect(MinimizeBoxRect);
|
||||
if (inMinBox != InMinBox)
|
||||
{
|
||||
InMinBox = inMinBox;
|
||||
isChange = true;
|
||||
}
|
||||
|
||||
if (isChange)
|
||||
{
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
@ -691,6 +698,13 @@ namespace Sunny.UI
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseLeave(EventArgs e)
|
||||
{
|
||||
base.OnMouseLeave(e);
|
||||
InControlBox = InMaxBox = InMinBox = false;
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
private bool InControlBox, InMaxBox, InMinBox;
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user