mirror of
https://gitee.com/AntdUI/AntdUI.git
synced 2026-04-04 04:30:41 +08:00
🧙 Collapse Button 新增 Visible 属性,应用 Fore 文本色
This commit is contained in:
@@ -665,7 +665,7 @@ namespace AntdUI
|
||||
{
|
||||
foreach (var btn in item.buttons)
|
||||
{
|
||||
if (btn.Show == false) continue;
|
||||
if (btn.Show == false || btn.Visible==false) continue;
|
||||
if (btn.EditType != EButtonEditTypes.Switch)
|
||||
{
|
||||
if (btn.EditType == EButtonEditTypes.Input || btn.EditType == EButtonEditTypes.Custom) continue;
|
||||
@@ -691,7 +691,8 @@ namespace AntdUI
|
||||
}
|
||||
}
|
||||
if (btn.Icon != null) g.Image(btn.Icon, btn.ico_rect);
|
||||
if (btn.IconSvg != null) g.GetImgExtend(btn.IconSvg, btn.ico_rect, (btn.Select || btn.AnimationClick ? fore_active : fore).Color);
|
||||
|
||||
if (btn.IconSvg != null) g.GetImgExtend(btn.IconSvg, btn.ico_rect, btn.Select || btn.AnimationClick ? fore_active.Color : btn.Fore ?? fore.Color);
|
||||
g.String(btn.Text, Font, btn.Select || btn.AnimationClick ? fore_active : fore, btn.txt_rect, s_c);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -895,6 +895,22 @@ namespace AntdUI
|
||||
}
|
||||
}
|
||||
|
||||
bool visible = true;
|
||||
/// <summary>
|
||||
/// 是否可见
|
||||
/// </summary>
|
||||
[Description("是否可见"), Category("行为"), DefaultValue(true)]
|
||||
public bool Visible
|
||||
{
|
||||
get => visible;
|
||||
set
|
||||
{
|
||||
if (visible == value) return;
|
||||
visible = value;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
internal override bool Show { get => Visible; set => base.Show = Visible = value; }
|
||||
bool switchMode = false;
|
||||
//[Obsolete("请使用EditType")]
|
||||
[Browsable(false)]
|
||||
@@ -1400,7 +1416,7 @@ namespace AntdUI
|
||||
|
||||
}
|
||||
|
||||
internal bool Show { get; set; }
|
||||
internal virtual bool Show { get; set; }
|
||||
internal Rectangle rect { get; set; }
|
||||
|
||||
internal bool Contains(int x, int y, int sx, int sy)
|
||||
|
||||
Reference in New Issue
Block a user