Context menu font render quality fix
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
====================
|
====================
|
||||||
|
|
||||||
- New media info command: Ctrl+m script-message mpv.net show-media-info #menu: View > Show Media Info
|
- 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)
|
5.4.9.0 (2021-05-29)
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
string umod = parts[i].ToUpper();
|
string umod = parts[i].ToUpper();
|
||||||
|
|
||||||
if (umod == "ALT") mod |= KeyModifiers.Alt;
|
if (umod == "ALT") mod |= KeyModifiers.Alt;
|
||||||
if (umod == "CTRL") mod |= KeyModifiers.Ctrl;
|
if (umod == "CTRL") mod |= KeyModifiers.Ctrl;
|
||||||
if (umod == "SHIFT") mod |= KeyModifiers.Shift;
|
if (umod == "SHIFT") mod |= KeyModifiers.Shift;
|
||||||
if (umod == "WIN") mod |= KeyModifiers.Win;
|
if (umod == "WIN") mod |= KeyModifiers.Win;
|
||||||
}
|
}
|
||||||
|
|
||||||
key = parts[parts.Length - 1];
|
key = parts[parts.Length - 1];
|
||||||
|
|||||||
@@ -158,8 +158,6 @@ public class ToolStripRendererEx : ToolStripSystemRenderer
|
|||||||
|
|
||||||
protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
|
protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)
|
||||||
{
|
{
|
||||||
e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias;
|
|
||||||
|
|
||||||
if (e.Item is ToolStripMenuItem && !(e.Item.Owner is MenuStrip))
|
if (e.Item is ToolStripMenuItem && !(e.Item.Owner is MenuStrip))
|
||||||
{
|
{
|
||||||
Rectangle rect = e.TextRectangle;
|
Rectangle rect = e.TextRectangle;
|
||||||
@@ -186,7 +184,6 @@ public class ToolStripRendererEx : ToolStripSystemRenderer
|
|||||||
|
|
||||||
if (e.Item.Selected && e.Item.Enabled)
|
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 = new Rectangle(rect.X + 2, rect.Y, rect.Width - 4, rect.Height - 1);
|
||||||
rect.Inflate(-1, -1);
|
rect.Inflate(-1, -1);
|
||||||
|
|
||||||
@@ -206,7 +203,8 @@ public class ToolStripRendererEx : ToolStripSystemRenderer
|
|||||||
float y2 = e.Item.Height / 2f;
|
float y2 = e.Item.Height / 2f;
|
||||||
float x3 = x1;
|
float x3 = x1;
|
||||||
float y3 = e.Item.Height * 0.75f;
|
float y3 = e.Item.Height * 0.75f;
|
||||||
e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
|
|
||||||
|
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
|
||||||
using (Brush brush = new SolidBrush(ForegroundColor))
|
using (Brush brush = new SolidBrush(ForegroundColor))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user