* UIForm:增加标题栏ICON图标绘制
This commit is contained in:
parent
25bbcd2e62
commit
203e9f0a41
BIN
Bin/SunnyUI.dll
BIN
Bin/SunnyUI.dll
Binary file not shown.
BIN
Bin/SunnyUI.pdb
BIN
Bin/SunnyUI.pdb
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
SunnyUI.ico
BIN
SunnyUI.ico
Binary file not shown.
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 43 KiB |
@ -896,6 +896,11 @@ namespace Sunny.UI
|
||||
|
||||
e.Graphics.SetDefaultQuality();
|
||||
|
||||
if (Icon != null)
|
||||
{
|
||||
e.Graphics.DrawImage(Icon.ToBitmap(), 6, (TitleHeight - 24) / 2, 24, 24);
|
||||
}
|
||||
|
||||
SizeF sf = e.Graphics.MeasureString(Text, Font);
|
||||
if (TextAlignment == StringAlignment.Center)
|
||||
{
|
||||
@ -903,7 +908,7 @@ namespace Sunny.UI
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Graphics.DrawString(Text, Font, titleForeColor, 6, (TitleHeight - sf.Height) / 2);
|
||||
e.Graphics.DrawString(Text, Font, titleForeColor,6 + (Icon == null ? 0 : 26), (TitleHeight - sf.Height) / 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user