fix issue enlarging or shrinking the window size via keyboard
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
- fix: update routine did only work when mpv.net was located in 'Program Files'
|
||||
- fix: errors were just ignored and only seen printed in the terminal in case mpv.net
|
||||
was started from the terminal, now for every error a message box is shown
|
||||
- fix: when start-size=video was used then enlarging or shrinking the window
|
||||
size was broken
|
||||
|
||||
### 5.4.4.0
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@ public class TaskDialog<T> : TaskDialogNative, IDisposable
|
||||
return value;
|
||||
}
|
||||
|
||||
public void AddCommandLink(string text, T value)
|
||||
public void AddCommand(string text, T value)
|
||||
{
|
||||
int n = 1000 + IdValueDic.Count + 1;
|
||||
IdValueDic[n] = value;
|
||||
@@ -367,7 +367,7 @@ public class TaskDialog<T> : TaskDialogNative, IDisposable
|
||||
Config.dwFlags |= TaskDialogNative.TASKDIALOG_FLAGS.TDF_USE_COMMAND_LINKS;
|
||||
}
|
||||
|
||||
public void AddCommandLink(string text, string description, T value, bool setShield = false)
|
||||
public void AddCommand(string text, string description, T value, bool setShield = false)
|
||||
{
|
||||
int n = 1000 + IdValueDic.Count + 1;
|
||||
IdValueDic[n] = value;
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Frank Skare (stax76)")]
|
||||
[assembly: AssemblyProduct("mpv.net")]
|
||||
[assembly: AssemblyCopyright("Copyright (c) 2017-2019 Frank Skare (stax76)")]
|
||||
[assembly: AssemblyCopyright("Copyright (C) 2017-2020 Frank Skare (stax76)")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
# This file defines the key and mouse bindings and the context menu
|
||||
# of mpv.net. A input and config editor can be found in mpv.net's
|
||||
# of mpv.net. A input and config editor can be found in mpv.nets
|
||||
# context menu under 'Settings'. The defaults of this file can be found at:
|
||||
|
||||
# https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt
|
||||
@@ -12,7 +12,7 @@
|
||||
# mpv.net's defaults of mpv.conf contain: 'input-default-bindings = no'
|
||||
# which disables mpv's input defaults. Every line in this file begins with a
|
||||
# space character to make it easier to do a text search, so if you want to know
|
||||
# if 'o' has already a binding you can make a text search on ' o '.
|
||||
# if 'o' has already a binding you can do a text search on ' o '.
|
||||
|
||||
# mpv input commands: https://mpv.io/manual/master/#list-of-input-commands
|
||||
|
||||
|
||||
@@ -137,12 +137,13 @@ namespace mpvnet
|
||||
Everything_GetResultFullPathName(i, buf, bufsize);
|
||||
string ext = buf.ToString().ShortExt();
|
||||
|
||||
if (App.AudioTypes.Contains(ext) || App.VideoTypes.Contains(ext) ||
|
||||
App.ImageTypes.Contains(ext))
|
||||
if (App.AudioTypes.Contains(ext) || App.VideoTypes.Contains(ext)
|
||||
|| App.ImageTypes.Contains(ext))
|
||||
|
||||
items.Add(buf.ToString());
|
||||
|
||||
if (items.Count > 100) break;
|
||||
if (items.Count > 100)
|
||||
break;
|
||||
}
|
||||
|
||||
Application.Current.Dispatcher.Invoke(() => {
|
||||
|
||||
@@ -279,9 +279,9 @@ namespace mpvnet
|
||||
Size size = mp.VideoSize;
|
||||
int height = size.Height;
|
||||
|
||||
if (App.RememberHeight)
|
||||
if (App.RememberHeight || scale != 1)
|
||||
{
|
||||
if (WasInitialSizeSet)
|
||||
if (WasInitialSizeSet || scale != 1)
|
||||
height = ClientSize.Height;
|
||||
else
|
||||
{
|
||||
@@ -595,7 +595,7 @@ namespace mpvnet
|
||||
{
|
||||
if (value != 1)
|
||||
{
|
||||
BeginInvoke(new Action(() => SetFormPosAndSize(value)));
|
||||
Invoke(new Action(() => SetFormPosAndSize(value)));
|
||||
mp.command("no-osd set window-scale 1");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,9 +172,9 @@ namespace mpvnet
|
||||
using (TaskDialog<string> td = new TaskDialog<string>())
|
||||
{
|
||||
td.MainInstruction = "Choose a settings folder.";
|
||||
td.AddCommandLink(@"AppData\Roaming\mpv.net", appdataFolder, appdataFolder);
|
||||
td.AddCommandLink(@"<startup>\portable_config", portableFolder, portableFolder);
|
||||
td.AddCommandLink("Choose custom folder", "custom");
|
||||
td.AddCommand(@"AppData\Roaming\mpv.net", appdataFolder, appdataFolder);
|
||||
td.AddCommand(@"<startup>\portable_config", portableFolder, portableFolder);
|
||||
td.AddCommand("Choose custom folder", "custom");
|
||||
_ConfigFolder = td.Show();
|
||||
}
|
||||
|
||||
@@ -712,10 +712,12 @@ namespace mpvnet
|
||||
switch (argument)
|
||||
{
|
||||
case "--list-properties=yes":
|
||||
var list = get_property_string("property-list").Split(',').ToList();
|
||||
list.Sort();
|
||||
Console.WriteLine(string.Join("\r\n", list.ToArray()));
|
||||
return true;
|
||||
{
|
||||
var list = get_property_string("property-list").Split(',').ToList();
|
||||
list.Sort();
|
||||
Console.WriteLine(string.Join("\n", list.ToArray()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user