mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
Fix V3002, V3095 warnings from PVS-Studio Static Analyzer
This commit is contained in:
parent
b908cc41c9
commit
bd4bd3d1fe
1 changed files with 8 additions and 7 deletions
|
@ -56,7 +56,9 @@ protected override void OnPaint(PaintEventArgs e)
|
|||
{
|
||||
if (BackgroundImageLayout == ImageLayout.Stretch) e.Graphics.DrawImage(BackgroundImage, new Rectangle(0, 0, Width, Height + 9));
|
||||
}
|
||||
|
||||
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));
|
||||
|
@ -65,13 +67,12 @@ protected override void OnPaint(PaintEventArgs e)
|
|||
|
||||
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 @@ public enum ClassicStartMenuItemLayout
|
|||
{
|
||||
DistancedTitle,
|
||||
CloseTitle,
|
||||
CloseTitleWithTwoLines,
|
||||
//CloseTitleWithTwoLines,
|
||||
CloseTitleWithLightSubtitle
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue