Context menu font render quality fix

This commit is contained in:
Frank Skare
2021-05-30 19:42:41 +02:00
parent db3018bbf5
commit 650c41eb8a
3 changed files with 6 additions and 7 deletions

View File

@@ -3,6 +3,7 @@
====================
- New media info command: Ctrl+m script-message mpv.net show-media-info #menu: View > Show Media Info
- Context menu font render quality fix.
5.4.9.0 (2021-05-29)

View File

@@ -46,10 +46,10 @@ namespace mpvnet
{
string umod = parts[i].ToUpper();
if (umod == "ALT") mod |= KeyModifiers.Alt;
if (umod == "CTRL") mod |= KeyModifiers.Ctrl;
if (umod == "ALT") mod |= KeyModifiers.Alt;
if (umod == "CTRL") mod |= KeyModifiers.Ctrl;
if (umod == "SHIFT") mod |= KeyModifiers.Shift;
if (umod == "WIN") mod |= KeyModifiers.Win;
if (umod == "WIN") mod |= KeyModifiers.Win;
}
key = parts[parts.Length - 1];

View File

@@ -158,8 +158,6 @@ public class ToolStripRendererEx : ToolStripSystemRenderer
protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
{
e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
if (e.Item is ToolStripMenuItem && !(e.Item.Owner is MenuStrip))
{
Rectangle rect = e.TextRectangle;
@@ -186,7 +184,6 @@ public class ToolStripRendererEx : ToolStripSystemRenderer
if (e.Item.Selected && e.Item.Enabled)
{
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
rect = new Rectangle(rect.X + 2, rect.Y, rect.Width - 4, rect.Height - 1);
rect.Inflate(-1, -1);
@@ -206,7 +203,8 @@ public class ToolStripRendererEx : ToolStripSystemRenderer
float y2 = e.Item.Height / 2f;
float x3 = x1;
float y3 = e.Item.Height * 0.75f;
e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
using (Brush brush = new SolidBrush(ForegroundColor))
{