* 重构字体
This commit is contained in:
parent
3fc41f95d2
commit
3acba1ca26
@ -48,6 +48,7 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
//默认字体。当样式中的Font==null时用该字体替换
|
//默认字体。当样式中的Font==null时用该字体替换
|
||||||
static readonly Font DefaultFont = UIStyles.Font();
|
static readonly Font DefaultFont = UIStyles.Font();
|
||||||
|
|
||||||
//文本格式。用于测量和绘制
|
//文本格式。用于测量和绘制
|
||||||
static readonly StringFormat DefStringFormat = StringFormat.GenericTypographic;
|
static readonly StringFormat DefStringFormat = StringFormat.GenericTypographic;
|
||||||
|
|
||||||
@ -178,6 +179,7 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(controlOrItem));
|
throw new ArgumentNullException(nameof(controlOrItem));
|
||||||
}
|
}
|
||||||
|
|
||||||
Show(text, style, delay, floating, GetCenterPosition(controlOrItem), centerInControl ?? IsContainerLike(controlOrItem));
|
Show(text, style, delay, floating, GetCenterPosition(controlOrItem), centerInControl ?? IsContainerLike(controlOrItem));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
components.Dispose();
|
components.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
edit?.Dispose();
|
||||||
ItemForm?.Dispose();
|
ItemForm?.Dispose();
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ namespace Sunny.UI
|
|||||||
Padding = new Padding(0, 0, 30, 2);
|
Padding = new Padding(0, 0, 30, 2);
|
||||||
|
|
||||||
edit.AutoSize = false;
|
edit.AutoSize = false;
|
||||||
edit.Font = UIStyles.Font();
|
//edit.Font = UIStyles.Font();
|
||||||
edit.Left = 4;
|
edit.Left = 4;
|
||||||
edit.Top = 3;
|
edit.Top = 3;
|
||||||
edit.Text = String.Empty;
|
edit.Text = String.Empty;
|
||||||
|
@ -39,8 +39,7 @@ namespace Sunny.UI
|
|||||||
SetStyleFlags(true, false, true);
|
SetStyleFlags(true, false, true);
|
||||||
Height = 29;
|
Height = 29;
|
||||||
RadiusSides = UICornerRadiusSides.None;
|
RadiusSides = UICornerRadiusSides.None;
|
||||||
|
//Font = UIStyles.Font();
|
||||||
Font = UIStyles.Font();
|
|
||||||
foreColor = UIStyles.Blue.DataGridViewFooterForeColor;
|
foreColor = UIStyles.Blue.DataGridViewFooterForeColor;
|
||||||
fillColor = UIStyles.Blue.PlainColor;
|
fillColor = UIStyles.Blue.PlainColor;
|
||||||
rectColor = UIStyles.Blue.RectColor;
|
rectColor = UIStyles.Blue.RectColor;
|
||||||
|
@ -181,7 +181,7 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
public UILinkLabel()
|
public UILinkLabel()
|
||||||
{
|
{
|
||||||
Font = UIStyles.Font();
|
base.Font = UIStyles.Font();
|
||||||
LinkBehavior = LinkBehavior.AlwaysUnderline;
|
LinkBehavior = LinkBehavior.AlwaysUnderline;
|
||||||
Version = UIGlobal.Version;
|
Version = UIGlobal.Version;
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ namespace Sunny.UI
|
|||||||
//
|
//
|
||||||
BorderStyle = BorderStyle.FixedSingle;
|
BorderStyle = BorderStyle.FixedSingle;
|
||||||
DrawMode = DrawMode.OwnerDrawFixed;
|
DrawMode = DrawMode.OwnerDrawFixed;
|
||||||
Font = UIStyles.Font();
|
base.Font = UIStyles.Font();
|
||||||
IntegralHeight = false;
|
IntegralHeight = false;
|
||||||
ItemHeight = 25;
|
ItemHeight = 25;
|
||||||
Size = new Size(150, 200);
|
Size = new Size(150, 200);
|
||||||
|
@ -56,7 +56,7 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
DoubleBuffered = true;
|
DoubleBuffered = true;
|
||||||
UpdateStyles();
|
UpdateStyles();
|
||||||
Font = UIStyles.Font();
|
base.Font = UIStyles.Font();
|
||||||
|
|
||||||
NavBarMenu.VisibleChanged += NavBarMenu_VisibleChanged;
|
NavBarMenu.VisibleChanged += NavBarMenu_VisibleChanged;
|
||||||
Dock = DockStyle.Top;
|
Dock = DockStyle.Top;
|
||||||
|
@ -72,7 +72,7 @@ namespace Sunny.UI
|
|||||||
//ShowRootLines = false;
|
//ShowRootLines = false;
|
||||||
|
|
||||||
DoubleBuffered = true;
|
DoubleBuffered = true;
|
||||||
Font = UIStyles.Font();
|
base.Font = UIStyles.Font();
|
||||||
//CheckBoxes = false;
|
//CheckBoxes = false;
|
||||||
ItemHeight = 50;
|
ItemHeight = 50;
|
||||||
BackColor = Color.FromArgb(56, 56, 56);
|
BackColor = Color.FromArgb(56, 56, 56);
|
||||||
|
@ -84,6 +84,12 @@ namespace Sunny.UI
|
|||||||
edit.MouseMove += Edit_MouseMove;
|
edit.MouseMove += Edit_MouseMove;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~UIRichTextBox()
|
||||||
|
{
|
||||||
|
edit?.Dispose();
|
||||||
|
bar?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
public new event EventHandler Leave;
|
public new event EventHandler Leave;
|
||||||
public new event EventHandler Validated;
|
public new event EventHandler Validated;
|
||||||
public new event CancelEventHandler Validating;
|
public new event CancelEventHandler Validating;
|
||||||
|
@ -61,7 +61,7 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
ItemSize = new Size(150, 40);
|
ItemSize = new Size(150, 40);
|
||||||
DrawMode = TabDrawMode.OwnerDrawFixed;
|
DrawMode = TabDrawMode.OwnerDrawFixed;
|
||||||
Font = UIStyles.Font();
|
base.Font = UIStyles.Font();
|
||||||
AfterSetFillColor(FillColor);
|
AfterSetFillColor(FillColor);
|
||||||
Version = UIGlobal.Version;
|
Version = UIGlobal.Version;
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ namespace Sunny.UI
|
|||||||
|
|
||||||
base.ItemSize = new Size(40, 200);
|
base.ItemSize = new Size(40, 200);
|
||||||
DrawMode = TabDrawMode.OwnerDrawFixed;
|
DrawMode = TabDrawMode.OwnerDrawFixed;
|
||||||
Font = UIStyles.Font();
|
base.Font = UIStyles.Font();
|
||||||
AfterSetFillColor(FillColor);
|
AfterSetFillColor(FillColor);
|
||||||
Size = new Size(450, 270);
|
Size = new Size(450, 270);
|
||||||
Version = UIGlobal.Version;
|
Version = UIGlobal.Version;
|
||||||
|
4
SunnyUI/Controls/UITextBox.Designer.cs
generated
4
SunnyUI/Controls/UITextBox.Designer.cs
generated
@ -18,6 +18,10 @@
|
|||||||
CloseTips();
|
CloseTips();
|
||||||
components.Dispose();
|
components.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
edit?.Dispose();
|
||||||
|
bar?.Dispose();
|
||||||
|
btn?.Dispose();
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,6 @@ namespace Sunny.UI
|
|||||||
SetStyleFlags(true, true, true);
|
SetStyleFlags(true, true, true);
|
||||||
|
|
||||||
ShowText = false;
|
ShowText = false;
|
||||||
Font = UIStyles.Font();
|
|
||||||
MinimumSize = new Size(1, 16);
|
MinimumSize = new Size(1, 16);
|
||||||
|
|
||||||
Width = 150;
|
Width = 150;
|
||||||
|
@ -94,6 +94,13 @@ namespace Sunny.UI
|
|||||||
view.MouseClick += View_MouseClick;
|
view.MouseClick += View_MouseClick;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~UITreeView()
|
||||||
|
{
|
||||||
|
view?.Dispose();
|
||||||
|
Bar?.Dispose();
|
||||||
|
HBar?.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
public event NodeLabelEditEventHandler AfterLabelEdit;
|
public event NodeLabelEditEventHandler AfterLabelEdit;
|
||||||
public new event EventHandler MouseLeave;
|
public new event EventHandler MouseLeave;
|
||||||
public new event EventHandler MouseEnter;
|
public new event EventHandler MouseEnter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user