This commit is contained in:
Frank Skare
2019-04-09 04:57:29 +02:00
parent fec33056cb
commit 2e435dcdc0
24 changed files with 174 additions and 60 deletions

View File

@@ -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)

View File

@@ -28,16 +28,6 @@ namespace mpvnet
int IComparer<string>.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;

View File

@@ -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")]

View File

@@ -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