5.5.0.3 Beta

This commit is contained in:
Frank Skare
2021-09-23 12:45:09 +02:00
parent e8af1d2ccf
commit 38a816a255
5 changed files with 28 additions and 42 deletions

View File

@@ -1,8 +1,12 @@
5.5.0.3 Beta (202?-??-??)
5.5.0.4 Beta (202?-??-??)
5.5.0.3 Beta (2021-09-23)
- New mpv.net option auto-play which sets pause=no on file load and
selecting from the playlist. Disabled by default.
- New option start-size=session to freeze the window size per session.
- Changed keepaspect-window behavior.
5.5.0.2 Beta (2021-09-15)

View File

@@ -225,9 +225,6 @@ Save volume and mute on exit and restore it on start. Default: yes
Setting to remember the window size.
**video**
Window size is set to video resolution.
**width-session**
Width is remembered in the current session.
@@ -240,8 +237,14 @@ Height is remembered in the current session. Default
**height-always**
Height is always remembered.
**video**
Window size is set to video resolution.
**session**
Window size is remembered in the current session.
**always**
Size is always remembered.
Window size is always remembered.
#### --start-threshold=\<milliseconds\>

View File

@@ -181,7 +181,7 @@ namespace mpvnet
bool IsCommandPaletteVissible() => CommandPaletteHost != null && CommandPaletteHost.Visible;
bool KeepSize() => !Core.KeepaspectWindow || App.StartSize == "always";
bool KeepSize() => App.StartSize == "session" || App.StartSize == "always";
bool IsMouseInOSC()
{
@@ -464,7 +464,7 @@ namespace mpvnet
width = autoFitHeight / 9 * 16;
height = (int)Math.Ceiling(width * videoSize.Height / (double)videoSize.Width);
}
else if (App.StartSize == "always" && windowSize.Height != 0)
else if (KeepSize() && windowSize.Height != 0)
{
height = windowSize.Height;
width = windowSize.Width;
@@ -478,10 +478,8 @@ namespace mpvnet
void SetSize(int width, int height, Screen screen, bool checkAutofit = true)
{
Rectangle workingArea = GetWorkingArea(screen);
int maxHeight = workingArea.Height - (Height - ClientSize.Height);
int maxWidth = workingArea.Width - (Width - ClientSize.Width);
int maxHeight = screen.WorkingArea.Height - (Height - ClientSize.Height) - 2;
int maxWidth = screen.WorkingArea.Width - (Width - ClientSize.Width);
int startWidth = width;
int startHeight = height;
@@ -536,10 +534,10 @@ namespace mpvnet
Screen[] screens = Screen.AllScreens;
int minLeft = screens.Select(val => GetWorkingArea(val).X).Min();
int maxRight = screens.Select(val => GetWorkingArea(val).Right).Max();
int minTop = screens.Select(val => GetWorkingArea(val).Y).Min();
int maxBottom = screens.Select(val => GetWorkingArea(val).Bottom).Max();
int minLeft = screens.Select(val => val.WorkingArea.X).Min();
int maxRight = screens.Select(val => val.WorkingArea.Right).Max();
int minTop = screens.Select(val => val.WorkingArea.Y).Min();
int maxBottom = screens.Select(val => val.WorkingArea.Bottom).Max();
if (left < minLeft)
left = minLeft;
@@ -632,26 +630,6 @@ namespace mpvnet
return 0;
}
public static Rectangle GetWorkingArea(Screen screen)
{
if (screen.Primary)
{
Size maximizedSize = SystemInformation.PrimaryMonitorMaximizedWindowSize;
Size size = screen.WorkingArea.Size;
Rectangle rect = screen.WorkingArea;
if (maximizedSize.Width > size.Width)
rect.Width = maximizedSize.Width;
if (maximizedSize.Height > size.Height)
rect.Height = maximizedSize.Height;
return rect;
}
else
return screen.WorkingArea;
}
public void BuildMenu()
{
string content = File.ReadAllText(Core.InputConfPath);

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("5.5.0.2")]
[assembly: AssemblyFileVersion("5.5.0.2")]
[assembly: AssemblyVersion("5.5.0.3")]
[assembly: AssemblyFileVersion("5.5.0.3")]

View File

@@ -362,12 +362,13 @@ default = height-session
filter = Screen
help = Setting to remember the window size. (mpv.net specific option)
option = width-session Window width is remembered in the current session
option = width-always Window width is always remembered
option = height-session Window height is remembered in the current session
option = height-always Window height is always remembered
option = video Window size is set to video resolution
option = width-session Width is remembered in the current session
option = width-always Width is always remembered
option = height-session Height is remembered in the current session
option = height-always Height is always remembered
option = always Size is always remembered
option = session Window size is remembered in the current session
option = always Window size is always remembered
[setting]
name = keepaspect-window