* UINavMenu:显示子节点提示箭头
* UINavBar:显示子节点提示箭头
This commit is contained in:
parent
a1cce40881
commit
281cfbfd62
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -64,7 +64,25 @@ namespace Sunny.UI
|
||||
public int Radius
|
||||
{
|
||||
get => radius;
|
||||
set => radius = Math.Max(0, value);
|
||||
set
|
||||
{
|
||||
radius = Math.Max(0, value);
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private bool showItemsArrow = true;
|
||||
|
||||
[DefaultValue(true)]
|
||||
[Description("显示子节点提示箭头"), Category("SunnyUI")]
|
||||
public bool ShowItemsArrow
|
||||
{
|
||||
get => showItemsArrow;
|
||||
set
|
||||
{
|
||||
showItemsArrow = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnSizeChanged(EventArgs e)
|
||||
@ -465,7 +483,7 @@ namespace Sunny.UI
|
||||
e.Graphics.DrawString(node.Text, Font, textColor, NodeX + i * NodeSize.Width + (NodeSize.Width - sf.Width) / 2.0f, NodeY + (NodeSize.Height - sf.Height) / 2);
|
||||
}
|
||||
|
||||
if (node.Nodes.Count > 0)
|
||||
if (ShowItemsArrow && node.Nodes.Count > 0)
|
||||
{
|
||||
SizeF imageSize = e.Graphics.GetFontImageSize(61703, 24);
|
||||
if (i != SelectedIndex)
|
||||
|
@ -81,6 +81,20 @@ namespace Sunny.UI
|
||||
[Description("只显示一个打开的节点"), Category("SunnyUI")]
|
||||
public bool ShowOneNode { get; set; }
|
||||
|
||||
private bool showItemsArrow = true;
|
||||
|
||||
[DefaultValue(true)]
|
||||
[Description("显示子节点提示箭头"), Category("SunnyUI")]
|
||||
public bool ShowItemsArrow
|
||||
{
|
||||
get => showItemsArrow;
|
||||
set
|
||||
{
|
||||
showItemsArrow = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tag字符串
|
||||
/// </summary>
|
||||
@ -582,7 +596,7 @@ namespace Sunny.UI
|
||||
}
|
||||
}
|
||||
|
||||
if (e.Node.Nodes.Count > 0)
|
||||
if (ShowItemsArrow && e.Node.Nodes.Count > 0)
|
||||
{
|
||||
e.Graphics.DrawFontImage(e.Node.IsExpanded ? 61702 : 61703, 24, ForeColor, Width - (Bar.Visible ? 50 : 30), e.Bounds.Y + (ItemHeight - 24) / 2);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user