* UISymbolPanel: 设置默认尺寸
This commit is contained in:
parent
df86542c41
commit
3eb957279f
@ -1,4 +1,26 @@
|
||||
using System;
|
||||
/******************************************************************************
|
||||
* SunnyUI 开源控件库、工具类库、扩展类库、多页面开发框架。
|
||||
* CopyRight (C) 2012-2023 ShenYongHua(沈永华).
|
||||
* QQ群:56829229 QQ:17612584 EMail:SunnyUI@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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user