* UIDoubleUpDown: 可以设置按钮大小和颜色

This commit is contained in:
Sunny 2022-02-21 17:13:42 +08:00
parent f13b5f4aba
commit 5f22cc40c4
2 changed files with 29 additions and 0 deletions

View File

@ -22,6 +22,7 @@
* 2020-12-10: V3.0.9 Readonly属性
* 2022-01-28: V3.1.0 00
* 2022-02-07: V3.1.0
* 2022-02-24: V3.1.1
******************************************************************************/
using System;
@ -335,5 +336,32 @@ namespace Sunny.UI
if (Height < UIGlobal.EditorMinHeight) Height = UIGlobal.EditorMinHeight;
if (Height > UIGlobal.EditorMaxHeight) Height = UIGlobal.EditorMaxHeight;
}
protected override void AfterSetRectColor(Color color)
{
base.AfterSetRectColor(color);
if (btnAdd == null || btnDec == null) return;
btnAdd.FillColor = btnDec.FillColor = color;
btnAdd.RectColor = btnDec.RectColor = color;
}
protected override void AfterSetFillColor(Color color)
{
base.AfterSetFillColor(color);
if (pnlValue == null) return;
pnlValue.FillColor = color;
}
private int buttonWidth = 29;
public int ButtonWidth
{
get => buttonWidth;
set
{
buttonWidth = Math.Max(value, 29);
if (btnAdd == null || btnDec == null) return;
btnAdd.Width = btnDec.Width = buttonWidth;
}
}
}
}

View File

@ -21,6 +21,7 @@
* 2020-08-14: V2.2.7
* 2020-12-10: V3.0.9 Readonly属性
* 2022-02-07: V3.1.0
* 2022-02-24: V3.1.1
******************************************************************************/
using System;