aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine
diff options
context:
space:
mode:
authorAdmAlexus <[email protected]>2017-10-27 20:05:03 +0500
committerAdmAlexus <[email protected]>2017-10-27 20:05:03 +0500
commitbd4bd3d1fe917b4ec1e908b9e7da038bf4b97178 (patch)
tree0edd7789854b995cefadeff458d1b6ad71f41352 /Histacom2.Engine
parentb908cc41c91c60c8e2c6395a2e14ec39fa9f3aab (diff)
downloadhistacom2-bd4bd3d1fe917b4ec1e908b9e7da038bf4b97178.tar.gz
histacom2-bd4bd3d1fe917b4ec1e908b9e7da038bf4b97178.tar.bz2
histacom2-bd4bd3d1fe917b4ec1e908b9e7da038bf4b97178.zip
Fix V3002, V3095 warnings from PVS-Studio Static Analyzer
Diffstat (limited to 'Histacom2.Engine')
-rw-r--r--Histacom2.Engine/UI/ClassicStartMenuItem.cs15
1 files changed, 8 insertions, 7 deletions
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
}
}