This commit is contained in:
Frank Skare
2019-04-28 04:47:27 +02:00
parent 619fcef63f
commit 1bb05c4d99
6 changed files with 396 additions and 4511 deletions

View File

@@ -201,6 +201,8 @@ mpv.net bugs and requests: <https://github.com/stax76/mpv.net/issues>
- dark mode support was added to the command palette
- a new icon was designed. [Website](https://mpv-net.github.io/mpv.net-web-site/)
- all windows (main, conf, input, about, command palette) can now be closed
by just pressing the Escape key
### 3.2 (2019-04-27)

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="About mpv.net" Height="230" Width="420" FontSize="16" ShowInTaskbar="False"
WindowStartupLocation="CenterOwner" ResizeMode="NoResize" PreviewKeyDown="Window_PreviewKeyDown">
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock FontSize="48" HorizontalAlignment="Center" Margin="0,0,0,10">mpv.net</TextBlock>

View File

@@ -12,9 +12,7 @@ namespace mpvnet
Foreground = WPF.WPF.ThemeBrush;
}
private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
{
Close();
}
protected override void OnPreviewKeyDown(KeyEventArgs e) => Close();
protected override void OnMouseDown(MouseButtonEventArgs e) => Close();
}
}

View File

@@ -240,5 +240,12 @@ namespace mpvnet
{
Process.Start("https://github.com/stax76/mpv.net#Support");
}
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if (e.Key == Key.Escape)
Close();
}
}
}

View File

@@ -122,5 +122,12 @@ namespace mpvnet
if (MessageBox.Show($"Confirm to delete: {(grid.SelectedItem as CommandItem).Input} ({(grid.SelectedItem as CommandItem).Path})", "Confirm Delete", MessageBoxButton.OKCancel, MessageBoxImage.Question) != MessageBoxResult.OK)
e.Handled = true;
}
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if (e.Key == Key.Escape)
Close();
}
}
}