diff --git a/README.md b/README.md index d47011b..7aaf56c 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,11 @@ https://github.com/stax76/mpv.net/wiki/Scripting-(CSharp,-Python,-JavaScript,-Lu ### Changelog +### 2.6 (2019-04-09) + +- on Win 7 controls in the conf editor were using a difficult too read too light color +- context menu renderer changed to look like Win 10 design, except colors are still system theme colors + ### 2.5 (2019-04-08) - in case the input conf don't contain a menu definition mpv.net creates the default menu instead no menu like before diff --git a/mpv.net/Menu.cs b/mpv.net/Menu.cs index 16f4d07..a49f798 100644 --- a/mpv.net/Menu.cs +++ b/mpv.net/Menu.cs @@ -244,7 +244,6 @@ public class ToolStripRendererEx : ToolStripSystemRenderer protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e) { e.Item.ForeColor = Color.Black; - var r = new Rectangle(Point.Empty, e.Item.Size); var g = e.Graphics; @@ -258,20 +257,10 @@ public class ToolStripRendererEx : ToolStripSystemRenderer else { g.SmoothingMode = SmoothingMode.AntiAlias; - var r2 = new Rectangle(r.X + 2, r.Y, r.Width - 4, r.Height - 1); - - using (Pen pen = new Pen(ColorBorder)) - { - g.DrawRectangle(pen, r2); - } - r2.Inflate(-1, -1); - - using (SolidBrush b = new SolidBrush(ColorBottom)) - { + using (SolidBrush b = new SolidBrush(ColorChecked)) g.FillRectangle(b, r2); - } } } } @@ -311,13 +300,20 @@ public class ToolStripRendererEx : ToolStripSystemRenderer protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e) { - var value = e.Direction == ArrowDirection.Down ? 0x36 : 0x34; - var s = Convert.ToChar(value).ToString(); - var font = new Font("Marlett", e.Item.Font.Size - 2); - var size = e.Graphics.MeasureString(s, font); - var x = Convert.ToInt32(e.Item.Width - size.Width); - var y = Convert.ToInt32((e.Item.Height - size.Height) / 2.0) + 1; - e.Graphics.DrawString(s, font, Brushes.Black, x, y); + if (e.Direction == ArrowDirection.Down) throw new NotImplementedException(); + float x1 = e.Item.Width - e.Item.Height * 0.6f; + float y1 = e.Item.Height * 0.25f; + float x2 = x1 + e.Item.Height * 0.25f; + float y2 = e.Item.Height / 2f; + float x3 = x1; + float y3 = e.Item.Height * 0.75f; + e.Graphics.SmoothingMode = SmoothingMode.HighQuality; + + using (Pen p = new Pen(Brushes.Black, Control.DefaultFont.Height / 20f)) + { + e.Graphics.DrawLine(p, x1, y1, x2, y2); + e.Graphics.DrawLine(p, x2, y2, x3, y3); + } } protected override void OnRenderItemCheck(ToolStripItemImageRenderEventArgs e) diff --git a/mpv.net/Misc.cs b/mpv.net/Misc.cs index 2169413..1005a46 100644 --- a/mpv.net/Misc.cs +++ b/mpv.net/Misc.cs @@ -28,16 +28,6 @@ namespace mpvnet int IComparer.Compare(string x, string y) => IComparerOfString_Compare(x, y); } - public class OSVersion - { - public static float Windows7 { get; } = 6.1f; - public static float Windows8 { get; } = 6.2f; - public static float Windows81 { get; } = 6.3f; - public static float Windows10 { get; } = 10f; - - public static float Current => Environment.OSVersion.Version.Major + Environment.OSVersion.Version.Minor / 10f; - } - public class FileAssociation { static string ExePath = Application.ExecutablePath; diff --git a/mpv.net/Properties/AssemblyInfo.cs b/mpv.net/Properties/AssemblyInfo.cs index dc01127..3afbdcc 100644 --- a/mpv.net/Properties/AssemblyInfo.cs +++ b/mpv.net/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.5.0.0")] -[assembly: AssemblyFileVersion("2.5.0.0")] +[assembly: AssemblyVersion("2.6.0.0")] +[assembly: AssemblyFileVersion("2.6.0.0")] diff --git a/mpv.net/Resources/input.conf.txt b/mpv.net/Resources/input.conf.txt index 710034e..9cc4dd3 100644 --- a/mpv.net/Resources/input.conf.txt +++ b/mpv.net/Resources/input.conf.txt @@ -34,7 +34,7 @@ Space cycle pause #menu: Play/Pause s stop #menu: Stop _ ignore #menu: - - f cycle fullscreen #menu: Toggle Fullscreen + Enter cycle fullscreen #menu: Toggle Fullscreen F11 playlist-prev #menu: Navigate > Previous F12 playlist-next #menu: Navigate > Next @@ -152,7 +152,6 @@ Q quit-watch-later #menu: Exit Watch Later > playlist-next < playlist-prev - Enter cycle pause Power quit Play cycle pause Pause cycle pause diff --git a/mpvConfEdit/App.xaml b/mpvConfEdit/App.xaml index a548bad..20b4da0 100644 --- a/mpvConfEdit/App.xaml +++ b/mpvConfEdit/App.xaml @@ -1,7 +1,7 @@ -