From a3b6af9f22d56c56b50ffd6d0607d2b84685cf89 Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Wed, 15 Sep 2021 13:25:58 +0200 Subject: [PATCH] 5.5.0.2 Beta --- docs/Changelog.md | 9 ++------- src/Misc/MainForm.cs | 14 ++++++++------ src/Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 15f39d3..3d34caa 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,12 +1,7 @@ -5.5.0.2 Beta (2021-??-??) +5.5.0.3 Beta (202?-??-??) -5.5.0.1 Beta (2021-09-15) - -- Fix of keepaspect-window=no. - - -5.4.9.9 Beta (2021-09-14) +5.5.0.2 Beta (2021-09-15) - Fix of keepaspect-window=no. diff --git a/src/Misc/MainForm.cs b/src/Misc/MainForm.cs index 37724c6..0b564e1 100644 --- a/src/Misc/MainForm.cs +++ b/src/Misc/MainForm.cs @@ -137,15 +137,15 @@ namespace mpvnet BeginInvoke(new Action(() => { int w, h; - if (Core.KeepaspectWindow || App.StartSize != "always") + if (KeepSize()) { w = (int)(ClientSize.Width * scale); - h = (int)Math.Ceiling(w * Core.VideoSize.Height / (double)Core.VideoSize.Width); + h = (int)(ClientSize.Height * scale); } else { w = (int)(ClientSize.Width * scale); - h = (int)(ClientSize.Height * scale); + h = (int)Math.Ceiling(w * Core.VideoSize.Height / (double)Core.VideoSize.Width); } SetSize(w, h, Screen.FromControl(this), false); @@ -171,7 +171,7 @@ namespace mpvnet void Core_VideoSizeChanged() => BeginInvoke(new Action(() => { - if (Core.KeepaspectWindow || App.StartSize != "always") + if (!KeepSize()) SetFormPosAndSize(); })); @@ -181,6 +181,8 @@ namespace mpvnet bool IsCommandPaletteVissible() => CommandPaletteHost != null && CommandPaletteHost.Visible; + bool KeepSize() => !Core.KeepaspectWindow || App.StartSize == "always"; + bool IsMouseInOSC() { Point pos = PointToClient(MousePosition); @@ -422,7 +424,7 @@ namespace mpvnet if (Core.WasInitialSizeSet) { - if (App.StartSize == "always" || !Core.KeepaspectWindow) + if (KeepSize()) { width = ClientSize.Width; height = ClientSize.Height; @@ -590,7 +592,7 @@ namespace mpvnet else FormBorderStyle = FormBorderStyle.None; - if (Core.KeepaspectWindow || App.StartSize != "always") + if (!KeepSize()) SetFormPosAndSize(); } } diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index 1b3c13e..26e5f4f 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/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("5.5.0.1")] -[assembly: AssemblyFileVersion("5.5.0.1")] +[assembly: AssemblyVersion("5.5.0.2")] +[assembly: AssemblyFileVersion("5.5.0.2")]