* UISymbolPanel: 设置默认尺寸

This commit is contained in:
Sunny 2024-02-20 21:42:57 +08:00
parent df86542c41
commit 3eb957279f

View File

@ -1,4 +1,26 @@
using System;
/******************************************************************************
* SunnyUI
* CopyRight (C) 2012-2023 ShenYongHua().
* QQ群56829229 QQ17612584 EMailSunnyUI@QQ.Com
*
* Blog: https://www.cnblogs.com/yhuse
* Gitee: https://gitee.com/yhuse/SunnyUI
* GitHub: https://github.com/yhuse/SunnyUI
*
* SunnyUI.dll can be used for free under the GPL-3.0 license.
* If you use this code, please keep this note.
* 使
******************************************************************************
* : UISymbolPanel.cs
* :
* : V3.1
* : 2020-01-01
*
* 2023-11-28: V3.6.1
* 2024-02-20: V3.6.3
******************************************************************************/
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
@ -15,11 +37,15 @@ namespace Sunny.UI
public UISymbolPanel()
{
SetStyleFlags();
Width = 768;
Height = 128;
}
public UISymbolPanel(Type fonttype, UISymbolType symbolType, int columnCount = 24)
{
SetStyleFlags();
Width = 768;
Height = 128;
LoadFont(fonttype, symbolType, columnCount);
}
@ -117,8 +143,8 @@ namespace Sunny.UI
int width = symbolSize * column;
int height = symbolSize * row;
if (Width != width) Width = width;
if (Height != height) Height = height;
if (width > 0 && Width != width) Width = width;
if (height > 0 && Height != height) Height = height;
}
protected override void OnPaint(PaintEventArgs e)