* UITitlePanel:更新大小调整后的按钮位置
This commit is contained in:
parent
28ace61ad3
commit
6a47388f74
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.
@ -341,7 +341,7 @@ namespace Sunny.UI
|
||||
|
||||
protected override void OnMouseWheel(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseWheel(e);
|
||||
/* base.OnMouseWheel(e);
|
||||
if (Bar.Visible)
|
||||
{
|
||||
var si = ScrollBarInfo.GetInfo(Handle);
|
||||
@ -359,7 +359,7 @@ namespace Sunny.UI
|
||||
ScrollBarInfo.ScrollDown(Handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
SetScrollInfo();
|
||||
}
|
||||
|
@ -233,6 +233,8 @@ namespace Sunny.UI
|
||||
|
||||
private bool collapsed;
|
||||
private int rowHeight = 180;
|
||||
private bool resizing;
|
||||
|
||||
|
||||
[Description("是否缩放"), Category("SunnyUI"), DefaultValue(false)]
|
||||
public bool Collapsed
|
||||
@ -242,8 +244,9 @@ namespace Sunny.UI
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
rowHeight = Height;
|
||||
resizing = true;
|
||||
Height = TitleHeight;
|
||||
resizing = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -257,12 +260,32 @@ namespace Sunny.UI
|
||||
|
||||
protected override void OnMouseClick(MouseEventArgs e)
|
||||
{
|
||||
base.OnMouseClick(e);
|
||||
|
||||
if (ShowCollapse && e.Location.InRect(ControlBoxRect))
|
||||
{
|
||||
Collapsed = !Collapsed;
|
||||
}
|
||||
|
||||
base.OnMouseClick(e);
|
||||
}
|
||||
|
||||
protected override void OnSizeChanged(EventArgs e)
|
||||
{
|
||||
base.OnSizeChanged(e);
|
||||
CalcSystemBoxPos();
|
||||
if (!resizing)
|
||||
{
|
||||
rowHeight = Height;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnMouseDoubleClick(MouseEventArgs e)
|
||||
{
|
||||
if (ShowCollapse && e.Location.Y <= TitleHeight)
|
||||
{
|
||||
Collapsed = !Collapsed;
|
||||
}
|
||||
|
||||
base.OnMouseDoubleClick(e);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user