5.5.0.2 Beta

This commit is contained in:
Frank Skare
2021-09-15 13:25:58 +02:00
parent 458007862e
commit a3b6af9f22
3 changed files with 12 additions and 15 deletions

View File

@@ -1,12 +1,7 @@
5.5.0.2 Beta (2021-??-??) 5.5.0.3 Beta (202?-??-??)
5.5.0.1 Beta (2021-09-15) 5.5.0.2 Beta (2021-09-15)
- Fix of keepaspect-window=no.
5.4.9.9 Beta (2021-09-14)
- Fix of keepaspect-window=no. - Fix of keepaspect-window=no.

View File

@@ -137,15 +137,15 @@ namespace mpvnet
BeginInvoke(new Action(() => { BeginInvoke(new Action(() => {
int w, h; int w, h;
if (Core.KeepaspectWindow || App.StartSize != "always") if (KeepSize())
{ {
w = (int)(ClientSize.Width * scale); w = (int)(ClientSize.Width * scale);
h = (int)Math.Ceiling(w * Core.VideoSize.Height / (double)Core.VideoSize.Width); h = (int)(ClientSize.Height * scale);
} }
else else
{ {
w = (int)(ClientSize.Width * scale); 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); SetSize(w, h, Screen.FromControl(this), false);
@@ -171,7 +171,7 @@ namespace mpvnet
void Core_VideoSizeChanged() => BeginInvoke(new Action(() => void Core_VideoSizeChanged() => BeginInvoke(new Action(() =>
{ {
if (Core.KeepaspectWindow || App.StartSize != "always") if (!KeepSize())
SetFormPosAndSize(); SetFormPosAndSize();
})); }));
@@ -181,6 +181,8 @@ namespace mpvnet
bool IsCommandPaletteVissible() => CommandPaletteHost != null && CommandPaletteHost.Visible; bool IsCommandPaletteVissible() => CommandPaletteHost != null && CommandPaletteHost.Visible;
bool KeepSize() => !Core.KeepaspectWindow || App.StartSize == "always";
bool IsMouseInOSC() bool IsMouseInOSC()
{ {
Point pos = PointToClient(MousePosition); Point pos = PointToClient(MousePosition);
@@ -422,7 +424,7 @@ namespace mpvnet
if (Core.WasInitialSizeSet) if (Core.WasInitialSizeSet)
{ {
if (App.StartSize == "always" || !Core.KeepaspectWindow) if (KeepSize())
{ {
width = ClientSize.Width; width = ClientSize.Width;
height = ClientSize.Height; height = ClientSize.Height;
@@ -590,7 +592,7 @@ namespace mpvnet
else else
FormBorderStyle = FormBorderStyle.None; FormBorderStyle = FormBorderStyle.None;
if (Core.KeepaspectWindow || App.StartSize != "always") if (!KeepSize())
SetFormPosAndSize(); SetFormPosAndSize();
} }
} }

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 // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.5.0.1")] [assembly: AssemblyVersion("5.5.0.2")]
[assembly: AssemblyFileVersion("5.5.0.1")] [assembly: AssemblyFileVersion("5.5.0.2")]