diff --git a/docs/Changelog.md b/docs/Changelog.md index de91319..15f39d3 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -1,5 +1,10 @@ -5.5.0.1 Beta (2021-??-??) +5.5.0.2 Beta (2021-??-??) + +5.5.0.1 Beta (2021-09-15) + +- Fix of keepaspect-window=no. + 5.4.9.9 Beta (2021-09-14) diff --git a/src/Misc/MainForm.cs b/src/Misc/MainForm.cs index e7ae0b6..37724c6 100644 --- a/src/Misc/MainForm.cs +++ b/src/Misc/MainForm.cs @@ -135,8 +135,19 @@ namespace mpvnet void Core_ScaleWindow(float scale) { BeginInvoke(new Action(() => { - int w = (int)(ClientSize.Width * scale); - int h = (int)Math.Ceiling(w * Core.VideoSize.Height / (double)Core.VideoSize.Width); + int w, h; + + if (Core.KeepaspectWindow || App.StartSize != "always") + { + w = (int)(ClientSize.Width * scale); + h = (int)Math.Ceiling(w * Core.VideoSize.Height / (double)Core.VideoSize.Width); + } + else + { + w = (int)(ClientSize.Width * scale); + h = (int)(ClientSize.Height * scale); + } + SetSize(w, h, Screen.FromControl(this), false); })); } @@ -158,7 +169,11 @@ namespace mpvnet void CM_Popup(object sender, EventArgs e) => CursorHelp.Show(); - void Core_VideoSizeChanged() => BeginInvoke(new Action(() => SetFormPosAndSize())); + void Core_VideoSizeChanged() => BeginInvoke(new Action(() => + { + if (Core.KeepaspectWindow || App.StartSize != "always") + SetFormPosAndSize(); + })); void PropChangeFullscreen(bool value) => BeginInvoke(new Action(() => CycleFullscreen(value))); @@ -575,7 +590,7 @@ namespace mpvnet else FormBorderStyle = FormBorderStyle.None; - if (Core.KeepaspectWindow) + if (Core.KeepaspectWindow || App.StartSize != "always") SetFormPosAndSize(); } } diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index 9a8edee..1b3c13e 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.4.9.9")] -[assembly: AssemblyFileVersion("5.4.9.9")] +[assembly: AssemblyVersion("5.5.0.1")] +[assembly: AssemblyFileVersion("5.5.0.1")]