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