Skip to content

Commit ce12e80

Browse files
committed
2 parents 5b370ca + fafff80 commit ce12e80

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Source/GrasscutterTools/Forms/FormMain.cs

+9-2
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,6 @@ private void ShowPage(BasePage page)
399399
/// <summary>
400400
/// 导航列表项居中绘制
401401
/// </summary>
402-
/// <param name="sender"></param>
403-
/// <param name="e"></param>
404402
private void ListPages_DrawItem(object sender, DrawItemEventArgs e)
405403
{
406404
e.DrawBackground();
@@ -413,6 +411,15 @@ private void ListPages_DrawItem(object sender, DrawItemEventArgs e)
413411
e.Graphics.DrawString(ListPages.Items[e.Index].ToString(), e.Font, new SolidBrush(e.ForeColor), e.Bounds, strFmt);
414412
}
415413

414+
/// <summary>
415+
/// 导航列表高度测量
416+
/// </summary>
417+
private void ListPages_MeasureItem(object sender, MeasureItemEventArgs e)
418+
{
419+
// 列表项高度为字体高度1.5倍
420+
e.ItemHeight = ListPages.Font.Height * 3 / 2;
421+
}
422+
416423
/// <summary>
417424
/// 导航列表大小改变时触发
418425
/// </summary>

0 commit comments

Comments
 (0)