* UIFlowLayoutPanel:修改不同DPI缩放滚动条未覆盖的问题

This commit is contained in:
Sunny 2021-11-05 22:50:22 +08:00
parent f7c70b12a9
commit a1887eee88
3 changed files with 11 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -21,6 +21,7 @@
* 2021-07-31: V3.0.5 Controls.Add增加
* 2021-08-11: V3.0.5 Focus事件
* 2021-10-18: V3.0.8 Scroll事件
* 2021-11-05: V3.0.8 DPI缩放滚动条未覆盖的问题
******************************************************************************/
using System;
@ -63,6 +64,14 @@ namespace Sunny.UI
timer.Start();
}
protected override void OnFontChanged(EventArgs e)
{
base.OnFontChanged(e);
if (flowLayoutPanel != null) flowLayoutPanel.Font = Font;
if (VBar != null) VBar.Font = Font;
if (HBar != null) HBar.Font = Font;
}
public new event ScrollEventHandler Scroll;
public Control ExToolTipControl()
@ -456,10 +465,12 @@ namespace Sunny.UI
added = Radius / 2;
}
VBar.Width = ScrollBarInfo.VerticalScrollBarWidth();
VBar.Left = Width - VBar.Width - added;
VBar.Top = added;
VBar.Height = Height - added * 2;
HBar.Height = ScrollBarInfo.HorizontalScrollBarHeight();
HBar.Left = added;
HBar.Top = Height - HBar.Height - added;