MenuButton - nitpick cleanup
This commit is contained in:
parent
5c12753217
commit
b271ef4a89
|
@ -9,26 +9,26 @@ namespace BizHawk.Client.EmuHawk
|
||||||
[DefaultValue(null)]
|
[DefaultValue(null)]
|
||||||
public ContextMenuStrip Menu { get; set; }
|
public ContextMenuStrip Menu { get; set; }
|
||||||
|
|
||||||
protected override void OnMouseDown(MouseEventArgs mevent)
|
protected override void OnMouseDown(MouseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMouseDown(mevent);
|
base.OnMouseDown(e);
|
||||||
|
|
||||||
if (Menu != null && mevent.Button == MouseButtons.Left)
|
if (Menu != null && e.Button == MouseButtons.Left)
|
||||||
{
|
{
|
||||||
Menu.Show(this, mevent.Location);
|
Menu.Show(this, e.Location);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnPaint(PaintEventArgs pevent)
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnPaint(pevent);
|
base.OnPaint(e);
|
||||||
|
|
||||||
int arrowX = ClientRectangle.Width - 14;
|
int arrowX = ClientRectangle.Width - 14;
|
||||||
int arrowY = ClientRectangle.Height / 2 - 1;
|
int arrowY = ClientRectangle.Height / 2 - 1;
|
||||||
|
|
||||||
Brush brush = Enabled ? SystemBrushes.ControlText : SystemBrushes.ButtonShadow;
|
Brush brush = Enabled ? SystemBrushes.ControlText : SystemBrushes.ButtonShadow;
|
||||||
Point[] arrows = { new Point(arrowX, arrowY), new Point(arrowX + 7, arrowY), new Point(arrowX + 3, arrowY + 4) };
|
Point[] arrows = { new Point(arrowX, arrowY), new Point(arrowX + 7, arrowY), new Point(arrowX + 3, arrowY + 4) };
|
||||||
pevent.Graphics.FillPolygon(brush, arrows);
|
e.Graphics.FillPolygon(brush, arrows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue