DotNet 4.8.1 build of DotNetBar
This commit is contained in:
33
PROMS/DotNetBar Source Code/TreeGX/TextMarkup/Strong.cs
Normal file
33
PROMS/DotNetBar Source Code/TreeGX/TextMarkup/Strong.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Drawing;
|
||||
|
||||
#if TREEGX
|
||||
namespace DevComponents.Tree.TextMarkup
|
||||
#elif DOTNETBAR
|
||||
namespace DevComponents.DotNetBar.TextMarkup
|
||||
#elif SUPERGRID
|
||||
namespace DevComponents.SuperGrid.TextMarkup
|
||||
#endif
|
||||
{
|
||||
internal class Strong : FontChangeElement
|
||||
{
|
||||
#region Internal Implementation
|
||||
protected override void SetFont(MarkupDrawContext d)
|
||||
{
|
||||
Font font = d.CurrentFont;
|
||||
FontStyle style = d.CurrentFont.Style | FontStyle.Bold;
|
||||
|
||||
if (!font.Bold && font.FontFamily.IsStyleAvailable(style))
|
||||
d.CurrentFont = new Font(d.CurrentFont, style);
|
||||
else
|
||||
font = null;
|
||||
|
||||
if (font != null)
|
||||
m_OldFont = font;
|
||||
|
||||
base.SetFont(d);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user