diff options
| author | lempamo <[email protected]> | 2017-10-21 00:51:46 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-10-21 00:51:46 -0400 |
| commit | 54a3e8fe71f936580339e4a4a6fb650d57fbb5d1 (patch) | |
| tree | 3d961d1d410a852561b31b13f951e4b4a4666c87 /Histacom2.Engine | |
| parent | 70c63256ccab2b3cfc6a0dc1b0591b26932a2d10 (diff) | |
| download | histacom2-54a3e8fe71f936580339e4a4a6fb650d57fbb5d1.tar.gz histacom2-54a3e8fe71f936580339e4a4a6fb650d57fbb5d1.tar.bz2 histacom2-54a3e8fe71f936580339e4a4a6fb650d57fbb5d1.zip | |
more xp start things
Diffstat (limited to 'Histacom2.Engine')
| -rw-r--r-- | Histacom2.Engine/UI/ClassicLabel.cs | 18 | ||||
| -rw-r--r-- | Histacom2.Engine/UI/ClassicStartMenuItem.cs | 2 |
2 files changed, 18 insertions, 2 deletions
diff --git a/Histacom2.Engine/UI/ClassicLabel.cs b/Histacom2.Engine/UI/ClassicLabel.cs index c7007bd..4ef1201 100644 --- a/Histacom2.Engine/UI/ClassicLabel.cs +++ b/Histacom2.Engine/UI/ClassicLabel.cs @@ -12,8 +12,11 @@ namespace Histacom2.Engine.UI { public class ClassicLabel : Control { + public bool DropShadow { get; set; } + public ClassicLabel() { + SetStyle(ControlStyles.SupportsTransparentBackColor, true); TextChanged += (s, e) => Invalidate(); } @@ -21,11 +24,24 @@ namespace Histacom2.Engine.UI { base.OnPaint(e); var gfx = e.Graphics; - gfx.Clear(BackColor); + if (BackColor != Color.Transparent) gfx.Clear(BackColor); gfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit; gfx.DrawString(Text, Font, new SolidBrush(ForeColor), ClientRectangle); Height = (int)gfx.MeasureString(Text, Font, ClientRectangle.Width).Height; } + + private const int CS_DROPSHADOW = 0x00020000; + protected override CreateParams CreateParams + { + get + { + // add the drop shadow flag for automatically drawing + // a drop shadow around the form + CreateParams cp = base.CreateParams; + if (DropShadow) cp.ClassStyle |= CS_DROPSHADOW; + return cp; + } + } } } diff --git a/Histacom2.Engine/UI/ClassicStartMenuItem.cs b/Histacom2.Engine/UI/ClassicStartMenuItem.cs index 49aecd9..e009a35 100644 --- a/Histacom2.Engine/UI/ClassicStartMenuItem.cs +++ b/Histacom2.Engine/UI/ClassicStartMenuItem.cs @@ -33,7 +33,7 @@ namespace Histacom2.Engine.UI e.Graphics.DrawImage(Image, 0 + Padding.Left - Padding.Right, 0); if (!Selected) { - e.Graphics.DrawString(Text, new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular), Brushes.Black, 38, 11, sf); + if (SaveSystem.currentTheme != null) { e.Graphics.DrawString(Text, new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular), Brushes.Black, 38, 11, sf); } if (DropDownItems.Count > 0) { |
