UIDropControl支持左padding
This commit is contained in:
parent
620bd8cf7e
commit
abd32c20bd
@ -48,6 +48,7 @@ namespace Sunny.UI
|
||||
{
|
||||
InitializeComponent();
|
||||
SetStyleFlags();
|
||||
Padding = new Padding(0, 0, 0, 0);
|
||||
|
||||
edit.Font = UIFontColor.Font;
|
||||
edit.Left = 3;
|
||||
@ -266,6 +267,12 @@ namespace Sunny.UI
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
protected override void OnPaddingChanged(EventArgs e)
|
||||
{
|
||||
base.OnPaddingChanged(e);
|
||||
SizeChange();
|
||||
}
|
||||
|
||||
protected override void OnSizeChanged(EventArgs e)
|
||||
{
|
||||
SizeChange();
|
||||
@ -280,8 +287,8 @@ namespace Sunny.UI
|
||||
edt.Dispose();
|
||||
|
||||
edit.Top = (Height - edit.Height) / 2;
|
||||
edit.Left = 3;
|
||||
edit.Width = Width - 30;
|
||||
edit.Left = 3 + Padding.Left;
|
||||
edit.Width = Width - 30 - Padding.Left;
|
||||
}
|
||||
|
||||
protected override void OnPaintFore(Graphics g, GraphicsPath path)
|
||||
@ -295,7 +302,7 @@ namespace Sunny.UI
|
||||
g.DrawRoundRectangle(rectColor, new Rectangle(0, 0, Width, Height), Radius, true);
|
||||
}
|
||||
|
||||
Padding = new Padding(0, 0, 30, 2);
|
||||
Padding = new Padding(Padding.Left, 0, 30, 2);
|
||||
g.FillRoundRectangle(GetFillColor(), new Rectangle(Width - 27, edit.Top, 25, edit.Height), Radius);
|
||||
Color color = GetRectColor();
|
||||
SizeF sf = g.GetFontImageSize(dropSymbol, 24);
|
||||
|
Loading…
x
Reference in New Issue
Block a user