diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-11-04 09:50:43 +0000 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-11-04 09:50:43 +0000 |
| commit | f933ce9b841a5f302066336877f86119de034eb4 (patch) | |
| tree | 50e23551bae5ade3a263d9c1c054fb326a7ab5a6 /Histacom2.Engine/UI | |
| parent | 6ab1468786f1e865e9ff408d32149f9c9620d844 (diff) | |
| parent | 382f0167714bbcad00ab710fe7dcfa05eaeb88ac (diff) | |
| download | histacom2-f933ce9b841a5f302066336877f86119de034eb4.tar.gz histacom2-f933ce9b841a5f302066336877f86119de034eb4.tar.bz2 histacom2-f933ce9b841a5f302066336877f86119de034eb4.zip | |
Updated my fork!
Conflicts:
Histacom2/TitleScreen.Designer.cs
Histacom2/TitleScreen.cs
Diffstat (limited to 'Histacom2.Engine/UI')
| -rw-r--r-- | Histacom2.Engine/UI/ClassicButton.cs | 2 | ||||
| -rw-r--r-- | Histacom2.Engine/UI/ClassicLabel.cs | 4 | ||||
| -rw-r--r-- | Histacom2.Engine/UI/ClassicStartMenuItem.cs | 15 |
3 files changed, 12 insertions, 9 deletions
diff --git a/Histacom2.Engine/UI/ClassicButton.cs b/Histacom2.Engine/UI/ClassicButton.cs index 4ccdbe6..683b71b 100644 --- a/Histacom2.Engine/UI/ClassicButton.cs +++ b/Histacom2.Engine/UI/ClassicButton.cs @@ -94,7 +94,7 @@ namespace Histacom2.Engine.UI public void PerformClick() { - this.OnClick(new EventArgs()); + OnClick(EventArgs.Empty); } } } diff --git a/Histacom2.Engine/UI/ClassicLabel.cs b/Histacom2.Engine/UI/ClassicLabel.cs index eba8dc6..60bd9b7 100644 --- a/Histacom2.Engine/UI/ClassicLabel.cs +++ b/Histacom2.Engine/UI/ClassicLabel.cs @@ -25,9 +25,11 @@ namespace Histacom2.Engine.UI base.OnPaint(e); var gfx = e.Graphics; if (BackColor != Color.Transparent) gfx.Clear(BackColor); + StringFormat sf = new StringFormat(); + sf.HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show; gfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit; - gfx.DrawString(Text, Font, new SolidBrush(ForeColor), ClientRectangle); + gfx.DrawString(Text, Font, new SolidBrush(ForeColor), ClientRectangle, sf); Height = (int)gfx.MeasureString(Text, Font, ClientRectangle.Width).Height; } diff --git a/Histacom2.Engine/UI/ClassicStartMenuItem.cs b/Histacom2.Engine/UI/ClassicStartMenuItem.cs index dcb8361..5e3a3a7 100644 --- a/Histacom2.Engine/UI/ClassicStartMenuItem.cs +++ b/Histacom2.Engine/UI/ClassicStartMenuItem.cs @@ -56,22 +56,23 @@ namespace Histacom2.Engine.UI { if (BackgroundImageLayout == ImageLayout.Stretch) e.Graphics.DrawImage(BackgroundImage, new Rectangle(0, 0, Width, Height + 9)); } - - if (Selected) + int imgWidth = 0; + if (Image != null) + { + if (Selected) { if (SaveSystem.currentTheme != null && DoBackColorAdapt) e.Graphics.FillRectangle(new SolidBrush(SaveSystem.currentTheme.selectedBackColor), new Rectangle(0, 0, Width, Image.Height)); else e.Graphics.FillRectangle(Brushes.Navy, new Rectangle(0, 0, Width, Image.Height)); } e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit; + + e.Graphics.DrawImage(Image, 0 + Padding.Left - Padding.Right, 0); imgWidth = Image.Width; } + //if (Image != null) if (Height != Image.Height) if (layout == ClassicStartMenuItemLayout.CloseTitleWithLightSubtitle && Height != Image.Height + 8) { Height = Image.Height; } StringFormat sf = new StringFormat(); sf.HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show; - int imgWidth = 0; - if (Image != null) { e.Graphics.DrawImage(Image, 0 + Padding.Left - Padding.Right, 0); imgWidth = Image.Width; } - //if (Image != null) if (Height != Image.Height) if (layout == ClassicStartMenuItemLayout.CloseTitleWithLightSubtitle && Height != Image.Height + 8) { Height = Image.Height; } - if (!Selected) { switch (layout) { case ClassicStartMenuItemLayout.DistancedTitle: @@ -133,7 +134,7 @@ namespace Histacom2.Engine.UI { DistancedTitle, CloseTitle, - CloseTitleWithTwoLines, + //CloseTitleWithTwoLines, CloseTitleWithLightSubtitle } } |
