5.5.0.3 Beta
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user