* 重构全局字体设置逻辑,以期可以在程序运行时设置全局字体
This commit is contained in:
parent
2a989eafcb
commit
8a73974127
@ -80,6 +80,12 @@ namespace Sunny.UI
|
||||
listbox.DrawItem += Listbox_DrawItem;
|
||||
}
|
||||
|
||||
public override void SetDPIScale()
|
||||
{
|
||||
base.SetDPIScale();
|
||||
listbox.SetDPIScale();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
|
@ -97,6 +97,12 @@ namespace Sunny.UI
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
public override void SetDPIScale()
|
||||
{
|
||||
base.SetDPIScale();
|
||||
listbox.SetDPIScale();
|
||||
}
|
||||
|
||||
private int scrollBarWidth = 0;
|
||||
|
||||
[DefaultValue(0), Category("SunnyUI"), Description("垂直滚动条宽度,最小为原生滚动条宽度")]
|
||||
|
@ -53,6 +53,13 @@ namespace Sunny.UI
|
||||
b1.ZoomScaleDisabled = b2.ZoomScaleDisabled = b3.ZoomScaleDisabled = b4.ZoomScaleDisabled = true;
|
||||
}
|
||||
|
||||
public override void SetDPIScale()
|
||||
{
|
||||
base.SetDPIScale();
|
||||
l1.SetDPIScale();
|
||||
l2.SetDPIScale();
|
||||
}
|
||||
|
||||
[DefaultValue(true)]
|
||||
[Description("显示多选按钮"), Category("SunnyUI")]
|
||||
public bool ShowMulti
|
||||
|
@ -95,6 +95,12 @@ namespace Sunny.UI
|
||||
view.MouseClick += View_MouseClick;
|
||||
}
|
||||
|
||||
public override void SetDPIScale()
|
||||
{
|
||||
base.SetDPIScale();
|
||||
view.SetDPIScale();
|
||||
}
|
||||
|
||||
public void CheckedAll()
|
||||
{
|
||||
view.CheckedAll();
|
||||
|
Loading…
x
Reference in New Issue
Block a user